diff --git a/dependencies.gradle b/dependencies.gradle index 33477cb7ddc..8231ca19770 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -40,9 +40,9 @@ dependencies { api("com.github.GTNewHorizons:NotEnoughIds:2.1.6:dev") api("com.github.GTNewHorizons:GTNHLib:0.5.11:dev") api("com.github.GTNewHorizons:ModularUI:1.2.8:dev") - api("com.github.GTNewHorizons:ModularUI2:2.1.10-1.7.10:dev") + api("com.github.GTNewHorizons:ModularUI2:2.1.11-1.7.10:dev") api("com.github.GTNewHorizons:waila:1.8.1:dev") - api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-462-GTNH:dev") + api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-463-GTNH:dev") api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.36-gtnh:dev") api('com.github.GTNewHorizons:Yamcl:0.6.0:dev') api("com.github.GTNewHorizons:Postea:1.0.13:dev") @@ -69,18 +69,18 @@ dependencies { compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.27:deobf") {transitive = false} compileOnly("com.github.GTNewHorizons:ThaumicBases:1.7.5:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false } - compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.22:dev') { transitive = false } + compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.24:dev') { transitive = false } compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.94-GTNH:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.2.4-GTNH:dev") { transitive = false } - implementation("com.github.GTNewHorizons:TinkersConstruct:1.12.9-GTNH:dev") + compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.2.5-GTNH:dev") { transitive = false } + implementation("com.github.GTNewHorizons:TinkersConstruct:1.12.10-GTNH:dev") compileOnly("com.github.GTNewHorizons:Chisel:2.15.2-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:Translocators:1.2.1:dev") { transitive = false } compileOnly rfg.deobf("curse.maven:cofh-core-69162:2388751") compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.6.7:dev") { transitive = false } compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } - implementation("com.github.GTNewHorizons:Hodgepodge:2.5.69:dev") + implementation("com.github.GTNewHorizons:Hodgepodge:2.5.70:dev") compileOnly('com.github.GTNewHorizons:Botania:1.11.5-GTNH:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:HoloInventory:2.4.12-GTNH:dev') { transitive = false } compileOnly rfg.deobf("curse.maven:extra-utilities-225561:2264384") diff --git a/src/main/java/goodgenerator/loader/RecipeLoader2.java b/src/main/java/goodgenerator/loader/RecipeLoader2.java index 1c4c05948da..707c6fc11ac 100644 --- a/src/main/java/goodgenerator/loader/RecipeLoader2.java +++ b/src/main/java/goodgenerator/loader/RecipeLoader2.java @@ -108,7 +108,7 @@ public static void RecipeLoad() { CrackRecipeAdder.reAddBlastRecipe(GGMaterial.zircaloy2, 513, 480, 2800, false); CrackRecipeAdder.reAddBlastRecipe(GGMaterial.zircaloy4, 500, 480, 2800, true); CrackRecipeAdder.reAddBlastRecipe(GGMaterial.zircaloy4, 513, 480, 2800, false); - CrackRecipeAdder.reAddBlastRecipe(GGMaterial.incoloy903, 2400, 1920, 3700, true); + CrackRecipeAdder.reAddBlastRecipe(GGMaterial.incoloy903, 1200, 1920, 3700, true); CrackRecipeAdder.reAddBlastRecipe(GGMaterial.adamantiumAlloy, 2500, 1920, 5500, true); CrackRecipeAdder.reAddBlastRecipe(GGMaterial.marM200, 200, 7680, 5000, true); CrackRecipeAdder.reAddBlastRecipe(GGMaterial.marM200, 220, 7680, 5000, false); diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java index 1122eaf869e..c1f8afffebd 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java @@ -2,6 +2,8 @@ import static gregtech.api.util.GTRecipeBuilder.ENABLE_COLLISION_CHECK; import static gregtech.api.util.GTRecipeBuilder.handleInvalidRecipe; +import static gregtech.api.util.GTRecipeBuilder.handleInvalidRecipeLowFluids; +import static gregtech.api.util.GTRecipeBuilder.handleInvalidRecipeLowItems; import static gregtech.api.util.GTRecipeBuilder.handleRecipeCollision; import static gregtech.api.util.GTUtility.areStacksEqualOrNull; @@ -172,14 +174,21 @@ protected Collection doAdd(GTRecipeBuilder builder) { Iterable recipes = properties.recipeEmitter.apply(builder); Collection ret = new ArrayList<>(); for (GTRecipe recipe : recipes) { - if (recipe.mFluidInputs.length < properties.minFluidInputs - || recipe.mInputs.length < properties.minItemInputs) { + if (recipe.mInputs.length < properties.minItemInputs) { + handleInvalidRecipeLowItems(); + return Collections.emptyList(); + } + if (recipe.mFluidInputs.length < properties.minFluidInputs) { + handleInvalidRecipeLowFluids(); return Collections.emptyList(); } if (properties.recipeTransformer != null) { recipe = properties.recipeTransformer.apply(recipe); } - if (recipe == null) continue; + if (recipe == null) { + handleInvalidRecipe(); + continue; + } if (builder.isCheckForCollision() && ENABLE_COLLISION_CHECK && checkCollision(recipe)) { handleCollision(recipe); continue; diff --git a/src/main/java/gregtech/api/util/GTRecipeBuilder.java b/src/main/java/gregtech/api/util/GTRecipeBuilder.java index 1426c1c2648..69890e564df 100644 --- a/src/main/java/gregtech/api/util/GTRecipeBuilder.java +++ b/src/main/java/gregtech/api/util/GTRecipeBuilder.java @@ -211,6 +211,30 @@ public static void handleInvalidRecipe() { } } + public static void handleInvalidRecipeLowFluids() { + if (!DEBUG_MODE_INVALID && !PANIC_MODE_INVALID) { + return; + } + // place a breakpoint here to catch all these issues + GTLog.err.println("invalid recipe: not enough input fluids"); + new IllegalArgumentException().printStackTrace(GTLog.err); + if (PANIC_MODE_INVALID) { + throw new IllegalArgumentException("invalid recipe"); + } + } + + public static void handleInvalidRecipeLowItems() { + if (!DEBUG_MODE_INVALID && !PANIC_MODE_INVALID) { + return; + } + // place a breakpoint here to catch all these issues + GTLog.err.println("invalid recipe: not enough input items"); + new IllegalArgumentException().printStackTrace(GTLog.err); + if (PANIC_MODE_INVALID) { + throw new IllegalArgumentException("invalid recipe"); + } + } + public static void handleRecipeCollision(String details) { if (!DEBUG_MODE_COLLISION && !PANIC_MODE_COLLISION) { return; diff --git a/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java b/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java index c546d2114e7..70416c82ef4 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java +++ b/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java @@ -29,7 +29,6 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.minecraft.CubicObject; import gtPlusPlus.api.objects.minecraft.SafeTexture; -import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.InventoryUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; @@ -64,28 +63,28 @@ public Class getItemBlockClass() { } /** - * A lazy way to declare the unlocal name for the block, makes boilerplating easy. + * A lazy way to declare the unlocal name for the block, makes boilerplate easy. * * @return The internal name for this block. */ public abstract String getUnlocalBlockName(); /** - * Lazy Boilerplating. + * Lazy Boilerplate. * * @return Block Hardness. */ protected abstract float initBlockHardness(); /** - * Lazy Boilerplating. + * Lazy Boilerplate. * * @return Block Resistance. */ protected abstract float initBlockResistance(); /** - * Lazy Boilerplating. + * Lazy Boilerplate. * * @return The {@link CreativeTab} this Block is shown on. */ @@ -131,7 +130,7 @@ private String getTileEntityNameForTexturePathing() { /** * An array of CubicObjects, one for each meta, else just a single cell array. Expected to be null regularly, as the * default texture handling should suffice. Handy if re-using textures or using a non-standard structure for them. - * FULL texture path must be used, inclusive of the MODID and a colon. + * FULL texture path must be used, inclusive of the MOD ID and a colon. */ public CubicObject[] getCustomTextureDirectoryObject() { return null; @@ -155,24 +154,14 @@ private void handleTextures() { Logger.INFO("[TeTexture] Building Texture Maps for " + getTileEntityName() + "."); - // Init on the Client side only, to prevent Field initialisers existing in the Server side bytecode. + // Init on the Client side only, to prevent Field initializers existing in the Server side bytecode. mSidedTextureArray = new ArrayList<>(); - /** - * Holds the data for the six sides, each side holds an array of data for each respective meta. - */ + // Holds the data for the six sides, each side holds an array of data for each respective meta. ArrayList> sidedTexturePathArray = new ArrayList<>(); - // Store them in forge order // DOWN, UP, NORTH, SOUTH, WEST, EAST - // Default Path Name, this will make us look inside 'miscutils\textures\blocks' - final String aPrefixTexPath = GTPlusPlus.ID + ":"; - // Default Path Name, this will make us look in the subdirectory for this Tile Entity. - final String aTexPathMid = "TileEntities" + GTPPCore.SEPERATOR - + getTileEntityNameForTexturePathing() - + GTPPCore.SEPERATOR; - // Construct a full path - String aTexPathBuilt = aPrefixTexPath + aTexPathMid; + String aTexPathBuilt = GTPlusPlus.ID + ":TileEntities/" + getTileEntityNameForTexturePathing() + "/"; // File Name Suffixes, without meta tags String aStringBot; String aStringTop; diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java index 6772b71262f..7629de4eb59 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java @@ -61,8 +61,8 @@ public IIcon getIcon(int ordinalSide, int meta) { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister icon) { - this.textureArray[0] = icon.registerIcon(GTPlusPlus.ID + ":" + "fluid/" + "Fluid_" + this.name + "_Still"); - this.textureArray[1] = icon.registerIcon(GTPlusPlus.ID + ":" + "fluid/" + "Fluid_" + this.name + "_Flow"); + this.textureArray[0] = icon.registerIcon(GTPlusPlus.ID + ":fluid/Fluid_" + this.name + "_Still"); + this.textureArray[1] = icon.registerIcon(GTPlusPlus.ID + ":fluid/Fluid_" + this.name + "_Flow"); } @Override diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java index 7ba3e7e4746..bc4f4b25a6a 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -122,7 +122,6 @@ public void harvestBlock(World worldIn, EntityPlayer player, int x, int y, int z if (EnchantmentHelper.getSilkTouchModifier(player)) { shouldSilkTouch = true; super.harvestBlock(worldIn, player, x, y, z, meta); - if (shouldSilkTouch) { shouldSilkTouch = false; } @@ -145,12 +144,9 @@ public ArrayList getDrops(World world, int x, int y, int z, int metad drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); } else { switch (GTMod.gregtechproxy.oreDropSystem) { - case Item -> { - drops.add( - ItemUtils.getItemStackOfAmountFromOreDictNoBroken( - "oreRaw" + this.blockMaterial.getLocalizedName(), - 1)); - } + case Item -> drops.add( + ItemUtils + .getItemStackOfAmountFromOreDictNoBroken("oreRaw" + this.blockMaterial.getLocalizedName(), 1)); case FortuneItem -> { // if shouldFortune and isNatural then get fortune drops // if not shouldFortune or not isNatural then get normal drops @@ -174,18 +170,12 @@ public ArrayList getDrops(World world, int x, int y, int z, int metad 1)); } } - case UnifiedBlock -> { - // Unified ore - drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); - } - case PerDimBlock -> { - // Per Dimension ore - drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); - } - case Block -> { - // Regular ore - drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); - } + // Unified ore + case UnifiedBlock -> drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); + // Per Dimension ore + case PerDimBlock -> drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); + // Regular ore + case Block -> drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); } } return drops; diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java index 0c353cfbddc..07e6d3324f4 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java @@ -23,7 +23,7 @@ public class BlockCompressedObsidian extends BlockObsidian { - private final IIcon textureArray[] = new IIcon[11]; + private final IIcon[] textureArray = new IIcon[11]; public BlockCompressedObsidian() { this.setBlockName("blockCompressedObsidian"); @@ -49,17 +49,17 @@ public MapColor getMapColor(final int meta) { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister iicon) { - this.textureArray[0] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "obsidian1"); - this.textureArray[1] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "obsidian2"); - this.textureArray[2] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "obsidian3"); - this.textureArray[3] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "obsidian4"); - this.textureArray[4] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "obsidian5"); - this.textureArray[5] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "obsidian_invert"); - this.textureArray[6] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "glowstone1"); - this.textureArray[7] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "glowstone2"); - this.textureArray[8] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "glowstone3"); - this.textureArray[9] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "glowstone4"); - this.textureArray[10] = iicon.registerIcon(GTPlusPlus.ID + ":" + "compressed/" + "glowstone5"); + this.textureArray[0] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/obsidian1"); + this.textureArray[1] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/obsidian2"); + this.textureArray[2] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/obsidian3"); + this.textureArray[3] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/obsidian4"); + this.textureArray[4] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/obsidian5"); + this.textureArray[5] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/obsidian_invert"); + this.textureArray[6] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/glowstone1"); + this.textureArray[7] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/glowstone2"); + this.textureArray[8] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/glowstone3"); + this.textureArray[9] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/glowstone4"); + this.textureArray[10] = iicon.registerIcon(GTPlusPlus.ID + ":compressed/glowstone5"); } /** diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockFluidTankInfinite.java b/src/main/java/gtPlusPlus/core/block/general/BlockFluidTankInfinite.java index a300b835771..2e884fda964 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockFluidTankInfinite.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockFluidTankInfinite.java @@ -14,7 +14,6 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import net.minecraftforge.fluids.ItemFluidContainer; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -55,12 +54,10 @@ public IIcon getIcon(final int ordinalSide, final int meta) { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - this.textureBottom = p_149651_1_ - .registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - this.textureFront = p_149651_1_ - .registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "Generic_Creative_Texture"); + this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/Generic_Creative_Texture"); + this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/Generic_Creative_Texture"); + this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/Generic_Creative_Texture"); + this.textureFront = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/Generic_Creative_Texture"); } /** @@ -81,9 +78,8 @@ public boolean onBlockActivated(final World world, final int x, final int y, fin } catch (Throwable t) { handItem = null; } - if (handItem != null - && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer - || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) { + if (handItem != null && (handItem instanceof IFluidContainerItem + || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) { if (tank.tank.getFluid() == null) { try { if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())) { diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockHellFire.java b/src/main/java/gtPlusPlus/core/block/general/BlockHellFire.java index b18a2d4b861..1a6549e758c 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockHellFire.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockHellFire.java @@ -30,6 +30,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.objects.XSTR; +import gregtech.api.util.GTLog; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.util.math.MathUtils; @@ -68,8 +69,8 @@ private void enableBrutalFire() { } } - } catch (Throwable t) { - t.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(GTLog.err); } } @@ -250,7 +251,7 @@ private int getChanceOfNeighborsEncouragingFire(final World world, final int x, } /** - * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z + * Checks to see if it is valid to put this block at the specified coordinates. Args: world, x, y, z */ @Override public boolean canPlaceBlockAt(final World worldObj, final int x, final int y, final int z) { @@ -398,9 +399,8 @@ public void randomDisplayTick(final World world, final int x, final int y, final @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister IIconRegister) { - this.IIconArray = new IIcon[] { - IIconRegister.registerIcon(GTPlusPlus.ID + ":" + "hellfire/" + "blockHellFire" + "_layer_0"), - IIconRegister.registerIcon(GTPlusPlus.ID + ":" + "hellfire/" + "blockHellFire" + "_layer_1") }; + this.IIconArray = new IIcon[] { IIconRegister.registerIcon(GTPlusPlus.ID + ":hellfire/blockHellFire_layer_0"), + IIconRegister.registerIcon(GTPlusPlus.ID + ":hellfire/blockHellFire_layer_1") }; } @Override @@ -429,13 +429,13 @@ public MapColor getMapColor(final int p_149728_1_) { private static class FireInfo { private int encouragement = 0; - private int flammibility = 0; + private int flammability = 0; } private final IdentityHashMap blockInfo = Maps.newIdentityHashMap(); @Override - public void setFireInfo(final Block block, final int encouragement, final int flammibility) { + public void setFireInfo(final Block block, final int encouragement, final int flammability) { try { if (block == Blocks.air) { throw new IllegalArgumentException("Tried to set air on fire... This is bad."); @@ -445,17 +445,19 @@ public void setFireInfo(final Block block, final int encouragement, final int fl return; } this.field_149849_a[id] = encouragement; - this.field_149848_b[id] = flammibility; + this.field_149848_b[id] = flammability; - final FireInfo info = this.getInfo(block, true); + final FireInfo info = this.getInfo(block); info.encouragement = encouragement; - info.flammibility = flammibility; - } catch (Throwable t) {} + info.flammability = flammability; + } catch (Exception e) { + e.printStackTrace(GTLog.err); + } } - private FireInfo getInfo(final Block block, final boolean garentee) { + private FireInfo getInfo(final Block block) { FireInfo ret = this.blockInfo.get(block); - if ((ret == null) && garentee) { + if (ret == null) { ret = new FireInfo(); this.blockInfo.put(block, ret); } @@ -465,10 +467,10 @@ private FireInfo getInfo(final Block block, final boolean garentee) { @Override public void rebuildFireInfo() { for (int x = 0; x < 4096; x++) { - // If we care.. we could detect changes in here and make sure we + // If we care... we could detect changes in here and make sure we // keep them, however // it's my thinking that anyone who hacks into the private variables - // should DIAF and we don't care about them. + // should reconsider, and we don't care about them. this.field_149849_a[x] = 0; this.field_149848_b[x] = 0; } @@ -477,7 +479,7 @@ public void rebuildFireInfo() { final int id = Block.getIdFromBlock(e.getKey()); if ((id >= 0) && (id < 4096)) { this.field_149849_a[id] = e.getValue().encouragement; - this.field_149848_b[id] = e.getValue().flammibility; + this.field_149848_b[id] = e.getValue().flammability; } } } @@ -527,7 +529,7 @@ public int getChanceToEncourageFire(final IBlockAccess world, final int x, final final int oldChance, final ForgeDirection face) { final int newChance = world.getBlock(x, y, z) .getFireSpreadSpeed(world, x, y, z, face); - return (newChance > oldChance ? newChance : oldChance); + return Math.max(newChance, oldChance); } /* * ================================= Forge Start ====================================== diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockLightGlass.java b/src/main/java/gtPlusPlus/core/block/general/BlockLightGlass.java index 1e4df5c3994..097d5d8a5e7 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockLightGlass.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockLightGlass.java @@ -23,11 +23,10 @@ public class BlockLightGlass extends BlockAir { private int state = 0; - private final int a = 255; private int r = 255; private int g = 0; private int b = 0; - private int hex; + private final int a = 255; public BlockLightGlass(final boolean bool) { super(); @@ -35,7 +34,7 @@ public BlockLightGlass(final boolean bool) { this.setBlockName("blockMFEffect"); this.setLightLevel(12F); setHardness(0.1F); - setBlockTextureName(GTPlusPlus.ID + ":" + "blockMFEffect"); + setBlockTextureName(GTPlusPlus.ID + ":blockMFEffect"); setStepSound(Block.soundTypeGlass); GameRegistry.registerBlock(this, "blockMFEffect"); @@ -78,7 +77,7 @@ protected boolean canSilkHarvest() { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister iIcon) { - this.blockIcon = iIcon.registerIcon(GTPlusPlus.ID + ":" + "blockMFEffect"); + this.blockIcon = iIcon.registerIcon(GTPlusPlus.ID + ":blockMFEffect"); } @Override @@ -120,8 +119,7 @@ public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, this.state = 0; } } - this.hex = (this.a << 24) + (this.r << 16) + (this.g << 8) + (this.b); - return this.hex; + return (this.r << 16) + (this.g << 8) + (this.b) + (this.a << 24); } /** diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockMiningExplosives.java b/src/main/java/gtPlusPlus/core/block/general/BlockMiningExplosives.java index 20b6fff9e60..3aec9ef4279 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockMiningExplosives.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockMiningExplosives.java @@ -2,8 +2,6 @@ import static gregtech.api.enums.Mods.GTPlusPlus; -import java.util.Random; - import net.minecraft.block.Block; import net.minecraft.block.BlockTNT; import net.minecraft.client.renderer.texture.IIconRegister; @@ -71,14 +69,6 @@ public void onNeighborBlockChange(final World world, final int x, final int y, f } } - /** - * Returns the quantity of items to drop on block destruction. - */ - @Override - public int quantityDropped(final Random random) { - return 1; - } - /** * Called upon the block being destroyed by an explosion */ @@ -103,7 +93,7 @@ public void onBlockDestroyedByExplosion(final World world, final int x, final in */ @Override public void onBlockDestroyedByPlayer(final World world, final int x, final int y, final int z, final int meta) { - this.func_150114_a(world, x, y, z, meta, (EntityLivingBase) null); + this.func_150114_a(world, x, y, z, meta, null); } // TODO Spawns Primed TNT? @@ -175,19 +165,11 @@ public void onEntityCollidedWithBlock(final World world, final int x, final int } } - /** - * Return whether this block can drop from an explosion. - */ - @Override - public boolean canDropFromExplosion(final Explosion bang) { - return false; - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister iconRegister) { - this.blockIcon = iconRegister.registerIcon(GTPlusPlus.ID + ":" + "chrono/" + "MetalSheet2"); - this.textureTop = iconRegister.registerIcon(GTPlusPlus.ID + ":" + "chrono/" + "MetalFunnel"); - this.textureBottom = iconRegister.registerIcon(GTPlusPlus.ID + ":" + "chrono/" + "MetalPanel"); + this.blockIcon = iconRegister.registerIcon(GTPlusPlus.ID + ":chrono/MetalSheet2"); + this.textureTop = iconRegister.registerIcon(GTPlusPlus.ID + ":chrono/MetalFunnel"); + this.textureBottom = iconRegister.registerIcon(GTPlusPlus.ID + ":chrono/MetalPanel"); } } diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java index e12e8292603..f11c3d9a9b6 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java @@ -47,7 +47,7 @@ public IIcon getIcon(final int ordinalSide, final int meta) { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "SwirlBigBlue"); + this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":SwirlBigBlue"); } /** diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockCircuitProgrammer.java b/src/main/java/gtPlusPlus/core/block/machine/BlockCircuitProgrammer.java index 191a2a8f922..dcbe41f150d 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockCircuitProgrammer.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockCircuitProgrammer.java @@ -13,6 +13,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import gregtech.api.util.GTLog; import gregtech.common.items.MetaGeneratedTool01; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.minecraft.CubicObject; @@ -27,7 +28,7 @@ public class BlockCircuitProgrammer extends BasicTileBlockWithTooltip { /** * Determines which tooltip is displayed within the itemblock. */ - private final int mTooltipID = 4; + private final int mTooltipID = 2; @Override public int getTooltipID() { @@ -39,7 +40,7 @@ public BlockCircuitProgrammer() { } /** - * Called upon block activation (right click on the block.) + * Called upon block activation (right-click on the block.) */ @Override public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, @@ -60,11 +61,12 @@ public boolean onBlockActivated(final World world, final int x, final int y, fin mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); } } - } catch (final Throwable t) {} - + } catch (Exception e) { + e.printStackTrace(GTLog.err); + } if (!mDidScrewDriver) { final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityCircuitProgrammer)) { + if (te instanceof TileEntityCircuitProgrammer) { player.openGui(GTplusplus.instance, GuiHandler.GUI8, world, x, y, z); return true; } @@ -141,12 +143,10 @@ protected String getTileEntityName() { @Override public CubicObject[] getCustomTextureDirectoryObject() { - String[] aTexData = new String[] { GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_G", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_TECH_PANEL_B", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I" }; + String[] aTexData = new String[] { GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_H", + GTPlusPlus.ID + ":metro/TEXTURE_TECH_PANEL_B", GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_I", + GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_I", GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_I", + GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_I" }; CubicObject[] aTextureData = new CubicObject[] { new CubicObject<>(aTexData) }; return aTextureData; } diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java b/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java index 7b42f08fa81..67ad10bb692 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java @@ -36,12 +36,12 @@ public class BlockDecayablesChest extends BlockContainer implements ITileTooltip private IIcon textureBottom; @SideOnly(Side.CLIENT) - private IIcon textureFront; + private IIcon textureSide; /** * Determines which tooltip is displayed within the itemblock. */ - private final int mTooltipID = 5; + private final int mTooltipID = 3; @Override public int getTooltipID() { @@ -118,17 +118,17 @@ public IIcon getIcon(final int ordinalSide, final int meta) { return switch (ordinalSide) { case 0 -> textureBottom; case 1 -> textureTop; - default -> textureFront; + default -> textureSide; }; } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "DecayablesChest_top"); - this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "DecayablesChest_top"); - this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "DecayablesChest_side"); - this.textureFront = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "DecayablesChest_bottom"); + this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/DecayablesChest_top"); + this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/DecayablesChest_top"); + this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/DecayablesChest_bottom"); + this.textureSide = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/DecayablesChest_Side"); } @Override diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockFishTrap.java b/src/main/java/gtPlusPlus/core/block/machine/BlockFishTrap.java index 0a91c76d605..cf54a044e6f 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockFishTrap.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockFishTrap.java @@ -27,19 +27,10 @@ public class BlockFishTrap extends BlockContainer implements ITileTooltip { - @SideOnly(Side.CLIENT) - private IIcon textureTop; - - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - - @SideOnly(Side.CLIENT) - private IIcon textureFront; - /** * Determines which tooltip is displayed within the itemblock. */ - private final int mTooltipID = 0; + private final int mTooltipID = 1; @Override public int getTooltipID() { @@ -61,22 +52,20 @@ public BlockFishTrap() { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(final int ordinalSide, final int meta) { - return ordinalSide == 1 ? this.textureTop - : (ordinalSide == 0 ? this.textureBottom - : ((ordinalSide != 2) && (ordinalSide != 4) ? this.blockIcon : this.textureFront)); + return this.blockIcon; } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "fishtrap"); - this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "fishtrap"); - this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "fishtrap"); - this.textureFront = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "fishtrap"); + this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/fishtrap"); + p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/fishtrap"); + p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/fishtrap"); + p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/fishtrap"); } /** - * Called upon block activation (right click on the block.) + * Called upon block activation (right-click on the block.) */ @Override public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, @@ -86,7 +75,7 @@ public boolean onBlockActivated(final World world, final int x, final int y, fin } final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityFishTrap)) { + if (te instanceof TileEntityFishTrap) { player.openGui(GTplusplus.instance, 5, world, x, y, z); return true; } diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockFlaskSetter.java b/src/main/java/gtPlusPlus/core/block/machine/BlockFlaskSetter.java index 510caf3e14c..5ec07bb9e33 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockFlaskSetter.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockFlaskSetter.java @@ -14,6 +14,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import gregtech.api.util.GTLog; import gregtech.common.items.MetaGeneratedTool01; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.minecraft.CubicObject; @@ -29,7 +30,7 @@ public class BlockFlaskSetter extends BasicTileBlockWithTooltip { /** * Determines which tooltip is displayed within the itemblock. */ - private final int mTooltipID = 8; + private final int mTooltipID = 5; @Override public int getTooltipID() { @@ -68,11 +69,12 @@ public boolean onBlockActivated(final World world, final int x, final int y, fin mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); } } - } catch (final Throwable t) {} - + } catch (Exception e) { + e.printStackTrace(GTLog.err); + } if (!mDidScrewDriver) { final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityVolumetricFlaskSetter aTile)) { + if (te instanceof TileEntityVolumetricFlaskSetter) { player.openGui(GTplusplus.instance, GuiHandler.GUI18, world, x, y, z); // new Packet_VolumetricFlaskGui2(aTile, aTile.getCustomValue()); return true; @@ -145,12 +147,10 @@ protected String getTileEntityName() { @Override public CubicObject[] getCustomTextureDirectoryObject() { - String[] aTexData = new String[] { GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_A", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_TECH_PANEL_C", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", - GTPlusPlus.ID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H" }; + String[] aTexData = new String[] { GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_H", + GTPlusPlus.ID + ":metro/TEXTURE_TECH_PANEL_C", GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_H", + GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_H", GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_H", + GTPlusPlus.ID + ":metro/TEXTURE_METAL_PANEL_H" }; CubicObject[] aTextureData = new CubicObject[] { new CubicObject<>(aTexData) }; return aTextureData; } diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockPestKiller.java b/src/main/java/gtPlusPlus/core/block/machine/BlockPestKiller.java index 95e7f3bc562..d4211a7831e 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockPestKiller.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockPestKiller.java @@ -40,7 +40,7 @@ public class BlockPestKiller extends BlockContainer implements ITileTooltip { /** * Determines which tooltip is displayed within the itemblock. */ - private final int mTooltipID = 6; + private final int mTooltipID = 4; @Override public int getTooltipID() { @@ -69,11 +69,11 @@ public IIcon getIcon(final int ordinalSide, final int meta) { @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister p_149651_1_) { this.blockIcon = p_149651_1_ - .registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); - this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "MACHINE_PESTKILLER_TOP"); + .registerIcon(GTPlusPlus.ID + ":TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); + this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/MACHINE_PESTKILLER_TOP"); this.textureBottom = p_149651_1_.registerIcon("planks_acacia"); this.textureFront = p_149651_1_ - .registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); + .registerIcon(GTPlusPlus.ID + ":TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); } /** @@ -87,7 +87,7 @@ public boolean onBlockActivated(final World world, final int x, final int y, fin } final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityPestKiller)) { + if (te instanceof TileEntityPestKiller) { player.openGui(GTplusplus.instance, GuiHandler.GUI15, world, x, y, z); return true; } diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockProjectTable.java b/src/main/java/gtPlusPlus/core/block/machine/BlockProjectTable.java index 195240958f3..acfc3a02ff3 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockProjectTable.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockProjectTable.java @@ -42,11 +42,9 @@ public class BlockProjectTable extends BlockContainer implements ITileTooltip { /** * Determines which tooltip is displayed within the itemblock. */ - private final int mTooltipID = 3; - @Override public int getTooltipID() { - return this.mTooltipID; + return 0; } public BlockProjectTable() { @@ -70,10 +68,10 @@ public IIcon getIcon(final int ordinalSide, final int meta) { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "machine_top"); - this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "cover_crafting"); - this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "machine_top"); - this.textureFront = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "TileEntities/" + "machine_top"); + this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/machine_top"); + this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/cover_crafting"); + this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/machine_top"); + this.textureFront = p_149651_1_.registerIcon(GTPlusPlus.ID + ":TileEntities/machine_top"); } /** diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java index cf50da52a30..9da305cbd20 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java @@ -21,28 +21,26 @@ public ItemBlockBasicTile(final Block block) { @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.mID == 0) { // Fish trap + if (this.mID == 1) { // Fish trap list.add("This trap catches fish faster if surrounded by more water blocks"); - list.add("Can also be placed beside upto 4 other fish traps"); + list.add("Can also be placed beside up to 4 other fish traps"); list.add("Requires at least two faces touching water"); list.add("1/1000 chance to produce triple loot."); - } else if (this.mID == 4) { // Circuit Table + } else if (this.mID == 2) { // Circuit Table list.add("Easy Circuit Configuration"); list.add("Change default setting with a Screwdriver"); list.add("Default is used to select slot for auto-insertion"); - } else if (this.mID == 5) { // Decayables Chest + } else if (this.mID == 3) { // Decayables Chest list.add("Chest which holds radioactive materials"); list.add("Items which decay will tick while inside"); - list.add("Place with right click"); - } else if (this.mID == 6) { // Butterfly Killer + list.add("Place with right-click"); + } else if (this.mID == 4) { // Butterfly Killer list.add("Kills Forestry Butterflies, Bats and other pests"); list.add("Use either Formaldehyde or Hydrogen cyanide"); list.add("Be weary of your neighbours"); - } else if (this.mID == 8) { // Volumetric Flask Setter + } else if (this.mID == 5) { // Volumetric Flask Setter list.add("Easy Flask Configuration"); list.add("Configure default input slot with a screwdriver"); - } else if (this.mID == 9) { - } else { list.add("Bad Tooltip ID - " + mID); } diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java index 92876663f0a..a69d9eab34f 100644 --- a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java @@ -1,6 +1,5 @@ package gtPlusPlus.core.item.base.itemblock; -import java.util.HashMap; import java.util.List; import net.minecraft.block.Block; @@ -11,6 +10,7 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; +import gregtech.api.util.GTLog; import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; import gtPlusPlus.core.block.base.BlockBaseModular; import gtPlusPlus.core.block.base.BlockBaseOre; @@ -22,8 +22,6 @@ public class ItemBlockGtBlock extends ItemBlock { - public static HashMap sNameCache = new HashMap<>(); - protected final int blockColour; private int sRadiation; @@ -50,7 +48,6 @@ public ItemBlockGtBlock(final Block block) { } else { this.blockColour = block.getBlockColor(); } - if (block instanceof BlockBaseModular g) { this.mMaterial = g.getMaterialEx(); this.thisBlockType = g.thisBlock; @@ -60,55 +57,23 @@ public ItemBlockGtBlock(final Block block) { } } - public int getBlockTypeMeta() { - if (this.thisBlockType.equals(BlockTypes.STANDARD)) { - return 0; - } else if (this.thisBlockType.equals(BlockTypes.FRAME)) { - return 1; - } else if (this.thisBlockType.equals(BlockTypes.ORE)) { - return 2; - } - return 0; - } - - public String getUnlocalizedBlockName() { - return "block." + mMaterial.getUnlocalizedName() - + "." - + this.thisBlockType.name() - .toLowerCase(); - } - - public String GetProperName() { - String tempIngot = sNameCache.get(getUnlocalizedBlockName()); - if (tempIngot == null) { - tempIngot = "BAD.UNLOCAL.NAME"; - } - return tempIngot; - } - @Override public String getItemStackDisplayName(ItemStack stack) { return this.thisBlock.getLocalizedName(); } - public int getRenderColor(final int aMeta) { - return this.blockColour; - } - @Override public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { if (this.mMaterial != null) { list.add(this.mMaterial.vChemicalFormula); } else { - try { BlockBaseModular g = (BlockBaseModular) thisBlock; this.mMaterial = g.getMaterialEx(); - } catch (Throwable t) { - + } catch (Exception e) { + e.printStackTrace(GTLog.err); } - // list.add("Material is Null."); } @@ -116,10 +81,7 @@ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, fi if (KeyboardUtils.isCtrlKeyDown()) { Block b = Block.getBlockFromItem(stack.getItem()); if (b != null) { - - String aTool = b.getHarvestTool(stack.getItemDamage()); int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); - if (this.mMaterial != null) { list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); list.add("Contains: "); @@ -141,7 +103,6 @@ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, fi } else { Block b = Block.getBlockFromItem(stack.getItem()); if (b != null) { - String aTool = b.getHarvestTool(stack.getItemDamage()); int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); } diff --git a/src/main/java/gtPlusPlus/core/lib/GTPPCore.java b/src/main/java/gtPlusPlus/core/lib/GTPPCore.java index db30eecb333..a4aecd59823 100644 --- a/src/main/java/gtPlusPlus/core/lib/GTPPCore.java +++ b/src/main/java/gtPlusPlus/core/lib/GTPPCore.java @@ -40,8 +40,6 @@ public class GTPPCore { public static final Supplier GT_Tooltip_Radioactive = () -> StatCollector .translateToLocal("GTPP.core.GT_Tooltip_Radioactive"); - public static final String SEPERATOR = "/"; - /** * Lists/Maps */ diff --git a/src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn b/src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn deleted file mode 100644 index 453b7325c8b..00000000000 Binary files a/src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn and /dev/null differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulator.png b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulator.png new file mode 100644 index 00000000000..6514089c64a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulator.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulator.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulator.png.mcmeta new file mode 100644 index 00000000000..cba1c432712 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulator.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0,1,2,3,4,5,6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulatorStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulatorStatic.png new file mode 100644 index 00000000000..29b3a74f342 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricManipulatorStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCore.png b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCore.png new file mode 100644 index 00000000000..14b5e673d09 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCore.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCore.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCore.png.mcmeta new file mode 100644 index 00000000000..10cf8c6afdf --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCore.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCoreStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCoreStatic.png new file mode 100644 index 00000000000..53e0e51c068 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/CosmicFabricShieldingCoreStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/ForceField.png b/src/main/resources/assets/miscutils/textures/blocks/qft/ForceField.png new file mode 100644 index 00000000000..32254623d1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/ForceField.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/ForceFieldGlass.png b/src/main/resources/assets/miscutils/textures/blocks/qft/ForceFieldGlass.png new file mode 100644 index 00000000000..ad6502026ed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/ForceFieldGlass.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulator.png b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulator.png new file mode 100644 index 00000000000..c5d7fe80b29 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulator.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulator.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulator.png.mcmeta new file mode 100644 index 00000000000..b0c531fa791 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulator.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulatorStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulatorStatic.png new file mode 100644 index 00000000000..40d9b8f31be Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedManipulatorStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCore.png b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCore.png new file mode 100644 index 00000000000..4e2e761fa82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCore.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCore.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCore.png.mcmeta new file mode 100644 index 00000000000..9720a238668 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCore.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCoreStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCoreStatic.png new file mode 100644 index 00000000000..c822112126a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/InfinityInfusedShieldingCoreStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/Manipulator_Top.png b/src/main/resources/assets/miscutils/textures/blocks/qft/Manipulator_Top.png new file mode 100644 index 00000000000..2a5b8aec95d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/Manipulator_Top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulator.png b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulator.png new file mode 100644 index 00000000000..97c32e5988d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulator.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulator.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulator.png.mcmeta new file mode 100644 index 00000000000..cba1c432712 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulator.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0,1,2,3,4,5,6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulatorStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulatorStatic.png new file mode 100644 index 00000000000..29b3a74f342 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronPulseManipulatorStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCore.png b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCore.png new file mode 100644 index 00000000000..9c14ae0abf8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCore.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCore.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCore.png.mcmeta new file mode 100644 index 00000000000..163c81b6a1c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCore.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCoreStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCoreStatic.png new file mode 100644 index 00000000000..d4cd1c1dee6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/NeutronShieldingCoreStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCore.png b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCore.png new file mode 100644 index 00000000000..bb8bee0ce77 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCore.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCore.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCore.png.mcmeta new file mode 100644 index 00000000000..163c81b6a1c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCore.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCoreStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCoreStatic.png new file mode 100644 index 00000000000..ca38aad14f7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeBendingCoreStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipper.png b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipper.png new file mode 100644 index 00000000000..bb21d8af985 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipper.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipper.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipper.png.mcmeta new file mode 100644 index 00000000000..c8988534a9b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipper.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0,1,2,3,4,5,6,7] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipperStatic.png b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipperStatic.png new file mode 100644 index 00000000000..c54c56daaf6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/SpaceTimeContinuumRipperStatic.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/qft/forceFieldGlassTop.png b/src/main/resources/assets/miscutils/textures/blocks/qft/forceFieldGlassTop.png new file mode 100644 index 00000000000..97dbb4049ee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/qft/forceFieldGlassTop.png differ