Quick and dirty 1.13 update. I.e. it now compiles for 1.13.

This commit is contained in:
t00thpick1
2018-07-23 22:13:57 -04:00
parent 3d515aab23
commit 0a1559511a
25 changed files with 511 additions and 901 deletions

View File

@ -1,22 +1,14 @@
package com.gmail.nossr50.util;
import java.util.HashSet;
import org.bukkit.CropState;
import org.bukkit.Material;
import org.bukkit.NetherWartsState;
import org.bukkit.block.BlockState;
import org.bukkit.material.CocoaPlant;
import org.bukkit.material.CocoaPlant.CocoaPlantSize;
import org.bukkit.material.Crops;
import org.bukkit.material.NetherWarts;
import org.bukkit.material.SmoothBrick;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.repair.Repair;
import com.gmail.nossr50.skills.salvage.Salvage;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import java.util.HashSet;
public final class BlockUtils {
@ -43,32 +35,54 @@ public final class BlockUtils {
*/
public static boolean canActivateAbilities(BlockState blockState) {
switch (blockState.getType()) {
case BED_BLOCK :
case BLACK_BED:
case BLUE_BED:
case BROWN_BED:
case CYAN_BED:
case GRAY_BED:
case GREEN_BED:
case LIGHT_BLUE_BED:
case LIGHT_GRAY_BED:
case LIME_BED:
case MAGENTA_BED:
case ORANGE_BED:
case PINK_BED:
case PURPLE_BED:
case RED_BED:
case WHITE_BED:
case YELLOW_BED:
case BREWING_STAND :
case BOOKSHELF :
case BURNING_FURNACE :
case CAKE_BLOCK :
case CAKE:
case CHEST :
case DISPENSER :
case ENCHANTMENT_TABLE :
case ENCHANTING_TABLE:
case ENDER_CHEST :
case FENCE_GATE :
case OAK_FENCE_GATE:
case ACACIA_FENCE_GATE :
case DARK_OAK_FENCE_GATE :
case SPRUCE_FENCE_GATE :
case BIRCH_FENCE_GATE :
case JUNGLE_FENCE_GATE :
case FURNACE :
case IRON_DOOR_BLOCK :
case JUKEBOX :
case LEVER :
case NOTE_BLOCK :
case STONE_BUTTON :
case WOOD_BUTTON :
case TRAP_DOOR :
case OAK_BUTTON:
case BIRCH_BUTTON:
case ACACIA_BUTTON:
case DARK_OAK_BUTTON:
case JUNGLE_BUTTON:
case SPRUCE_BUTTON:
case ACACIA_TRAPDOOR:
case BIRCH_TRAPDOOR:
case DARK_OAK_TRAPDOOR:
case JUNGLE_TRAPDOOR:
case OAK_TRAPDOOR:
case SPRUCE_TRAPDOOR:
case WALL_SIGN :
case WOODEN_DOOR :
case WORKBENCH :
case CRAFTING_TABLE:
case BEACON :
case ANVIL :
case DROPPER :
@ -76,12 +90,13 @@ public final class BlockUtils {
case TRAPPED_CHEST :
case IRON_DOOR :
case IRON_TRAPDOOR :
case OAK_DOOR:
case ACACIA_DOOR :
case SPRUCE_DOOR :
case BIRCH_DOOR :
case JUNGLE_DOOR :
case DARK_OAK_DOOR :
case FENCE :
case OAK_FENCE:
case ACACIA_FENCE :
case DARK_OAK_FENCE :
case BIRCH_FENCE :
@ -101,7 +116,7 @@ public final class BlockUtils {
case PINK_SHULKER_BOX :
case PURPLE_SHULKER_BOX :
case RED_SHULKER_BOX :
case SILVER_SHULKER_BOX :
case LIGHT_GRAY_SHULKER_BOX:
case WHITE_SHULKER_BOX :
case YELLOW_SHULKER_BOX :
return false;
@ -136,11 +151,11 @@ public final class BlockUtils {
case GRASS_PATH :
return true;
case SMOOTH_BRICK :
return ((SmoothBrick) blockState.getData()).getMaterial() == Material.STONE;
case STONE_BRICKS:
return true;
case COBBLE_WALL :
return blockState.getRawData() == (byte) 0x0;
case COBBLESTONE_WALL:
return true;
default :
return false;
@ -212,8 +227,12 @@ public final class BlockUtils {
*/
public static boolean isLeaves(BlockState blockState) {
switch (blockState.getType()) {
case LEAVES :
case LEAVES_2 :
case OAK_LEAVES:
case ACACIA_LEAVES:
case BIRCH_LEAVES:
case DARK_OAK_LEAVES:
case JUNGLE_LEAVES:
case SPRUCE_LEAVES:
return true;
default :
@ -252,7 +271,7 @@ public final class BlockUtils {
case DIRT :
case GRASS :
case GRASS_PATH :
case SOIL :
case FARMLAND:
return false;
default :
@ -270,8 +289,8 @@ public final class BlockUtils {
*/
public static boolean affectedByBlockCracker(BlockState blockState) {
switch (blockState.getType()) {
case SMOOTH_BRICK :
return ((SmoothBrick) blockState.getData()).getMaterial() == Material.STONE;
case STONE_BRICKS:
return true;
default :
return false;
@ -313,7 +332,7 @@ public final class BlockUtils {
public static boolean isPistonPiece(BlockState blockState) {
Material type = blockState.getType();
return type == Material.PISTON_MOVING_PIECE || type == Material.AIR;
return type == Material.MOVING_PISTON || type == Material.AIR;
}
/**