diff --git a/build.gradle b/build.gradle index 5a2ba1d75..34add30a6 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ group = "org.squiddev" archivesBaseName = "cc-tweaked" minecraft { - version = "1.12-14.21.1.2387" + version = "1.12.2-14.23.2.2634" runDir = "run" replace '${version}', project.version @@ -35,7 +35,7 @@ minecraft { // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not allways work. // simply re-run your setup task after changing the mappings to update your workspace. - mappings = "snapshot_20170629" + mappings = "snapshot_20180324" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } @@ -56,8 +56,8 @@ configurations { } dependencies { - deobfProvided "mezz.jei:jei_1.12:4.7.5.86:api" - runtime "mezz.jei:jei_1.12:4.7.5.86" + deobfProvided "mezz.jei:jei_1.12.2:4.8.5.159:api" + runtime "mezz.jei:jei_1.12.2:4.8.5.159" shade 'org.squiddev:Cobalt:0.3.1' testCompile 'junit:junit:4.11' diff --git a/src/main/java/dan200/computercraft/client/proxy/CCTurtleProxyClient.java b/src/main/java/dan200/computercraft/client/proxy/CCTurtleProxyClient.java index 31b3b9385..236f59a81 100644 --- a/src/main/java/dan200/computercraft/client/proxy/CCTurtleProxyClient.java +++ b/src/main/java/dan200/computercraft/client/proxy/CCTurtleProxyClient.java @@ -210,7 +210,7 @@ public class CCTurtleProxyClient extends CCTurtleProxyCommon private static class TurtleItemColour implements IItemColor { @Override - public int getColorFromItemstack( @Nonnull ItemStack stack, int tintIndex ) + public int colorMultiplier( @Nonnull ItemStack stack, int tintIndex ) { if( tintIndex == 0 ) { diff --git a/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java b/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java index e0cb37d83..39ba815b7 100644 --- a/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java +++ b/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java @@ -569,7 +569,7 @@ public class ComputerCraftProxyClient extends ComputerCraftProxyCommon } @Override - public int getColorFromItemstack( @Nonnull ItemStack stack, int layer ) + public int colorMultiplier( @Nonnull ItemStack stack, int layer ) { return layer == 0 ? 0xFFFFFF : disk.getColour( stack ); } diff --git a/src/main/java/dan200/computercraft/client/render/ModelTransformer.java b/src/main/java/dan200/computercraft/client/render/ModelTransformer.java index 19653bfb2..16b4861dc 100644 --- a/src/main/java/dan200/computercraft/client/render/ModelTransformer.java +++ b/src/main/java/dan200/computercraft/client/render/ModelTransformer.java @@ -189,7 +189,7 @@ public final class ModelTransformer private BakedQuadBuilder( VertexFormat format ) { this.format = format; - this.vertexData = new int[ format.getNextOffset() ]; + this.vertexData = new int[ format.getSize() ]; } @Nonnull diff --git a/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java b/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java index d870e2ca5..6308778a7 100644 --- a/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java +++ b/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java @@ -36,7 +36,7 @@ public abstract class BlockGeneric extends Block implements protected BlockGeneric( Material material ) { super( material ); - this.isBlockContainer = true; + this.hasTileEntity = true; } protected abstract IBlockState getDefaultBlockState( int damage, EnumFacing placedSide ); diff --git a/src/main/java/dan200/computercraft/shared/common/ColourableRecipe.java b/src/main/java/dan200/computercraft/shared/common/ColourableRecipe.java index d86e1113c..99e7e02b4 100644 --- a/src/main/java/dan200/computercraft/shared/common/ColourableRecipe.java +++ b/src/main/java/dan200/computercraft/shared/common/ColourableRecipe.java @@ -86,7 +86,7 @@ public class ColourableRecipe extends IForgeRegistryEntry.Impl implemen } @Override - public boolean isHidden() + public boolean isDynamic() { return true; } diff --git a/src/main/java/dan200/computercraft/shared/media/recipes/DiskRecipe.java b/src/main/java/dan200/computercraft/shared/media/recipes/DiskRecipe.java index e223db4ad..f11d8c4ff 100644 --- a/src/main/java/dan200/computercraft/shared/media/recipes/DiskRecipe.java +++ b/src/main/java/dan200/computercraft/shared/media/recipes/DiskRecipe.java @@ -91,7 +91,7 @@ public class DiskRecipe extends IForgeRegistryEntry.Impl implements IRe } @Override - public boolean isHidden() + public boolean isDynamic() { return true; } diff --git a/src/main/java/dan200/computercraft/shared/media/recipes/PrintoutRecipe.java b/src/main/java/dan200/computercraft/shared/media/recipes/PrintoutRecipe.java index 0d9363cdc..fc629dcda 100644 --- a/src/main/java/dan200/computercraft/shared/media/recipes/PrintoutRecipe.java +++ b/src/main/java/dan200/computercraft/shared/media/recipes/PrintoutRecipe.java @@ -33,7 +33,7 @@ public class PrintoutRecipe extends IForgeRegistryEntry.Impl implements } @Override - public boolean isHidden() + public boolean isDynamic() { return true; } diff --git a/src/main/java/dan200/computercraft/shared/pocket/recipes/PocketComputerUpgradeRecipe.java b/src/main/java/dan200/computercraft/shared/pocket/recipes/PocketComputerUpgradeRecipe.java index 4497f19db..5671dd159 100644 --- a/src/main/java/dan200/computercraft/shared/pocket/recipes/PocketComputerUpgradeRecipe.java +++ b/src/main/java/dan200/computercraft/shared/pocket/recipes/PocketComputerUpgradeRecipe.java @@ -34,7 +34,7 @@ public class PocketComputerUpgradeRecipe extends IForgeRegistryEntry.Impl imple } @Override - public boolean isHidden() + public boolean isDynamic() { return true; } diff --git a/src/main/java/dan200/computercraft/shared/util/WorldUtil.java b/src/main/java/dan200/computercraft/shared/util/WorldUtil.java index 9daf082b3..5d00d954c 100644 --- a/src/main/java/dan200/computercraft/shared/util/WorldUtil.java +++ b/src/main/java/dan200/computercraft/shared/util/WorldUtil.java @@ -126,22 +126,8 @@ public class WorldUtil } public static Vec3d getRayEnd( EntityPlayer player) { - double reach = 4.5; - if( player instanceof EntityPlayerMP ) - { - reach = ((EntityPlayerMP) player).interactionManager.getBlockReachDistance(); - } - else if( player.getEntityWorld().isRemote ) - { - reach = Minecraft.getMinecraft().playerController.getBlockReachDistance(); - } - else if( player.capabilities.isCreativeMode ) - { - reach = 5.0; - } - + double reach = player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).getAttributeValue(); Vec3d look = player.getLookVec(); - return getRayStart( player ).addVector( look.x * reach, look.y * reach, look.z * reach ); }