diff --git a/build.gradle b/build.gradle index a6843b71..4daaa5ae 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ if (project.hasProperty('mod_appendix')) { } minecraft { - mappings = "snapshot_20171212" + mappings = "stable_39" version = "${minecraft_version}-${forge_version}" runDir = 'run' diff --git a/src/main/java/com/enderio/core/client/handlers/SpecialTooltipHandler.java b/src/main/java/com/enderio/core/client/handlers/SpecialTooltipHandler.java index be4618a7..1967392f 100644 --- a/src/main/java/com/enderio/core/client/handlers/SpecialTooltipHandler.java +++ b/src/main/java/com/enderio/core/client/handlers/SpecialTooltipHandler.java @@ -228,7 +228,7 @@ public static void addTooltipFromResources(@Nonnull List list, @Nullable unlocalizedNameForTooltip = ((IResourceTooltipProvider) itemstack.getItem()).getUnlocalizedNameForTooltip(itemstack); } if (unlocalizedNameForTooltip == null) { - unlocalizedNameForTooltip = itemstack.getItem().getUnlocalizedName(itemstack); + unlocalizedNameForTooltip = itemstack.getItem().getTranslationKey(itemstack); } return unlocalizedNameForTooltip; } diff --git a/src/main/java/com/enderio/core/client/render/RenderUtil.java b/src/main/java/com/enderio/core/client/render/RenderUtil.java index 6331e5e0..b448fb66 100644 --- a/src/main/java/com/enderio/core/client/render/RenderUtil.java +++ b/src/main/java/com/enderio/core/client/render/RenderUtil.java @@ -180,7 +180,7 @@ public static float getColorMultiplierForFace(@Nonnull EnumFacing face) { if (face == EnumFacing.DOWN) { return 0.5f; } - if (face.getFrontOffsetX() != 0) { + if (face.getXOffset() != 0) { return 0.6f; } return 0.8f; // z @@ -262,13 +262,13 @@ public static void renderBillboard(@Nonnull Matrix4d lookMat, float minU, float */ public static List getEdgesForFace(@Nonnull EnumFacing face) { List result = new ArrayList(4); - if (face.getFrontOffsetY() != 0) { + if (face.getYOffset() != 0) { result.add(NORTH); result.add(EAST); result.add(SOUTH); result.add(WEST); - } else if (face.getFrontOffsetX() != 0) { + } else if (face.getXOffset() != 0) { result.add(DOWN); result.add(SOUTH); result.add(UP); diff --git a/src/main/java/com/enderio/core/client/render/VertexRotationFacing.java b/src/main/java/com/enderio/core/client/render/VertexRotationFacing.java index c1056478..67263987 100644 --- a/src/main/java/com/enderio/core/client/render/VertexRotationFacing.java +++ b/src/main/java/com/enderio/core/client/render/VertexRotationFacing.java @@ -31,7 +31,7 @@ public void setRotation(@Nonnull EnumFacing dir) { } public EnumFacing rotate(@Nonnull EnumFacing dir) { - if (dir.getFrontOffsetY() != 0) { + if (dir.getYOffset() != 0) { return dir; } if (getAngle() == ROTATION_AMOUNT) { diff --git a/src/main/java/com/enderio/core/common/TileEntityBase.java b/src/main/java/com/enderio/core/common/TileEntityBase.java index dcea69c5..4e673e3c 100644 --- a/src/main/java/com/enderio/core/common/TileEntityBase.java +++ b/src/main/java/com/enderio/core/common/TileEntityBase.java @@ -154,7 +154,7 @@ public final void onDataPacket(@Nonnull NetworkManager net, @Nonnull SPacketUpda protected void writeCustomNBT(@Nonnull ItemStack stack) { final NBTTagCompound tag = new NBTTagCompound(); writeCustomNBT(NBTAction.ITEM, tag); - if (!tag.hasNoTags()) { + if (!tag.isEmpty()) { stack.setTagCompound(tag); } } @@ -183,7 +183,7 @@ protected void updateBlock() { } protected boolean isPoweredRedstone() { - return hasWorld() && world.isBlockLoaded(getPos()) ? world.isBlockIndirectlyGettingPowered(getPos()) > 0 : false; + return hasWorld() && world.isBlockLoaded(getPos()) ? world.getRedstonePowerFromNeighbors(getPos()) > 0 : false; } /** diff --git a/src/main/java/com/enderio/core/common/fluid/BlockFluidEnder.java b/src/main/java/com/enderio/core/common/fluid/BlockFluidEnder.java index 5475c39c..613307bd 100644 --- a/src/main/java/com/enderio/core/common/fluid/BlockFluidEnder.java +++ b/src/main/java/com/enderio/core/common/fluid/BlockFluidEnder.java @@ -27,17 +27,17 @@ public abstract class BlockFluidEnder extends BlockFluidClassic { private float fogColorRed = 1f; private float fogColorGreen = 1f; private float fogColorBlue = 1f; - private final @Nonnull Material material; + private final @Nonnull Material fluidMaterial; - protected BlockFluidEnder(@Nonnull Fluid fluid, @Nonnull Material material, int fogColor) { - super(fluid, new MaterialLiquid(material.getMaterialMapColor()) { + protected BlockFluidEnder(@Nonnull Fluid fluid, @Nonnull Material fluidMaterial, int fogColor) { + super(fluid, new MaterialLiquid(fluidMaterial.getMaterialMapColor()) { // new Material for each liquid so neighboring different liquids render correctly and don't bleed into each other @Override public boolean blocksMovement() { return true; // so our liquids are not replaced by water } }); - this.material = material; + this.fluidMaterial = fluidMaterial; // darken fog color to fit the fog rendering float dim = 1; @@ -52,7 +52,7 @@ public boolean blocksMovement() { } protected void setNames(Fluid fluid) { - setUnlocalizedName(NullHelper.notnullF(fluid.getUnlocalizedName(), "encountered fluid without a name")); + setTranslationKey(NullHelper.notnullF(fluid.getUnlocalizedName(), "encountered fluid without a name")); setRegistryName("block_fluid_" + fluid.getName().toLowerCase(Locale.ENGLISH)); } @@ -83,7 +83,7 @@ public void setFogColorBlue(float fogColorBlue) { @Override public Boolean isEntityInsideMaterial(@Nonnull IBlockAccess world, @Nonnull BlockPos blockpos, @Nonnull IBlockState iblockstate, @Nonnull Entity entity, double yToTest, @Nonnull Material materialIn, boolean testingHead) { - if (materialIn == material || materialIn == this.blockMaterial) { + if (materialIn == fluidMaterial || materialIn == this.material) { return Boolean.TRUE; } return super.isEntityInsideMaterial(world, blockpos, iblockstate, entity, yToTest, materialIn, testingHead); diff --git a/src/main/java/com/enderio/core/common/inventory/EnderInventory.java b/src/main/java/com/enderio/core/common/inventory/EnderInventory.java index 68bef33f..fd523c60 100644 --- a/src/main/java/com/enderio/core/common/inventory/EnderInventory.java +++ b/src/main/java/com/enderio/core/common/inventory/EnderInventory.java @@ -128,7 +128,7 @@ public void writeToNBT(@Nonnull NBTTagCompound tag) { if (entry.getValue() != null) { NBTTagCompound subTag = new NBTTagCompound(); entry.getValue().writeToNBT(subTag); - if (!subTag.hasNoTags()) { + if (!subTag.isEmpty()) { tag.setTag(NullHelper.notnull(entry.getKey(), "Internal data corruption"), subTag); } } diff --git a/src/main/java/com/enderio/core/common/tweaks/SlabRecipes.java b/src/main/java/com/enderio/core/common/tweaks/SlabRecipes.java index 02e29616..fde7cb73 100644 --- a/src/main/java/com/enderio/core/common/tweaks/SlabRecipes.java +++ b/src/main/java/com/enderio/core/common/tweaks/SlabRecipes.java @@ -29,7 +29,7 @@ public void load() { private static void addSlabRecipe(@Nonnull ItemStack stack, @Nonnull String slab) { ForgeRegistries.RECIPES.register(new ShapelessOreRecipe(null, stack, slab, slab) - .setRegistryName(slab + "_to_" + NullHelper.notnullM(stack.getItem().getRegistryName(), "found unregistered item").getResourcePath())); + .setRegistryName(slab + "_to_" + NullHelper.notnullM(stack.getItem().getRegistryName(), "found unregistered item").getPath())); } private static void registerSlabToBlock() { diff --git a/src/main/java/com/enderio/core/common/util/CreativeTabsCustom.java b/src/main/java/com/enderio/core/common/util/CreativeTabsCustom.java index 68e51d52..73d0a8ae 100644 --- a/src/main/java/com/enderio/core/common/util/CreativeTabsCustom.java +++ b/src/main/java/com/enderio/core/common/util/CreativeTabsCustom.java @@ -42,7 +42,7 @@ public CreativeTabsCustom setDisplay(@Nonnull ItemStack display) { } @Override - public @Nonnull ItemStack getTabIconItem() { + public @Nonnull ItemStack createIcon() { return displayStack; } } diff --git a/src/main/java/com/enderio/core/common/util/ForgeDirectionOffsets.java b/src/main/java/com/enderio/core/common/util/ForgeDirectionOffsets.java index b2585e70..05e36a56 100644 --- a/src/main/java/com/enderio/core/common/util/ForgeDirectionOffsets.java +++ b/src/main/java/com/enderio/core/common/util/ForgeDirectionOffsets.java @@ -10,7 +10,7 @@ public final class ForgeDirectionOffsets { static { for (EnumFacing dir : EnumFacing.values()) { - OFFSETS[dir.ordinal()] = new Vector3d(dir.getFrontOffsetX(), dir.getFrontOffsetY(), dir.getFrontOffsetZ()); + OFFSETS[dir.ordinal()] = new Vector3d(dir.getXOffset(), dir.getYOffset(), dir.getZOffset()); } }