From 9584c496cb2935c59ef42e8598c7f91e726476dc Mon Sep 17 00:00:00 2001 From: RecursivePineapple Date: Mon, 23 Dec 2024 15:41:14 -0500 Subject: [PATCH] Remove metadata casts to byte These are incompatible with NEID and can cause problems with blocks whose metadata can go over 127. --- src/main/java/bartworks/API/GlassTier.java | 4 +-- .../system/material/BWMetaGeneratedItems.java | 2 +- .../DetravToolElectricProspectorBase.java | 9 +++--- .../api/interfaces/IBlockContainer.java | 2 +- .../api/interfaces/IRedstoneCircuitBlock.java | 2 +- .../gregtech/api/interfaces/IToolStats.java | 8 ++--- .../tileentity/IHasWorldObjectAndCoords.java | 8 ++--- .../gregtech/api/items/MetaGeneratedTool.java | 8 ++--- .../api/metatileentity/BaseTileEntity.java | 10 +++--- .../java/gregtech/api/util/GTBlockMap.java | 32 +++++++++---------- .../java/gregtech/api/util/GTBlockSet.java | 6 ++-- .../api/util/GTToolHarvestHelper.java | 2 +- .../java/gregtech/api/util/GTUtility.java | 4 +-- src/main/java/gregtech/common/GTProxy.java | 6 ++-- .../common/items/MetaGeneratedItem01.java | 6 ++-- .../items/behaviors/BehaviourCrowbar.java | 2 +- .../items/behaviors/BehaviourScrewdriver.java | 2 +- .../items/behaviors/BehaviourSoftHammer.java | 2 +- .../render/GTCopiedBlockTextureRender.java | 7 ++-- .../render/GTCopiedCTMBlockTexture.java | 7 ++-- .../common/render/GTTextureBuilder.java | 4 +-- .../MTELongDistancePipelineBase.java | 2 +- .../machines/multi/MTEOilCracker.java | 2 +- .../java/gregtech/common/tools/GTTool.java | 4 +-- .../common/tools/ToolBranchCutter.java | 4 +-- .../common/tools/ToolButcheryKnife.java | 2 +- .../gregtech/common/tools/ToolBuzzSaw.java | 2 +- .../gregtech/common/tools/ToolChainsawLV.java | 6 ++-- .../gregtech/common/tools/ToolCrowbar.java | 2 +- .../gregtech/common/tools/ToolDrillLV.java | 2 +- .../java/gregtech/common/tools/ToolFile.java | 2 +- .../gregtech/common/tools/ToolHardHammer.java | 4 +-- .../gregtech/common/tools/ToolJackHammer.java | 4 +-- .../java/gregtech/common/tools/ToolKnife.java | 2 +- .../gregtech/common/tools/ToolMortar.java | 2 +- .../gregtech/common/tools/ToolPlunger.java | 2 +- .../gregtech/common/tools/ToolRollingPin.java | 2 +- .../java/gregtech/common/tools/ToolSaw.java | 4 +-- .../java/gregtech/common/tools/ToolScoop.java | 2 +- .../common/tools/ToolScrewdriver.java | 2 +- .../gregtech/common/tools/ToolSoftHammer.java | 2 +- .../common/tools/ToolSolderingIron.java | 2 +- .../gregtech/common/tools/ToolTurbine.java | 2 +- .../gregtech/common/tools/ToolWireCutter.java | 2 +- .../gregtech/common/tools/ToolWrench.java | 6 ++-- .../tools/pocket/ToolPocketMultitool.java | 2 +- .../api/interfaces/ILazyCoverable.java | 8 ++--- .../tileentities/base/TileEntityBase.java | 10 +++--- .../api/interfaces/internal/IToolStats.java | 4 +-- .../xmod/gregtech/api/items/GTMetaTool.java | 4 +-- .../blocks/GregtechMetaCasingBlocks4.java | 4 +-- .../GregtechMetaSpecialMultiCasings.java | 4 +-- .../GregtechMetaSpecialMultiCasings2.java | 6 ++-- .../turbine/LargeTurbineTextureHandler.java | 2 +- .../processing/MTEIndustrialWashPlant.java | 1 - .../production/MTEIndustrialFishingPond.java | 4 +-- .../production/algae/MTEAlgaePondBase.java | 4 +-- ...aTileEntity_PowerSubStationController.java | 2 +- .../redstone/MTERedstoneCircuitBlock.java | 2 +- .../common/tools/ToolAngleGrinder.java | 4 +-- 60 files changed, 131 insertions(+), 129 deletions(-) diff --git a/src/main/java/bartworks/API/GlassTier.java b/src/main/java/bartworks/API/GlassTier.java index 64612549c9a..897deddddbe 100644 --- a/src/main/java/bartworks/API/GlassTier.java +++ b/src/main/java/bartworks/API/GlassTier.java @@ -34,7 +34,7 @@ public static void addCustomGlass(String modname, String unlocalisedBlockName, i public static void addCustomGlass(@NotNull Block block, int meta, int tier) { Objects.requireNonNull(block, "Glass block cannot be null"); - GlassTier.glasses.put(new BlockMetaPair(block, (byte) meta), tier); + GlassTier.glasses.put(new BlockMetaPair(block, meta), tier); } public static HashMap getGlassMap() { @@ -42,7 +42,7 @@ public static HashMap getGlassMap() { } public static int getGlassTier(Block block, int meta) { - return glasses.getOrDefault(new BlockMetaPair(block, (byte) meta), 0); + return glasses.getOrDefault(new BlockMetaPair(block, meta), 0); } public static class BlockMetaPair { diff --git a/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java b/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java index cd8e360da6a..ae47f0d658c 100644 --- a/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java +++ b/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java @@ -92,7 +92,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { int tY = MathHelper.floor_double(aItemEntity.posY); int tZ = MathHelper.floor_double(aItemEntity.posZ); Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if (tBlock == Blocks.cauldron && tMetaData > 0) { if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure) { aItemEntity.setEntityItemStack( diff --git a/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java b/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java index 66d38c39ea9..59619ca090c 100644 --- a/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java +++ b/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java @@ -138,14 +138,14 @@ public boolean isMiningTool() { return false; } - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } @Override public int convertBlockDrops(List list, ItemStack itemStack, EntityPlayer entityPlayer, Block block, - int i, int i1, int i2, byte b, int i3, boolean b1, BlockEvent.HarvestDropsEvent harvestDropsEvent) { + int i, int i1, int i2, int b, int i3, boolean b1, BlockEvent.HarvestDropsEvent harvestDropsEvent) { return 0; } @@ -193,8 +193,9 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase + EnumChatFormatting.WHITE); } - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, - int aX, int aY, int aZ) { + @Override + public float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ) { return aDefault; } } diff --git a/src/main/java/gregtech/api/interfaces/IBlockContainer.java b/src/main/java/gregtech/api/interfaces/IBlockContainer.java index 5a80655a5ce..463d23b7425 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockContainer.java +++ b/src/main/java/gregtech/api/interfaces/IBlockContainer.java @@ -6,5 +6,5 @@ public interface IBlockContainer { Block getBlock(); - byte getMeta(); + int getMeta(); } diff --git a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java index a0a362c4e51..328da78bf44 100644 --- a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java +++ b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java @@ -50,7 +50,7 @@ public interface IRedstoneCircuitBlock { /** * returns whatever Meta-Value is adjacent to the Redstone Circuit Block */ - byte getMetaIDAtSide(ForgeDirection side); + int getMetaIDAtSide(ForgeDirection side); /** * returns whatever TileEntity is adjacent to the Redstone Circuit Block diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index 64fc81196c8..052dccfc521 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -47,7 +47,7 @@ public interface IToolStats { * @param tile TileEntity of the block if exist * @param event the event, cancel it to prevent the block from being broken */ - default void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, byte metadata, + default void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, int metadata, @Nullable TileEntity tile, @Nonnull BlockEvent.BreakEvent event) {} /** @@ -164,7 +164,7 @@ default boolean isScrewdriver() { * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this * check. */ - boolean isMinableBlock(Block aBlock, byte aMetaData); + boolean isMinableBlock(Block aBlock, int aMetaData); /** * This lets you modify the Drop List, when this type of Tool has been used. @@ -172,7 +172,7 @@ default boolean isScrewdriver() { * @return the Amount of modified Items, used to determine the extra durability cost */ int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, - int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. @@ -193,7 +193,7 @@ int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPl short[] getRGBa(boolean aIsToolHead, ItemStack aStack); - float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, + float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ); default String getToolTypeName() { diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java index b62c3e92cf9..429cfe39536 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java @@ -79,13 +79,13 @@ default ChunkCoordinates getCoords() { Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance); - byte getMetaID(int aX, int aY, int aZ); + int getMetaID(int aX, int aY, int aZ); - byte getMetaIDOffset(int aX, int aY, int aZ); + int getMetaIDOffset(int aX, int aY, int aZ); - byte getMetaIDAtSide(ForgeDirection side); + int getMetaIDAtSide(ForgeDirection side); - byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance); + int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance); byte getLightLevel(int aX, int aY, int aZ); diff --git a/src/main/java/gregtech/api/items/MetaGeneratedTool.java b/src/main/java/gregtech/api/items/MetaGeneratedTool.java index 4c9cdf39ae8..87698c7dbb6 100644 --- a/src/main/java/gregtech/api/items/MetaGeneratedTool.java +++ b/src/main/java/gregtech/api/items/MetaGeneratedTool.java @@ -255,7 +255,7 @@ public final ItemStack getToolWithStats(int aToolID, int aAmount, Materials aPri */ @Mod.EventHandler public void onHarvestBlockEvent(ArrayList aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, - int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aX, int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { IToolStats tStats = getToolStats(aStack); if (isItemStackUsable(aStack) && getDigSpeed(aStack, aBlock, aMetaData) > 0.0F) doDamage( aStack, @@ -266,7 +266,7 @@ public void onHarvestBlockEvent(ArrayList aDrops, ItemStack aStack, E @Mod.EventHandler public float onBlockBreakSpeedEvent(float aDefault, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, PlayerEvent.BreakSpeed aEvent) { + int aY, int aZ, int aMetaData, PlayerEvent.BreakSpeed aEvent) { IToolStats tStats = getToolStats(aStack); return tStats == null ? aDefault : tStats.getMiningSpeed(aBlock, aMetaData, aDefault, aPlayer, aPlayer.worldObj, aX, aY, aZ); @@ -695,14 +695,14 @@ public float getDigSpeed(ItemStack aStack, Block aBlock, int aMetaData) { if (!isItemStackUsable(aStack)) return 0.0F; IToolStats tStats = getToolStats(aStack); if (tStats == null || Math.max(0, getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData)) return 0.0F; - return tStats.isMinableBlock(aBlock, (byte) aMetaData) + return tStats.isMinableBlock(aBlock, aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; } @Override public final boolean canHarvestBlock(Block aBlock, ItemStack aStack) { - return getDigSpeed(aStack, aBlock, (byte) 0) > 0.0F; + return getDigSpeed(aStack, aBlock, 0) > 0.0F; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java index f2b5278e49d..37f2871d761 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java @@ -221,17 +221,17 @@ public final Block getBlockAtSideAndDistance(ForgeDirection side, int distance) } @Override - public final byte getMetaIDOffset(int x, int y, int z) { + public final int getMetaIDOffset(int x, int y, int z) { return getMetaID(xCoord + x, yCoord + y, zCoord + z); } @Override - public final byte getMetaIDAtSide(ForgeDirection side) { + public final int getMetaIDAtSide(ForgeDirection side) { return getMetaIDAtSideAndDistance(side, 1); } @Override - public final byte getMetaIDAtSideAndDistance(ForgeDirection side, int distance) { + public final int getMetaIDAtSideAndDistance(ForgeDirection side, int distance) { return getMetaID(getOffsetX(side, distance), getOffsetY(side, distance), getOffsetZ(side, distance)); } @@ -404,9 +404,9 @@ public Block getBlock(ChunkCoordinates aCoords) { } @Override - public final byte getMetaID(int x, int y, int z) { + public final int getMetaID(int x, int y, int z) { if (ignoreUnloadedChunks && crossedChunkBorder(x, z) && !worldObj.blockExists(x, y, z)) return 0; - return (byte) worldObj.getBlockMetadata(x, y, z); + return worldObj.getBlockMetadata(x, y, z); } @Override diff --git a/src/main/java/gregtech/api/util/GTBlockMap.java b/src/main/java/gregtech/api/util/GTBlockMap.java index a5ac98d4271..a0a2e755ea4 100644 --- a/src/main/java/gregtech/api/util/GTBlockMap.java +++ b/src/main/java/gregtech/api/util/GTBlockMap.java @@ -5,17 +5,17 @@ import net.minecraft.block.Block; -import gnu.trove.map.TByteObjectMap; -import gnu.trove.map.hash.TByteObjectHashMap; +import gnu.trove.map.TIntObjectMap; +import gnu.trove.map.hash.TIntObjectHashMap; public class GTBlockMap { - public static final byte WILDCARD = -1; - private final ConcurrentHashMap> backing = new ConcurrentHashMap<>(); + public static final int WILDCARD = -1; + private final ConcurrentHashMap> backing = new ConcurrentHashMap<>(); private int size = 0; - private TByteObjectMap getSubmap(Block block) { - return backing.computeIfAbsent(block, b -> new TByteObjectHashMap<>()); + private TIntObjectMap getSubmap(Block block) { + return backing.computeIfAbsent(block, b -> new TIntObjectHashMap<>()); } /** @@ -25,7 +25,7 @@ private TByteObjectMap getSubmap(Block block) { * @param meta meta * @return old mapping, or null if that doesn't exist */ - public V put(Block block, byte meta, V value) { + public V put(Block block, int meta, V value) { V v = getSubmap(block).put(meta, value); if (v == null) size++; return v; @@ -38,7 +38,7 @@ public V put(Block block, byte meta, V value) { * @param meta meta * @return old mapping, or null if that doesn't exist */ - public V putIfAbsent(Block block, byte meta, V value) { + public V putIfAbsent(Block block, int meta, V value) { V v = getSubmap(block).putIfAbsent(meta, value); if (v == null) size++; return v; @@ -51,8 +51,8 @@ public V putIfAbsent(Block block, byte meta, V value) { * @param meta meta * @return old mapping, or null if that doesn't exist */ - public V computeIfAbsent(Block block, byte meta, BiFunction function) { - TByteObjectMap submap = getSubmap(block); + public V computeIfAbsent(Block block, int meta, BiFunction function) { + TIntObjectMap submap = getSubmap(block); V v = submap.get(meta); if (v == null) { v = function.apply(block, meta); @@ -69,8 +69,8 @@ public V computeIfAbsent(Block block, byte meta, BiFunction func * @param meta meta * @return current mapping OR wildcard of that mapping exists */ - public boolean containsKey(Block block, byte meta) { - TByteObjectMap submap = backing.get(block); + public boolean containsKey(Block block, int meta) { + TIntObjectMap submap = backing.get(block); if (submap == null) return false; return submap.containsKey(meta) || submap.containsKey(WILDCARD); } @@ -82,8 +82,8 @@ public boolean containsKey(Block block, byte meta) { * @param meta meta * @return current mapping OR wildcard of that block. null if neither exists */ - public V get(Block block, byte meta) { - TByteObjectMap submap = backing.get(block); + public V get(Block block, int meta) { + TIntObjectMap submap = backing.get(block); if (submap == null) return null; V v = submap.get(meta); if (v != null) return v; @@ -97,8 +97,8 @@ public V get(Block block, byte meta) { * @param meta meta * @return old value, or null if none */ - public V remove(Block block, byte meta) { - TByteObjectMap submap = backing.get(block); + public V remove(Block block, int meta) { + TIntObjectMap submap = backing.get(block); if (submap == null) return null; V v = submap.remove(meta); if (v != null) { diff --git a/src/main/java/gregtech/api/util/GTBlockSet.java b/src/main/java/gregtech/api/util/GTBlockSet.java index 6c91193832f..36086030b7d 100644 --- a/src/main/java/gregtech/api/util/GTBlockSet.java +++ b/src/main/java/gregtech/api/util/GTBlockSet.java @@ -6,15 +6,15 @@ public class GTBlockSet { private final GTBlockMap backing = new GTBlockMap<>(); - public boolean add(Block block, byte meta) { + public boolean add(Block block, int meta) { return backing.put(block, meta, this) != this; } - public boolean contains(Block block, byte meta) { + public boolean contains(Block block, int meta) { return backing.get(block, meta) == this; } - public boolean remove(Block block, byte meta) { + public boolean remove(Block block, int meta) { return backing.remove(block, meta) == this; } diff --git a/src/main/java/gregtech/api/util/GTToolHarvestHelper.java b/src/main/java/gregtech/api/util/GTToolHarvestHelper.java index 8dd5d6b93c4..5a09aaf6538 100644 --- a/src/main/java/gregtech/api/util/GTToolHarvestHelper.java +++ b/src/main/java/gregtech/api/util/GTToolHarvestHelper.java @@ -12,7 +12,7 @@ public class GTToolHarvestHelper { - public static boolean isAppropriateTool(Block aBlock, byte aMetaData, String... tTools) { + public static boolean isAppropriateTool(Block aBlock, int aMetaData, String... tTools) { if (aBlock == null || tTools == null) { return false; diff --git a/src/main/java/gregtech/api/util/GTUtility.java b/src/main/java/gregtech/api/util/GTUtility.java index da805f995db..901c7ae54d1 100644 --- a/src/main/java/gregtech/api/util/GTUtility.java +++ b/src/main/java/gregtech/api/util/GTUtility.java @@ -2525,7 +2525,7 @@ public static int getTextureId(byte page, byte startIndex, byte blockMeta) { * * @return casing texture 0 to 16383 */ - public static int getTextureId(Block blockFromBlock, byte metaFromBlock) { + public static int getTextureId(Block blockFromBlock, int metaFromBlock) { for (int page = 0; page < Textures.BlockIcons.casingTexturePages.length; page++) { ITexture[] casingTexturePage = Textures.BlockIcons.casingTexturePages[page]; if (casingTexturePage != null) { @@ -2533,7 +2533,7 @@ public static int getTextureId(Block blockFromBlock, byte metaFromBlock) { ITexture iTexture = casingTexturePage[index]; if (iTexture instanceof IBlockContainer) { Block block = ((IBlockContainer) iTexture).getBlock(); - byte meta = ((IBlockContainer) iTexture).getMeta(); + int meta = ((IBlockContainer) iTexture).getMeta(); if (meta == metaFromBlock && blockFromBlock == block) { return (page << 7) + index; } diff --git a/src/main/java/gregtech/common/GTProxy.java b/src/main/java/gregtech/common/GTProxy.java index 2bedabd299c..c85c27aaf19 100644 --- a/src/main/java/gregtech/common/GTProxy.java +++ b/src/main/java/gregtech/common/GTProxy.java @@ -1555,7 +1555,7 @@ public void onBlockBreakingEvent(BlockEvent.BreakEvent event) { if (stats == null) return; TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z); - stats.onBreakBlock(player, event.x, event.y, event.z, event.block, (byte) event.blockMetadata, tile, event); + stats.onBreakBlock(player, event.x, event.y, event.z, event.block, event.blockMetadata, tile, event); } @SubscribeEvent @@ -1574,7 +1574,7 @@ public void onBlockHarvestingEvent(BlockEvent.HarvestDropsEvent aEvent) { aEvent.x, aEvent.y, aEvent.z, - (byte) aEvent.blockMetadata, + aEvent.blockMetadata, aEvent.fortuneLevel, aEvent.isSilkTouching, aEvent); @@ -2694,7 +2694,7 @@ public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent) { aEvent.x, aEvent.y, aEvent.z, - (byte) aEvent.metadata, + aEvent.metadata, aEvent); } } diff --git a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java index 0b96caea028..59bc08da17f 100644 --- a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java +++ b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java @@ -3459,7 +3459,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { OrePrefixes aPrefix = this.mGeneratedPrefixList[(aDamage / 1000)]; if ((aPrefix == OrePrefixes.dustImpure) || (aPrefix == OrePrefixes.dustPure)) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aMaterial = cauldronRemap.getOrDefault(aMaterial, aMaterial); @@ -3472,7 +3472,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { } } else if (aPrefix == OrePrefixes.crushed) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aItemEntity.setEntityItemStack( GTOreDictUnificator @@ -3482,7 +3482,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { } } else if (aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aItemEntity.setEntityItemStack(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java b/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java index 76c215bfd00..da9b3f336a3 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java @@ -37,7 +37,7 @@ public boolean onItemUseFirst(MetaBaseItem aItem, ItemStack aStack, EntityPlayer if (aBlock == null) { return false; } - byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + int aMeta = aWorld.getBlockMetadata(aX, aY, aZ); if (aBlock == Blocks.rail) { if (GTModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { aWorld.isRemote = true; diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java b/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java index 599398349f8..029f94fc5c8 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java @@ -32,7 +32,7 @@ public boolean onItemUseFirst(MetaBaseItem aItem, ItemStack aStack, EntityPlayer if (aBlock == null) { return false; } - byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + int aMeta = aWorld.getBlockMetadata(aX, aY, aZ); if ((aBlock == Blocks.unpowered_repeater) || (aBlock == Blocks.powered_repeater)) { if (GTModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java b/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java index 83e458276db..72c930ac60f 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java @@ -35,7 +35,7 @@ public boolean onItemUseFirst(MetaBaseItem aItem, ItemStack aStack, EntityPlayer if (aBlock == null) { return false; } - byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + int aMeta = aWorld.getBlockMetadata(aX, aY, aZ); if (aBlock == Blocks.lit_redstone_lamp) { if ((aPlayer.capabilities.isCreativeMode) || (((MetaGeneratedTool) aItem).doDamage(aStack, this.mCosts))) { aWorld.isRemote = true; diff --git a/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java b/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java index 3ce88236635..3966654df46 100644 --- a/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java +++ b/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java @@ -12,14 +12,15 @@ public class GTCopiedBlockTextureRender extends GTTextureBase implements ITexture, IBlockContainer { private final Block mBlock; - private final byte mSide, mMeta; + private final byte mSide; + private final int mMeta; protected GTCopiedBlockTextureRender(Block aBlock, int ordinalSide, int aMeta, short[] aRGBa, boolean allowAlpha) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GTCopiedBlockTextureRender"); mBlock = aBlock; mSide = (byte) ordinalSide; - mMeta = (byte) aMeta; + mMeta = aMeta; } @Override @@ -107,7 +108,7 @@ public Block getBlock() { } @Override - public byte getMeta() { + public int getMeta() { return mMeta; } } diff --git a/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java b/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java index a33ead9ec54..1bfe6b55e8d 100644 --- a/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java +++ b/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java @@ -13,14 +13,15 @@ class GTCopiedCTMBlockTexture extends GTTextureBase implements ITexture, IBlockContainer { private final Block mBlock; - private final byte mSide, mMeta; + private final byte mSide; + private final int mMeta; GTCopiedCTMBlockTexture(Block aBlock, int ordinalSide, int aMeta, short[] aRGBa, boolean allowAlpha) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GTCopiedCTMBlockTexture"); mBlock = aBlock; mSide = (byte) ordinalSide; - mMeta = (byte) aMeta; + mMeta = aMeta; } @Override @@ -112,7 +113,7 @@ public Block getBlock() { } @Override - public byte getMeta() { + public int getMeta() { return mMeta; } } diff --git a/src/main/java/gregtech/common/render/GTTextureBuilder.java b/src/main/java/gregtech/common/render/GTTextureBuilder.java index aad734b8288..0346c579a46 100644 --- a/src/main/java/gregtech/common/render/GTTextureBuilder.java +++ b/src/main/java/gregtech/common/render/GTTextureBuilder.java @@ -134,10 +134,10 @@ public ITexture build() { } private boolean isCTMBlock(Block fromBlock, int fromMeta) { - return GTMod.gregtechproxy.mCTMBlockCache.computeIfAbsent(fromBlock, (byte) fromMeta, GTTextureBuilder::apply); + return GTMod.gregtechproxy.mCTMBlockCache.computeIfAbsent(fromBlock, fromMeta, GTTextureBuilder::apply); } - private static Boolean apply(Block b, Byte m) { + private static Boolean apply(Block b, int m) { Class clazz = b.getClass(); while (clazz != Block.class) { final String className = clazz.getName(); diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java index 259988c16aa..e3f270e8a28 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java @@ -215,7 +215,7 @@ protected void scanPipes() { Block aBlock = gtTile.getBlockAtSide(gtTile.getBackFacing()); if (aBlock instanceof BlockLongDistancePipe) { - byte aMetaData = gtTile.getMetaIDAtSide(gtTile.getBackFacing()); + int aMetaData = gtTile.getMetaIDAtSide(gtTile.getBackFacing()); if (aMetaData != getPipeMeta()) return; HashSet tVisited = new HashSet<>(Collections.singletonList(getCoords())), diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java index 32651313a31..885d9e90fe0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java @@ -304,7 +304,7 @@ private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) { for (int yPos = tY - 1; yPos <= tY + 1; yPos++) for (int zPos = tZ - 1; zPos <= tZ + 1; zPos += (xDir != 0 ? 2 : 1)) { if ((yPos == tY) && (xPos == tX || zPos == tZ)) continue; - final byte tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); + final int tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); if (tUsedMeta < 12) continue; if (tUsedMeta > 14) continue; if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTechAPI.sBlockCasings1) continue; diff --git a/src/main/java/gregtech/common/tools/GTTool.java b/src/main/java/gregtech/common/tools/GTTool.java index 436ec767a99..78fc28883f9 100644 --- a/src/main/java/gregtech/common/tools/GTTool.java +++ b/src/main/java/gregtech/common/tools/GTTool.java @@ -142,7 +142,7 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { return 0; } @@ -184,7 +184,7 @@ public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, } @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, + public float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ) { return aDefault; } diff --git a/src/main/java/gregtech/common/tools/ToolBranchCutter.java b/src/main/java/gregtech/common/tools/ToolBranchCutter.java index c9ad255a457..54a17c9f9c2 100644 --- a/src/main/java/gregtech/common/tools/ToolBranchCutter.java +++ b/src/main/java/gregtech/common/tools/ToolBranchCutter.java @@ -45,7 +45,7 @@ public boolean isGrafter() { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { if (aBlock.getMaterial() == Material.leaves) { aEvent.dropChance = Math.min( 1.0F, @@ -72,7 +72,7 @@ public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPla } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "grafter") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, Material.leaves); } diff --git a/src/main/java/gregtech/common/tools/ToolButcheryKnife.java b/src/main/java/gregtech/common/tools/ToolButcheryKnife.java index 43323b84047..926a1440aaa 100644 --- a/src/main/java/gregtech/common/tools/ToolButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/ToolButcheryKnife.java @@ -98,7 +98,7 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } } diff --git a/src/main/java/gregtech/common/tools/ToolBuzzSaw.java b/src/main/java/gregtech/common/tools/ToolBuzzSaw.java index 7e62ab7bb42..e47b1c00742 100644 --- a/src/main/java/gregtech/common/tools/ToolBuzzSaw.java +++ b/src/main/java/gregtech/common/tools/ToolBuzzSaw.java @@ -50,7 +50,7 @@ public String getMiningSound() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolChainsawLV.java b/src/main/java/gregtech/common/tools/ToolChainsawLV.java index ad47ae2cdc0..6ed7918acc1 100644 --- a/src/main/java/gregtech/common/tools/ToolChainsawLV.java +++ b/src/main/java/gregtech/common/tools/ToolChainsawLV.java @@ -106,7 +106,7 @@ public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); @@ -137,8 +137,8 @@ public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPla } @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, - int aX, int aY, int aZ) { + public float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ) { if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { float rAmount = 1.0F; diff --git a/src/main/java/gregtech/common/tools/ToolCrowbar.java b/src/main/java/gregtech/common/tools/ToolCrowbar.java index db72d65a6dc..516c0138161 100644 --- a/src/main/java/gregtech/common/tools/ToolCrowbar.java +++ b/src/main/java/gregtech/common/tools/ToolCrowbar.java @@ -90,7 +90,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { if (aBlock.getMaterial() == Material.circuits) { return true; } diff --git a/src/main/java/gregtech/common/tools/ToolDrillLV.java b/src/main/java/gregtech/common/tools/ToolDrillLV.java index 1c6dfd7de3c..db8d46addd0 100644 --- a/src/main/java/gregtech/common/tools/ToolDrillLV.java +++ b/src/main/java/gregtech/common/tools/ToolDrillLV.java @@ -90,7 +90,7 @@ public boolean isCrowbar() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe", "shovel") || GTToolHarvestHelper.isAppropriateMaterial( aBlock, diff --git a/src/main/java/gregtech/common/tools/ToolFile.java b/src/main/java/gregtech/common/tools/ToolFile.java index 8e64dafdd21..6118f1597ea 100644 --- a/src/main/java/gregtech/common/tools/ToolFile.java +++ b/src/main/java/gregtech/common/tools/ToolFile.java @@ -85,7 +85,7 @@ public boolean isMiningTool() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "file"); } diff --git a/src/main/java/gregtech/common/tools/ToolHardHammer.java b/src/main/java/gregtech/common/tools/ToolHardHammer.java index a5b0a38ee56..323a1637c3e 100644 --- a/src/main/java/gregtech/common/tools/ToolHardHammer.java +++ b/src/main/java/gregtech/common/tools/ToolHardHammer.java @@ -120,7 +120,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "hammer", "pickaxe") || GTToolHarvestHelper .isAppropriateMaterial(aBlock, Material.rock, Material.glass, Material.ice, Material.packedIce) @@ -129,7 +129,7 @@ public boolean isMinableBlock(Block aBlock, byte aMetaData) { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; GTRecipe tRecipe = RecipeMaps.hammerRecipes.findRecipeQuery() .items(new ItemStack(aBlock, 1, aMetaData)) diff --git a/src/main/java/gregtech/common/tools/ToolJackHammer.java b/src/main/java/gregtech/common/tools/ToolJackHammer.java index bc0a7ddcc0b..24c4815d00d 100644 --- a/src/main/java/gregtech/common/tools/ToolJackHammer.java +++ b/src/main/java/gregtech/common/tools/ToolJackHammer.java @@ -63,7 +63,7 @@ public float getMaxDurabilityMultiplier() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe") // || GTToolHarvestHelper.isAppropriateMaterial( aBlock, // @@ -76,7 +76,7 @@ public boolean isMinableBlock(Block aBlock, byte aMetaData) { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; GTRecipe tRecipe = RecipeMaps.hammerRecipes.findRecipeQuery() .items(new ItemStack(aBlock, 1, aMetaData)) diff --git a/src/main/java/gregtech/common/tools/ToolKnife.java b/src/main/java/gregtech/common/tools/ToolKnife.java index c5b8273d254..3005c746207 100644 --- a/src/main/java/gregtech/common/tools/ToolKnife.java +++ b/src/main/java/gregtech/common/tools/ToolKnife.java @@ -72,7 +72,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "sword") || GTToolHarvestHelper.isAppropriateMaterial( aBlock, diff --git a/src/main/java/gregtech/common/tools/ToolMortar.java b/src/main/java/gregtech/common/tools/ToolMortar.java index e67e5924de6..c7223807ccc 100644 --- a/src/main/java/gregtech/common/tools/ToolMortar.java +++ b/src/main/java/gregtech/common/tools/ToolMortar.java @@ -85,7 +85,7 @@ public boolean isMiningTool() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolPlunger.java b/src/main/java/gregtech/common/tools/ToolPlunger.java index 5cb9bcff482..422825833fe 100644 --- a/src/main/java/gregtech/common/tools/ToolPlunger.java +++ b/src/main/java/gregtech/common/tools/ToolPlunger.java @@ -45,7 +45,7 @@ public String getMiningSound() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "plunger"); } diff --git a/src/main/java/gregtech/common/tools/ToolRollingPin.java b/src/main/java/gregtech/common/tools/ToolRollingPin.java index 1af17f3072b..4e7cb251600 100644 --- a/src/main/java/gregtech/common/tools/ToolRollingPin.java +++ b/src/main/java/gregtech/common/tools/ToolRollingPin.java @@ -40,7 +40,7 @@ public float getBaseDamage() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolSaw.java b/src/main/java/gregtech/common/tools/ToolSaw.java index ca1ec81b137..78942744cf1 100644 --- a/src/main/java/gregtech/common/tools/ToolSaw.java +++ b/src/main/java/gregtech/common/tools/ToolSaw.java @@ -79,7 +79,7 @@ public String getMiningSound() { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { @@ -101,7 +101,7 @@ public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPla } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "axe", "saw") || GTToolHarvestHelper.isAppropriateMaterial( aBlock, diff --git a/src/main/java/gregtech/common/tools/ToolScoop.java b/src/main/java/gregtech/common/tools/ToolScoop.java index 6f740da95eb..1ab4c0f9fcf 100644 --- a/src/main/java/gregtech/common/tools/ToolScoop.java +++ b/src/main/java/gregtech/common/tools/ToolScoop.java @@ -87,7 +87,7 @@ public boolean isCrowbar() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "scoop") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, sBeeHiveMaterial); } diff --git a/src/main/java/gregtech/common/tools/ToolScrewdriver.java b/src/main/java/gregtech/common/tools/ToolScrewdriver.java index b73f1371aab..6c772842d5a 100644 --- a/src/main/java/gregtech/common/tools/ToolScrewdriver.java +++ b/src/main/java/gregtech/common/tools/ToolScrewdriver.java @@ -117,7 +117,7 @@ public boolean isScrewdriver() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "screwdriver") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } diff --git a/src/main/java/gregtech/common/tools/ToolSoftHammer.java b/src/main/java/gregtech/common/tools/ToolSoftHammer.java index 0cd3aa2eac6..9e812b59f1e 100644 --- a/src/main/java/gregtech/common/tools/ToolSoftHammer.java +++ b/src/main/java/gregtech/common/tools/ToolSoftHammer.java @@ -97,7 +97,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "softhammer"); } diff --git a/src/main/java/gregtech/common/tools/ToolSolderingIron.java b/src/main/java/gregtech/common/tools/ToolSolderingIron.java index 9ae4fade4c7..b00e97bee63 100644 --- a/src/main/java/gregtech/common/tools/ToolSolderingIron.java +++ b/src/main/java/gregtech/common/tools/ToolSolderingIron.java @@ -112,7 +112,7 @@ public boolean isMiningTool() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "soldering_iron") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } diff --git a/src/main/java/gregtech/common/tools/ToolTurbine.java b/src/main/java/gregtech/common/tools/ToolTurbine.java index ace22b06bac..ceb2eb6df20 100644 --- a/src/main/java/gregtech/common/tools/ToolTurbine.java +++ b/src/main/java/gregtech/common/tools/ToolTurbine.java @@ -16,7 +16,7 @@ public abstract class ToolTurbine extends GTTool { public abstract float getBaseDamage(); @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolWireCutter.java b/src/main/java/gregtech/common/tools/ToolWireCutter.java index 6009504d804..edbf21c3b93 100644 --- a/src/main/java/gregtech/common/tools/ToolWireCutter.java +++ b/src/main/java/gregtech/common/tools/ToolWireCutter.java @@ -81,7 +81,7 @@ public boolean isCrowbar() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "cutter"); } diff --git a/src/main/java/gregtech/common/tools/ToolWrench.java b/src/main/java/gregtech/common/tools/ToolWrench.java index 3d2adf48962..cbab13b401e 100644 --- a/src/main/java/gregtech/common/tools/ToolWrench.java +++ b/src/main/java/gregtech/common/tools/ToolWrench.java @@ -126,7 +126,7 @@ public boolean isWrench() { } @Override - public boolean isMinableBlock(Block block, byte aMetaData) { + public boolean isMinableBlock(Block block, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(block, aMetaData, "wrench") || GTToolHarvestHelper.isAppropriateMaterial(block, Material.piston) || block instanceof AEBaseTileBlock @@ -194,7 +194,7 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase private boolean LastEventFromThis = false; @Override - public void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, byte metadata, + public void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, int metadata, TileEntity tile, @Nonnull BlockEvent.BreakEvent event) { if (tile instanceof IWrenchable wrenchable) { if (!wrenchable.wrenchCanRemove(player)) { @@ -246,7 +246,7 @@ public void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Non @Override public int convertBlockDrops(List drops, ItemStack Stack, EntityPlayer player, Block block, int x, int y, - int z, byte metaData, int fortune, boolean silkTouch, BlockEvent.HarvestDropsEvent event) { + int z, int metaData, int fortune, boolean silkTouch, BlockEvent.HarvestDropsEvent event) { ItemStack drop = null; int modified = 0; if (wrenchableDrop != null) { diff --git a/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java b/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java index e55671d486f..e4cc20be246 100644 --- a/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java +++ b/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java @@ -44,7 +44,7 @@ public float getBaseDamage() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } } diff --git a/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java b/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java index d2a1e34f99d..d8b04fc2463 100644 --- a/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java +++ b/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java @@ -110,22 +110,22 @@ default IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(ForgeDirecti } @Override - default byte getMetaID(int arg0, int arg1, int arg2) { + default int getMetaID(int arg0, int arg1, int arg2) { return 0; } @Override - default byte getMetaIDOffset(int arg0, int arg1, int arg2) { + default int getMetaIDOffset(int arg0, int arg1, int arg2) { return 0; } @Override - default byte getMetaIDAtSide(ForgeDirection side) { + default int getMetaIDAtSide(ForgeDirection side) { return 0; } @Override - default byte getMetaIDAtSideAndDistance(ForgeDirection side, int arg1) { + default int getMetaIDAtSideAndDistance(ForgeDirection side, int arg1) { return 0; } diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java index 811fb0cab13..6641a249272 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java @@ -567,17 +567,17 @@ public final Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance) } @Override - public final byte getMetaIDOffset(int aX, int aY, int aZ) { + public final int getMetaIDOffset(int aX, int aY, int aZ) { return this.getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); } @Override - public final byte getMetaIDAtSide(ForgeDirection side) { + public final int getMetaIDAtSide(ForgeDirection side) { return this.getMetaIDAtSideAndDistance(side, 1); } @Override - public final byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) { + public final int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) { return this.getMetaID( this.getOffsetX(side, aDistance), this.getOffsetY(side, aDistance), @@ -750,10 +750,10 @@ public final Block getBlock(int aX, int aY, int aZ) { } @Override - public final byte getMetaID(int aX, int aY, int aZ) { + public final int getMetaID(int aX, int aY, int aZ) { return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) ? 0 - : (byte) this.worldObj.getBlockMetadata(aX, aY, aZ); + : this.worldObj.getBlockMetadata(aX, aY, aZ); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java index 1a61814f559..5e37c0cb649 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java @@ -156,7 +156,7 @@ public interface IToolStats extends gregtech.api.interfaces.IToolStats { * check. */ @Override - boolean isMinableBlock(Block aBlock, byte aMetaData); + boolean isMinableBlock(Block aBlock, int aMetaData); /** * This lets you modify the Drop List, when this type of Tool has been used. @@ -165,7 +165,7 @@ public interface IToolStats extends gregtech.api.interfaces.IToolStats { */ @Override int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, - int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java index f47ef56e9a9..f1efe117a59 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java @@ -78,7 +78,7 @@ public GTMetaTool(final String aUnlocalized) { */ @Override public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, - final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, + final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final int aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { final gregtech.api.interfaces.IToolStats tStats = this.getToolStats(aStack); if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { @@ -441,7 +441,7 @@ public float getDigSpeed(final ItemStack aStack, final Block aBlock, final int a if ((tStats == null) || (Math.max(0, this.getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))) { return 0.0F; } - return tStats.isMinableBlock(aBlock, (byte) aMetaData) + return tStats.isMinableBlock(aBlock, aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index d68653e73af..63b0357d1b2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -45,10 +45,10 @@ public GregtechMetaCasingBlocks4() { @Override public IIcon getIcon(final int ordinalSide, final int aMeta) { - return getStaticIcon((byte) ordinalSide, (byte) aMeta); + return getStaticIcon((byte) ordinalSide, aMeta); } - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + public static IIcon getStaticIcon(final byte aSide, final int aMeta) { // Texture ID's. case 0 == ID[57] if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index 38d9146e65d..a6ec678456b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -86,10 +86,10 @@ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoo @Override public IIcon getIcon(final int ordinalSide, final int aMeta) { - return getStaticIcon((byte) ordinalSide, (byte) aMeta); + return getStaticIcon((byte) ordinalSide, aMeta); } - public static IIcon getStaticIcon(final int ordinalSide, final byte aMeta) { + public static IIcon getStaticIcon(final int ordinalSide, final int aMeta) { return switch (aMeta) { case 0 -> TexturesGtBlock.Casing_Redox_1.getIcon(); case 1 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STEEL.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java index 4f348112895..39ac2184410 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java @@ -75,15 +75,15 @@ public GregtechMetaSpecialMultiCasings2() { @SideOnly(Side.CLIENT) public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int ordinalSide) { - return getStaticIcon((byte) ordinalSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); + return getStaticIcon((byte) ordinalSide, aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); } @Override public IIcon getIcon(final int ordinalSide, final int aMeta) { - return getStaticIcon((byte) ordinalSide, (byte) aMeta); + return getStaticIcon((byte) ordinalSide, aMeta); } - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + public static IIcon getStaticIcon(final byte aSide, final int aMeta) { return switch (aMeta) { case 0 -> TexturesGtBlock.Casing_Resonance_1.getIcon(); case 1 -> TexturesGtBlock.Casing_Resonance_2.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java index cf300f9f3d6..080ea972d6f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java @@ -133,7 +133,7 @@ public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final ForgeDirection side, final GregtechMetaSpecialMultiCasings i) { final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), (byte) tMeta); + return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), tMeta); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java index 0f9fa3497e7..2533249734a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java @@ -303,7 +303,6 @@ public boolean checkForWater() { for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { for (int h = 0; h < 2; ++h) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water) { if (this.getStoredFluids() != null) { for (FluidStack stored : this.getStoredFluids()) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java index d98e53e2da4..93f2e92bd95 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java @@ -316,7 +316,7 @@ private boolean checkForWater() { for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { for (int h = 0; h < 2; h++) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); if (isNotStaticWater(tBlock, tMeta)) { if (this.getStoredFluids() != null) { for (FluidStack stored : this.getStoredFluids()) { @@ -350,7 +350,7 @@ private boolean checkForWater() { return tAmount >= 60; } - private boolean isNotStaticWater(Block block, byte meta) { + private boolean isNotStaticWater(Block block, int meta) { return block == Blocks.air || block == Blocks.flowing_water || block == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater) || (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java index 779148199e4..e6a70c320ba 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java @@ -262,7 +262,7 @@ public boolean checkForWater() { for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { for (int h = 0; h < 2; h++) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); if (isNotStaticWater(tBlock, tMeta)) { if (this.getStoredFluids() != null) { for (FluidStack stored : this.getStoredFluids()) { @@ -301,7 +301,7 @@ public boolean checkForWater() { } } - private boolean isNotStaticWater(Block block, byte meta) { + private boolean isNotStaticWater(Block block, int meta) { return block == Blocks.air || block == Blocks.flowing_water || block == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater) || (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index 492cb11081e..d84ec31cf24 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -166,7 +166,7 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye private void checkMachineProblem(String msg, int xOff, int yOff, int zOff) { final IGregTechTileEntity te = this.getBaseMetaTileEntity(); final Block tBlock = te.getBlockOffset(xOff, yOff, zOff); - final byte tMeta = te.getMetaIDOffset(xOff, yOff, zOff); + final int tMeta = te.getMetaIDOffset(xOff, yOff, zOff); String name = tBlock.getLocalizedName(); String problem = msg + ": (" + xOff + ", " + yOff + ", " + zOff + ") " + name + ":" + tMeta; checkMachineProblem(problem); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java index fceebe62d37..4e0510bf333 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java @@ -380,7 +380,7 @@ public Block getBlockAtSide(ForgeDirection side) { } @Override - public byte getMetaIDAtSide(ForgeDirection side) { + public int getMetaIDAtSide(ForgeDirection side) { return getBaseMetaTileEntity().getMetaIDAtSide(side); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java index f65b3162f8a..65d2fa09152 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java @@ -115,14 +115,14 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { + public boolean isMinableBlock(final Block aBlock, final int aMetaData) { final String tTool = aBlock.getHarvestTool(aMetaData); return (tTool != null) && (tTool.equals("sword") || tTool.equals("file")); } @Override public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, - final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, + final Block aBlock, final int aX, final int aY, final int aZ, final int aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { return 0; }