diff --git a/dependencies.gradle b/dependencies.gradle index 98adf9529e6..d6ca4ceabcb 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -43,7 +43,7 @@ dependencies { api("com.github.GTNewHorizons:ModularUI2:2.1.16-1.7.10:dev") api("com.github.GTNewHorizons:waila:1.8.2:dev") api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-507-GTNH:dev") - api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.0-gtnh:dev") + api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.2-gtnh:dev") api('com.github.GTNewHorizons:Yamcl:0.6.0:dev') api("com.github.GTNewHorizons:Postea:1.0.13:dev") diff --git a/src/functionalTest/java/kubatech/test/kubatechTestMod.java b/src/functionalTest/java/kubatech/test/kubatechTestMod.java index 5f0225d0ee8..78d123851fb 100644 --- a/src/functionalTest/java/kubatech/test/kubatechTestMod.java +++ b/src/functionalTest/java/kubatech/test/kubatechTestMod.java @@ -38,7 +38,7 @@ public class kubatechTestMod { public void preInit(FMLPreInitializationEvent ev) { // Disable GT5u messing with vanilla recipes for unit tests GTMod.gregtechproxy.mNerfedWoodPlank = false; - GTMod.gregtechproxy.mNerfedVanillaTools = false; + GTMod.gregtechproxy.mChangeWoodenVanillaTools = false; } @EventHandler diff --git a/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java b/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java index 1c313e71725..bdc31cc428e 100644 --- a/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java +++ b/src/main/java/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java @@ -28,26 +28,31 @@ import static gregtech.api.enums.OrePrefixes.plate; import static gregtech.api.recipe.RecipeMaps.compressorRecipes; import static gregtech.api.recipe.RecipeMaps.hammerRecipes; +import static gregtech.api.recipe.RecipeMaps.implosionRecipes; import static gregtech.api.recipe.RecipeMaps.laserEngraverRecipes; import static gregtech.api.recipe.RecipeMaps.latheRecipes; import static gregtech.api.recipe.RecipeMaps.sifterRecipes; import static gregtech.api.util.GTRecipeBuilder.MINUTES; import static gregtech.api.util.GTRecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.TICKS; +import static gregtech.api.util.GTRecipeConstants.ADDITIVE_AMOUNT; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import bartworks.system.material.Werkstoff; +import bartworks.system.material.WerkstoffLoader; import bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; import bartworks.util.BWColorUtil; import gregtech.api.GregTechAPI; import gregtech.api.enums.GTValues; +import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; import gregtech.api.enums.TierEU; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTOreDictUnificator; import gregtech.common.covers.CoverLens; public class GemLoader implements IWerkstoffRunnable { @@ -133,6 +138,48 @@ public void run(Werkstoff werkstoff) { .eut(16) .addTo(hammerRecipes); + if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) { + GTValues.RA.stdBuilder() + .itemInputs(werkstoff.get(gemFlawless, 3)) + .itemOutputs(werkstoff.get(gemExquisite), GTOreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)) + .duration(20 * TICKS) + .eut(TierEU.RECIPE_LV) + .metadata(ADDITIVE_AMOUNT, 8) + .addTo(implosionRecipes); + + GTValues.RA.stdBuilder() + .itemInputs(werkstoff.get(gem, 3)) + .itemOutputs(werkstoff.get(gemFlawless), GTOreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)) + .duration(20 * TICKS) + .eut(TierEU.RECIPE_LV) + .metadata(ADDITIVE_AMOUNT, 8) + .addTo(implosionRecipes); + + GTValues.RA.stdBuilder() + .itemInputs(werkstoff.get(gemFlawed, 3)) + .itemOutputs(werkstoff.get(gem), GTOreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)) + .duration(20 * TICKS) + .eut(TierEU.RECIPE_LV) + .metadata(ADDITIVE_AMOUNT, 8) + .addTo(implosionRecipes); + + GTValues.RA.stdBuilder() + .itemInputs(werkstoff.get(gemChipped, 3)) + .itemOutputs(werkstoff.get(gemFlawed), GTOreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)) + .duration(20 * TICKS) + .eut(TierEU.RECIPE_LV) + .metadata(ADDITIVE_AMOUNT, 8) + .addTo(implosionRecipes); + + GTValues.RA.stdBuilder() + .itemInputs(werkstoff.get(dust, 4)) + .itemOutputs(werkstoff.get(gem, 3), GTOreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)) + .duration(20 * TICKS) + .eut(TierEU.RECIPE_LV) + .metadata(ADDITIVE_AMOUNT, 24) + .addTo(implosionRecipes); + } + if (werkstoff.hasItemType(plate)) { GTValues.RA.stdBuilder() diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEExtremeHeatExchanger.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEExtremeHeatExchanger.java index 18fd72eaf4c..975f4aa6c6d 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEExtremeHeatExchanger.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEExtremeHeatExchanger.java @@ -4,6 +4,7 @@ import static gregtech.api.enums.GTValues.V; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; +import static gregtech.api.util.GTStructureUtility.chainAllGlasses; import java.util.Arrays; import java.util.Collections; @@ -40,7 +41,6 @@ import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchInput; import gregtech.api.metatileentity.implementations.MTEHatchOutput; -import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; @@ -124,7 +124,7 @@ public IStructureDefinition getStructure_EM() { .dot(5) .build(), onElementPass(x -> x.casingAmount++, ofBlock(GregTechAPI.sBlockCasings4, 0)))) - .addElement('G', Glasses.chainAllGlasses()) + .addElement('G', chainAllGlasses()) .addElement('P', ofBlock(GregTechAPI.sBlockCasings2, 15)) .addElement('W', ofBlock(Loaders.pressureResistantWalls, 0)) .build(); diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java b/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java index c209abb64ed..2058188445b 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java @@ -2,6 +2,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; +import static gregtech.api.util.GTStructureUtility.chainAllGlasses; import static gregtech.api.util.GTStructureUtility.ofFrame; import java.util.ArrayList; @@ -47,7 +48,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.objects.XSTR; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; @@ -229,7 +229,7 @@ public IStructureDefinition getStructure_EM() { onElementPass(MTENeutronActivator::onCasingFound, ofBlock(GregTechAPI.sBlockCasings4, 1)))) .addElement('D', ofBlock(GregTechAPI.sBlockCasings2, 6)) .addElement('F', ofFrame(Materials.Steel)) - .addElement('G', Glasses.chainAllGlasses()) + .addElement('G', chainAllGlasses()) .addElement('P', ofBlock(Loaders.speedingPipe, 0)) .addElement( 'X', diff --git a/src/main/java/gregtech/GTMod.java b/src/main/java/gregtech/GTMod.java index a52a9c2013c..f3f02f1adb6 100644 --- a/src/main/java/gregtech/GTMod.java +++ b/src/main/java/gregtech/GTMod.java @@ -88,7 +88,6 @@ import gregtech.common.config.Other; import gregtech.common.config.Worldgen; import gregtech.common.covers.CoverFacadeAE; -import gregtech.common.items.flinttools.FlintTools; import gregtech.common.misc.GTCommand; import gregtech.common.misc.spaceprojects.commands.SPCommand; import gregtech.common.misc.spaceprojects.commands.SPMCommand; @@ -120,7 +119,6 @@ import gregtech.loaders.postload.RecyclerBlacklistLoader; import gregtech.loaders.postload.ScrapboxDropLoader; import gregtech.loaders.preload.GTPreLoad; -import gregtech.loaders.preload.GT_Loader_MultiTileEntities; import gregtech.loaders.preload.LoaderCircuitBehaviors; import gregtech.loaders.preload.LoaderGTBlockFluid; import gregtech.loaders.preload.LoaderGTItemData; @@ -299,9 +297,6 @@ public void onPreLoad(FMLPreInitializationEvent aEvent) { new LoaderGTItemData().run(); new LoaderGTBlockFluid().run(); new LoaderMetaTileEntities().run(); - if (GTValues.enableMultiTileEntities) { - new GT_Loader_MultiTileEntities().run(); - } new LoaderCircuitBehaviors().run(); new CoverBehaviorLoader().run(); @@ -329,11 +324,6 @@ public void onPreLoad(FMLPreInitializationEvent aEvent) { if (FMLCommonHandler.instance() .getEffectiveSide() .isServer()) AssemblyLineServer.fillMap(aEvent); - - // Flint tool setup. - FlintTools.registerTools(); - FlintTools.registerPosteaTransformations(); - FlintTools.registerRecipes(); } @Mod.EventHandler @@ -541,7 +531,7 @@ public void onPostLoad(FMLPostInitializationEvent aEvent) { .map(tName -> GTModHandler.getIC2Item(tName, 1L)) .forEach(GTModHandler::removeRecipeByOutputDelayed); - GTPostLoad.nerfVanillaTools(); + GTPostLoad.changeWoodenVanillaTools(); // Register postea transformers new PosteaTransformers().run(); diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java deleted file mode 100644 index 3f2cc71e541..00000000000 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java +++ /dev/null @@ -1,590 +0,0 @@ -package gregtech.api.multitileentity; - -import static gregtech.api.enums.GTValues.OFFX; -import static gregtech.api.enums.GTValues.OFFY; -import static gregtech.api.enums.GTValues.OFFZ; -import static gregtech.api.util.GTUtil.LAST_BROKEN_TILEENTITY; -import static gregtech.api.util.GTUtil.getTileEntity; -import static gregtech.api.util.GTUtil.setTileEntity; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.event.ForgeEventFactory; - -import com.cricketcraft.chisel.api.IFacade; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTechAPI; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IDebugableBlock; -import gregtech.api.interfaces.tileentity.IDebugableTileEntity; -import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; -import gregtech.api.objects.XSTR; -import gregtech.api.util.GTLog; -import gregtech.api.util.GTUtil; -import gregtech.common.covers.CoverInfo; -import gregtech.common.render.MultiTileRenderer; - -/* - * MultiTileEntityBlock ported from GT6 - */ -@Optional.Interface(iface = "com.cricketcraft.chisel.api.IFacade", modid = "ChiselAPI") -public class MultiTileEntityBlock extends BlockContainer implements IDebugableBlock, ITileEntityProvider, IFacade { - - private MultiTileEntityRegistry registry; - - private static boolean LOCK = false; - - private boolean registered = false; - private boolean normalCube; - protected String internalName, toolName, materialName, modID; - - public String getName() { - return String.join( - ".", - "gt.block.multiblock", - materialName, - stepSound.soundName, - toolName, - Boolean.toString(opaque), - Boolean.toString(normalCube)); - } - - public MultiTileEntityBlock(Material material) { - super(material); - if (GregTechAPI.sPreloadFinished) - throw new IllegalStateException("Blocks can only be initialized within preInit!"); - } - - public MultiTileEntityBlock tool(String toolName) { - this.toolName = toolName.toLowerCase(); - return this; - } - - public MultiTileEntityBlock sound(SoundType soundtype) { - setStepSound(soundtype); - return this; - } - - public MultiTileEntityBlock opaque(Boolean opaque) { - this.opaque = opaque; - return this; - } - - public MultiTileEntityBlock normalCube(Boolean normalCube) { - this.normalCube = normalCube; - return this; - } - - public MultiTileEntityBlock modID(String modID) { - this.modID = modID; - return this; - } - - public MultiTileEntityBlock materialName(String materialName) { - this.materialName = materialName; - return this; - } - - public MultiTileEntityBlock register() { - if (registered) throw new IllegalStateException("Block already registered " + internalName); - if (GregTechAPI.sPreloadFinished) - throw new IllegalStateException("Blocks can only be initialized within preInit!"); - - registered = true; - internalName = getName(); - lightOpacity = isOpaqueCube() ? 255 : 0; - - GameRegistry.registerBlock(this, MultiTileEntityItem.class, internalName); - return this; - } - - @Override - public final void breakBlock(World world, int x, int y, int z, Block block, int metadata) { - final TileEntity tileEntity = getTileEntity(world, x, y, z, true); - if (tileEntity != null) LAST_BROKEN_TILEENTITY.set(tileEntity); - if (tileEntity == null || !tileEntity.shouldRefresh(this, block, metadata, metadata, world, x, y, z)) return; - if (tileEntity instanceof IMultiTileEntity mute) mute.onBlockBroken(); - // spotless:off - // if (aTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData - // && ((IMTE_HasMultiBlockMachineRelevantData) aTileEntity).hasMultiBlockMachineRelevantData()) - // GregTechAPI.causeMachineUpdate(world, x, y, z); - // spotless:on - - world.removeTileEntity(x, y, z); - super.breakBlock(world, x, y, z, block, metadata); - - } - - @Override - public ArrayList getDebugInfo(EntityPlayer aPlayer, int x, int y, int z, int aLogLevel) { - final TileEntity tileEntity = aPlayer.worldObj.getTileEntity(x, y, z); - if (tileEntity instanceof IDebugableTileEntity mte) { - return mte.getDebugInfo(aPlayer, aLogLevel); - } - return new ArrayList<>(); - } - - @Override - public int getRenderType() { - return MultiTileRenderer.INSTANCE == null ? super.getRenderType() : MultiTileRenderer.INSTANCE.getRenderId(); - } - - @Override - public final float getBlockHardness(World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) tileEntity).getBlockHardness() : 1.0F; - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIcon(IBlockAccess aIBlockAccess, int x, int y, int z, int ordinalSide) { - return Textures.BlockIcons.MACHINE_LV_SIDE.getIcon(); - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIcon(int ordinalSide, int meta) { - return Textures.BlockIcons.MACHINE_LV_SIDE.getIcon(); - } - - @Override - public final void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aAABB, - List aList, Entity aEntity) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IMultiTileEntity) - ((IMultiTileEntity) tileEntity).addCollisionBoxesToList(aAABB, aList, aEntity); - else super.addCollisionBoxesToList(world, x, y, z, aAABB, aList, aEntity); - } - - @Override - public final AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mte ? mte.getCollisionBoundingBoxFromPool() - : tileEntity == null ? null : super.getCollisionBoundingBoxFromPool(world, x, y, z); - } - - @Override - public final AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mte ? mte.getSelectedBoundingBoxFromPool() - : super.getSelectedBoundingBoxFromPool(world, x, y, z); - } - - @Override - public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int x, int y, int z) { - final TileEntity tileEntity = blockAccess.getTileEntity(x, y, z); - if (tileEntity instanceof IMultiTileEntity mte) { - mte.setBlockBoundsBasedOnState(this); - return; - } - super.setBlockBoundsBasedOnState(blockAccess, x, y, z); - } - - @Override - public final boolean isOpaqueCube() { - return opaque; - } - - @Override - public final void onNeighborChange(IBlockAccess world, int x, int y, int z, int aTileX, int aTileY, int aTileZ) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!LOCK) { - LOCK = true; - if (tileEntity instanceof BaseTileEntity) - ((BaseTileEntity) tileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); - LOCK = false; - } - } - - @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!LOCK) { - LOCK = true; - if (tileEntity instanceof BaseTileEntity bte) bte.onAdjacentBlockChange(x, y, z); - LOCK = false; - } - if (tileEntity instanceof IMultiTileEntity change) change.onNeighborBlockChange(world, block); - - if (tileEntity == null) world.setBlockToAir(x, y, z); - } - - @Override - public final void onBlockAdded(World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IMultiTileEntity mte) mte.onBlockAdded(); - } - - @Override - public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mte && mte.privateAccess() - && !((IMultiTileEntity) tileEntity).playerOwnsThis(aPlayer, true) ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, world, x, y, z); - } - - @Override - public final void onBlockClicked(World world, int x, int y, int z, EntityPlayer aPlayer) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IMultiTileEntity mte) mte.onLeftClick(aPlayer); - else super.onBlockClicked(world, x, y, z, aPlayer); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer aPlayer, int ordinalSide, - float aHitX, float aHitY, float aHitZ) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (aPlayer != null && ItemList.TC_Thaumometer.isStackEqual(aPlayer.getHeldItem(), true, true)) return false; - return tileEntity instanceof IMultiTileEntity mte - && mte.onBlockActivated(aPlayer, ForgeDirection.getOrientation(ordinalSide), aHitX, aHitY, aHitZ); - } - - @Override - public final int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int ordinalSide) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity power - ? power.isProvidingWeakPower(ForgeDirection.getOrientation(ordinalSide)) - : super.isProvidingWeakPower(world, x, y, z, ordinalSide); - } - - @Override - public final int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int ordinalSide) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity power - ? power.isProvidingStrongPower(ForgeDirection.getOrientation(ordinalSide)) - : super.isProvidingStrongPower(world, x, y, z, ordinalSide); - } - - @Override - public final boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int ordinalSide) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity power - ? power.shouldCheckWeakPower(ForgeDirection.getOrientation(ordinalSide)) - : isNormalCube(world, x, y, z); - } - - @Override - public final boolean getWeakChanges(IBlockAccess world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity changes ? changes.getWeakChanges() - : super.getWeakChanges(world, x, y, z); - } - - @Override - public final void harvestBlock(World world, EntityPlayer aPlayer, int x, int y, int z, int meta) { - if (aPlayer == null) aPlayer = harvesters.get(); - aPlayer.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1); - aPlayer.addExhaustion(0.025F); - final boolean aSilkTouch = EnchantmentHelper.getSilkTouchModifier(aPlayer); - final int aFortune = EnchantmentHelper.getFortuneModifier(aPlayer); - float aChance = 1.0F; - final TileEntity tileEntity = getTileEntity(world, x, y, z, true); - - if (!(tileEntity instanceof IMultiTileEntity mte)) { - return; - } - - final ArrayList tList = mte.getDrops(aFortune, aSilkTouch); - aChance = ForgeEventFactory - .fireBlockHarvesting(tList, world, this, x, y, z, meta, aFortune, aChance, aSilkTouch, aPlayer); - for (final ItemStack tStack : tList) - if (XSTR.XSTR_INSTANCE.nextFloat() <= aChance) dropBlockAsItem(world, x, y, z, tStack); - - } - - @Override - public final boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int ordinalSide) { - final TileEntity tileEntity = world - .getTileEntity(x - OFFX[ordinalSide], y - OFFY[ordinalSide], z - OFFZ[ordinalSide]); - return tileEntity instanceof IMultiTileEntity mte - ? mte.shouldSideBeRendered(ForgeDirection.getOrientation(ordinalSide)) - : super.shouldSideBeRendered(world, x, y, z, ordinalSide); - } - - @Override - public Block getFacade(IBlockAccess world, int x, int y, int z, int ordinalSide) { - final TileEntity tTileEntity = world.getTileEntity(x, y, z); - if (tTileEntity instanceof CoverableTileEntity tile) { - final ForgeDirection side = ForgeDirection.getOrientation(ordinalSide); - if (ordinalSide != -1) { - final Block facadeBlock = tile.getCoverInfoAtSide(side) - .getFacadeBlock(); - if (facadeBlock != null) return facadeBlock; - } else { - // we do not allow more than one type of facade per block, so no need to check every side - // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable - for (final ForgeDirection tSide : ForgeDirection.VALID_DIRECTIONS) { - final Block facadeBlock = tile.getCoverInfoAtSide(tSide) - .getFacadeBlock(); - if (facadeBlock != null) { - return facadeBlock; - } - } - } - } - return Blocks.air; - } - - @Override - public int getFacadeMetadata(IBlockAccess world, int x, int y, int z, int ordinalSide) { - final TileEntity tTileEntity = world.getTileEntity(x, y, z); - if (tTileEntity instanceof CoverableTileEntity tile) { - final ForgeDirection side = ForgeDirection.getOrientation(ordinalSide); - if (ordinalSide != -1) { - final CoverInfo coverInfo = tile.getCoverInfoAtSide(side); - final Block facadeBlock = coverInfo.getFacadeBlock(); - if (facadeBlock != null) return coverInfo.getFacadeMeta(); - } else { - // we do not allow more than one type of facade per block, so no need to check every side - // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable - for (final ForgeDirection tSide : ForgeDirection.VALID_DIRECTIONS) { - final CoverInfo coverInfo = tile.getCoverInfoAtSide(tSide); - final Block facadeBlock = coverInfo.getFacadeBlock(); - if (facadeBlock != null) { - return coverInfo.getFacadeMeta(); - } - } - } - } - return 0; - } - - public MultiTileEntityRegistry getRegistry() { - return registry; - } - - public void setRegistry(MultiTileEntityRegistry registry) { - this.registry = registry; - } - - public boolean isRegistered() { - return registered; - } - - @Override - protected boolean canSilkHarvest() { - return false; - } - - @Override - public final String getLocalizedName() { - return StatCollector.translateToLocal(internalName + ".name"); - } - - @Override - public final String getUnlocalizedName() { - return internalName; - } - - @Override - public final boolean onBlockEventReceived(World world, int x, int y, int z, int aID, int aData) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity == null || tileEntity.receiveClientEvent(aID, aData); - } - - @Override - public final void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List aList) { - /**/ - } - - @Override - public boolean hasComparatorInputOverride() { - return true; - } - - @Override - public final int getComparatorInputOverride(World world, int x, int y, int z, int ordinalSide) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IMultiTileEntity mute) { - if (mute.hasComparatorInputOverride()) - return mute.getComparatorInputOverride(ForgeDirection.getOrientation(ordinalSide)); - else return mute.isProvidingWeakPower( - ForgeDirection.getOrientation(ordinalSide) - .getOpposite()); - } - - return super.getComparatorInputOverride(world, x, y, z, ordinalSide); - } - - @Override - public final void registerBlockIcons(IIconRegister aIconRegister) { - /* Do Nothing */ - } - - @Override - public final boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mute ? mute.isSideSolid(side) : opaque; - } - - @Override - public boolean removedByPlayer(World world, EntityPlayer aPlayer, int x, int y, int z, boolean aWillHarvest) { - final TileEntity tileEntity = GTUtil.getTileEntity(world, x, y, z, true); - if (tileEntity != null) LAST_BROKEN_TILEENTITY.set(tileEntity); - return super.removedByPlayer(world, aPlayer, x, y, z, aWillHarvest); - } - - @Override - public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) { - return 0; - } - - @Override - public int getFireSpreadSpeed(IBlockAccess world, int x, int y, int z, ForgeDirection face) { - return GregTechAPI.sMachineFlammable && (world.getBlockMetadata(x, y, z) == 0) ? 100 : 0; - } - - @Override - public boolean hasTileEntity(int meta) { - return true; - } - - @Override - public final ArrayList getDrops(World world, int x, int y, int z, int aUnusableMetaData, int aFortune) { - final TileEntity tileEntity = getTileEntity(world, x, y, z, true); - if (tileEntity instanceof IMultiTileEntity mute) return mute.getDrops(aFortune, false); - return new ArrayList<>(); - } - - @Override - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { - return false; - } - - @Override - public final float getExplosionResistance(Entity aExploder, World world, int x, int y, int z, double aExplosionX, - double aExplosionY, double aExplosionZ) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mute - ? mute.getExplosionResistance(aExploder, aExplosionX, aExplosionY, aExplosionZ) - : 1.0F; - } - - @Override - public final void onBlockExploded(World world, int x, int y, int z, Explosion aExplosion) { - if (world.isRemote) return; - final TileEntity tileEntity = getTileEntity(world, x, y, z, true); - if (tileEntity != null) LAST_BROKEN_TILEENTITY.set(tileEntity); - if (tileEntity instanceof IMultiTileEntity mute) { - GTLog.exp.printf( - "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", - x, - y, - z, - world.provider.dimensionId); - mute.onExploded(aExplosion); - } else world.setBlockToAir(x, y, z); - } - - @Override - public final boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int ordinalSide) { - return true; - } - - @Override - public final boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int color) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mute && mute.recolourBlock(side, (byte) color); - } - - @Override - public final String getHarvestTool(int meta) { - return toolName; - } - - @Override - public int getHarvestLevel(int meta) { - return meta % 4; - } - - @Override - public final boolean isToolEffective(String toolType, int meta) { - return getHarvestTool(meta).equals(toolType); - } - - @Override - public final ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, - EntityPlayer aPlayer) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mte ? mte.getPickBlock(target) : null; - } - - @Override - public final ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IMultiTileEntity mte ? mte.getPickBlock(target) : null; - } - - @Nullable - public final IMultiTileEntity receiveMultiTileEntityData(@Nonnull IBlockAccess world, int x, int y, int z, - int registryId, int aID) { - if (!(world instanceof World)) return null; - TileEntity tileEntity = world.getTileEntity(x, y, z); - - if (!(tileEntity instanceof IMultiTileEntity mute) || mute.getMultiTileEntityRegistryID() != registryId - || mute.getMultiTileEntityID() != aID) { - final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(registryId); - if (tRegistry == null) return null; - - tileEntity = tRegistry.getNewTileEntity((World) world, x, y, z, aID); - if (!(tileEntity instanceof IMultiTileEntity)) return null; - - setTileEntity((World) world, x, y, z, tileEntity, false); - } - return (IMultiTileEntity) tileEntity; - } - - public void receiveCoverData(IMultiTileEntity mute, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, - int aCover5) { - boolean updated; - updated = mute.setCoverIDAtSideNoUpdate(ForgeDirection.DOWN, aCover0); - updated |= mute.setCoverIDAtSideNoUpdate(ForgeDirection.UP, aCover1); - updated |= mute.setCoverIDAtSideNoUpdate(ForgeDirection.NORTH, aCover2); - updated |= mute.setCoverIDAtSideNoUpdate(ForgeDirection.SOUTH, aCover3); - updated |= mute.setCoverIDAtSideNoUpdate(ForgeDirection.WEST, aCover4); - updated |= mute.setCoverIDAtSideNoUpdate(ForgeDirection.EAST, aCover5); - - if (updated) { - mute.issueBlockUpdate(); - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) { - return registry.getNewTileEntity(meta); - } -} diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java deleted file mode 100644 index ca265e529e7..00000000000 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java +++ /dev/null @@ -1,208 +0,0 @@ -package gregtech.api.multitileentity; - -import static gregtech.api.enums.GTValues.NBT; - -import java.lang.ref.WeakReference; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.Tuple; - -import gregtech.api.enums.Materials; -import gregtech.api.multitileentity.base.MultiTileEntity; -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; -import gregtech.api.util.GTUtil; -import gregtech.common.tileentities.casings.upgrade.Inventory; -import gregtech.common.tileentities.casings.upgrade.Tank; - -public class MultiTileEntityClassContainer { - - private final WeakReference registry; - private String localized; - private String categoryName; - - private final short muteID; - private final Class muteClass; - private MultiTileEntity referenceTileEntity; - private NBTTagCompound parameters; - - public boolean hidden = false; - - public MultiTileEntityClassContainer(MultiTileEntityRegistry aRegistry, int aID, - Class aClass) { - /* Start the Builder */ - registry = new WeakReference<>(aRegistry); - muteID = (short) aID; - muteClass = aClass; - parameters = new NBTTagCompound(); - } - - public boolean register() { - /* End and register the Builder with the registry */ - final MultiTileEntityRegistry registry = this.registry.get(); - - if (parameters.hasKey(NBT.MATERIAL) && !parameters.hasKey(NBT.COLOR)) parameters.setInteger( - NBT.COLOR, - GTUtil.getRGBInt( - Materials.get(parameters.getString(NBT.MATERIAL)) - .getRGBA())); - - try { - referenceTileEntity = muteClass.getDeclaredConstructor() - .newInstance(); - } catch (Throwable e) { - throw new IllegalArgumentException(e); - } - referenceTileEntity.initFromNBT(parameters, muteID, (short) -1); - - return registry != null && registry.add(this.localized, this) != null; - } - - public MultiTileEntityClassContainer name(String aName) { - localized = aName; - return this; - } - - public MultiTileEntityClassContainer category(String aCategoryName) { - categoryName = aCategoryName; - return this; - } - - public MultiTileEntityClassContainer hide() { - hidden = true; - return this; - } - - /* These methods are builder methods for commonly used NBT tags */ - - // Need a base texture for the MTE machine, and then a separate texture set for the machine/active overlays - - public MultiTileEntityClassContainer material(Materials material) { - // Sets the material, and the color from the material, if not already set - parameters.setString(NBT.MATERIAL, material.toString()); - if (!parameters.hasKey(NBT.COLOR)) parameters.setInteger(NBT.COLOR, GTUtil.getRGBInt(material.getRGBA())); - return this; - } - - public MultiTileEntityClassContainer color(int rbg) { - parameters.setInteger(NBT.COLOR, rbg); - return this; - } - - public MultiTileEntityClassContainer color(short[] rgba) { - parameters.setInteger(NBT.COLOR, GTUtil.getRGBInt(rgba)); - return this; - } - - public MultiTileEntityClassContainer textureFolder(String texture) { - parameters.setString(NBT.TEXTURE_FOLDER, texture); - return this; - } - - public MultiTileEntityClassContainer inputInventorySize(int aSize) { - parameters.setInteger(NBT.INV_INPUT_SIZE, aSize); - return this; - } - - public MultiTileEntityClassContainer outputInventorySize(int aSize) { - parameters.setInteger(NBT.INV_OUTPUT_SIZE, aSize); - return this; - } - - public MultiTileEntityClassContainer tankCapacity(Long aCapacity) { - parameters.setLong(NBT.TANK_CAPACITY, aCapacity); - return this; - } - - public MultiTileEntityClassContainer tier(int aTier) { - verifyDescendentOfMultiple(true, UpgradeCasing.class, FunctionalCasing.class); - parameters.setInteger(NBT.TIER, aTier); - return this; - } - - public MultiTileEntityClassContainer upgradeInventorySize(int aSize) { - verifyDescendentOf(Inventory.class); - - parameters.setInteger(NBT.UPGRADE_INVENTORY_SIZE, aSize); - return this; - } - - public MultiTileEntityClassContainer upgradeTankCount(int count) { - verifyDescendentOf(Tank.class); - - parameters.setInteger(NBT.UPGRADE_TANK_COUNT, count); - return this; - } - - public MultiTileEntityClassContainer upgradeTankCapacity(Long aCapacity) { - parameters.setLong(NBT.UPGRADE_TANK_CAPACITY, aCapacity); - return this; - } - - public MultiTileEntityClassContainer upgradeAmperage(long amperage) { - parameters.setLong(NBT.UPGRADE_AMPERAGE, amperage); - return this; - } - - @SuppressWarnings("unused") - public MultiTileEntityClassContainer setNBT(String key, Object val) { - return setNBT(new Tuple(key, val)); - } - - public MultiTileEntityClassContainer setNBT(Tuple... aTags) { - /* - * Merge in arbitrary NBT tuples of (key, value). Useful for anything for which a custom method has not yet been - * exposed - */ - parameters = GTUtil.fuseNBT(parameters, GTUtil.makeNBT(aTags)); - return this; - } - - public WeakReference getRegistry() { - return registry; - } - - public Class getMuteClass() { - return muteClass; - } - - public short getMuteID() { - return muteID; - } - - public MultiTileEntity getReferenceTileEntity() { - return referenceTileEntity; - } - - public NBTTagCompound getParameters() { - return parameters; - } - - private void verifyDescendentOf(Class cls) { - // Check if cls is extended by mClass - if (!cls.isAssignableFrom(muteClass)) { - throw new IllegalArgumentException( - "Expected a descendent of " + cls.getName() + " got " + muteClass.getName() + " instead."); - } - } - - private void verifyDescendentOfMultiple(boolean onlyOne, Class... classes) { - boolean atLeastOne = false; - final StringBuilder classNames = new StringBuilder(); - for (Class cls : classes) { - classNames.append(cls.getName()) - .append(" "); - if (!onlyOne) { - verifyDescendentOf(cls); - atLeastOne = true; - } else if (cls.isAssignableFrom(muteClass)) { - atLeastOne = true; - } - } - - if (!atLeastOne) { - throw new IllegalArgumentException( - "Expected a descendent of any of these " + classNames + " got " + muteClass.getName() + " instead."); - } - } -} diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityItem.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityItem.java deleted file mode 100644 index d5917aa6c90..00000000000 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityItem.java +++ /dev/null @@ -1,237 +0,0 @@ -package gregtech.api.multitileentity; - -import static gregtech.GTMod.GT_FML_LOGGER; -import static gregtech.api.enums.GTValues.SIDE_TOP; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockSnow; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; - -public class MultiTileEntityItem extends ItemBlock { - - public final MultiTileEntityBlock block; - - public MultiTileEntityItem(Block block) { - super(block); - setMaxDamage(0); - setHasSubtypes(true); - this.block = (MultiTileEntityBlock) block; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean F3_H) { - final IMultiTileEntity mute = block.getRegistry() - .getReferenceTileEntity(stack); - if (mute == null) { - list.add("INVALID ITEM!"); - return; - } - try { - mute.addToolTips(list, stack, F3_H); - } catch (Throwable e) { - GT_FML_LOGGER.error("addInformation", e); - } - final NBTTagCompound aNBT = stack.getTagCompound(); - CoverableTileEntity.addInstalledCoversInformation(aNBT, list); - // TODO: Add anything else relevant - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item aItem, CreativeTabs aTab, List aList) { - for (MultiTileEntityClassContainer tClass : block.getRegistry().registrations) { - if (!tClass.hidden && ((IMultiTileEntity) tClass.getReferenceTileEntity()) - .getSubItems(block, aItem, aTab, aList, tClass.getMuteID())) { - aList.add( - block.getRegistry() - .getItem(tClass.getMuteID())); - } - } - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int ordinalSide, - float hitX, float hitY, float hitZ) { - - if (y < 0 || y > world.getHeight()) return false; - - if (player == null) return false; - - try { - ForgeDirection side = ForgeDirection.getOrientation(ordinalSide); - final Block clickedBlock = world.getBlock(x, y, z); - - if (clickedBlock instanceof BlockSnow && (world.getBlockMetadata(x, y, z) & 7) < 1) { - ordinalSide = SIDE_TOP; - side = ForgeDirection.UP; - } else if (clickedBlock != Blocks.vine && clickedBlock != Blocks.tallgrass - && clickedBlock != Blocks.deadbush - && !clickedBlock.isReplaceable(world, x, y, z)) { - x += side.offsetX; - y += side.offsetY; - z += side.offsetZ; - } - final Block tReplacedBlock = world.getBlock(x, y, z); - - if (!tReplacedBlock.isReplaceable(world, x, y, z) - || !block.canReplace(world, x, y, z, ordinalSide, stack)) { - return false; - } - - if (stack.stackSize == 0 || (!player.canPlayerEdit(x, y, z, ordinalSide, stack))) { - return false; - } - // final TileEntity tileEntity = block.getRegistry().getNewTileEntity(world, x, y, z, stack); - - if (!world.setBlock(x, y, z, block, Items.feather.getDamage(stack), 2)) { - return false; - } - final TileEntity te = world.getTileEntity(x, y, z); - if (!(te instanceof IMultiTileEntity mute)) { - throw new IllegalStateException("TileEntity is not an IMultiTileEntity"); - } - // MuTEContainer.setMultiTile(world, x, y, z); - - try { - if (mute.onPlaced(stack, player, world, x, y, z, side, hitX, hitY, hitZ)) { - world.playSoundEffect( - x + 0.5, - y + 0.5, - z + 0.5, - block.stepSound.func_150496_b(), - (block.stepSound.getVolume() + 1) / 2, - block.stepSound.getPitch() * 0.8F); - } - } catch (Throwable e) { - GT_FML_LOGGER.error("onPlaced", e); - } - // spotless:off - /* - * Used to be behind `IMTE_HasMultiBlockMachineRelevantData` - * Add back if needed - */ - // try { - // GregTechAPI.causeMachineUpdate(world, x, y, z); - // } catch (Throwable e) { - // GT_FML_LOGGER.error("causeMachineUpdate", e); - // } - // spotless:on - try { - if (!world.isRemote) { - world.notifyBlockChange(x, y, z, tReplacedBlock); - world.func_147453_f /* updateNeighborsAboutBlockChange */(x, y, z, block); - } - } catch (Throwable e) { - GT_FML_LOGGER.error("notifyBlockChange", e); - } - try { - mute.onTileEntityPlaced(); - } catch (Throwable e) { - GT_FML_LOGGER.error("onTileEntityPlaced", e); - } - try { - world.func_147451_t /* updateAllLightTypes */(x, y, z); - } catch (Throwable e) { - GT_FML_LOGGER.error("updateAllLightTypes", e); - } - - stack.stackSize--; - return true; - - } catch (Throwable e) { - GT_FML_LOGGER.error("onItemUse", e); - } - return false; - } - - @Override - public boolean func_150936_a /* canPlaceAtSide */(World aWorld, int aX, int aY, int aZ, int ordinalSide, - EntityPlayer aPlayer, ItemStack aStack) { - return true; - } - - @Override - public final String getUnlocalizedName() { - return block.getRegistry() - .getInternalName(); - } - - @Override - public final String getUnlocalizedName(ItemStack aStack) { - return block.getRegistry() - .getInternalName() + "." - + getDamage(aStack); - } - - @Override - public int getSpriteNumber() { - return 0; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aRegister) { - /* Empty */ - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int aMeta) { - itemIcon = Items.bread.getIconFromDamage(0); - return itemIcon; /* Fixes Eating Animation Particles. */ - } - - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack aStack) { - return false; - } - - @Override - public final boolean getShareTag() { - return true; // just to be sure - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean getIsRepairable(ItemStack aStack, ItemStack aMaterial) { - return false; - } - - @Override - public ItemStack getContainerItem(ItemStack aStack) { - return null; - } - - @Override - public final boolean hasContainerItem(ItemStack aStack) { - return getContainerItem(aStack) != null; - } - - @Override - public boolean isBookEnchantable(ItemStack aStack, ItemStack aBook) { - return false; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java deleted file mode 100644 index 186110abb73..00000000000 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java +++ /dev/null @@ -1,231 +0,0 @@ -package gregtech.api.multitileentity; - -import static gregtech.GTMod.GT_FML_LOGGER; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import com.gtnewhorizon.gtnhlib.util.map.ItemStackMap; - -import appeng.core.CreativeTab; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.LoaderState; -import gregtech.api.enums.GTValues; -import gregtech.api.multitileentity.base.MultiTileEntity; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; -import gregtech.api.util.GTLanguageManager; -import gregtech.api.util.GTUtil; -import gregtech.api.util.GTUtility; -import it.unimi.dsi.fastutil.shorts.Short2ObjectMap; -import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap; - -public class MultiTileEntityRegistry { - - private static final HashMap NAMED_REGISTRIES = new HashMap<>(); - - // TODO: NBT sensitive or not? Starting with not for now - private static final ItemStackMap REGISTRIES = new ItemStackMap<>(false); - private static final HashSet> sRegisteredTileEntities = new HashSet<>(); - - public HashMap creativeTabs = new HashMap<>(); - public final Short2ObjectMap registry = new Short2ObjectOpenHashMap<>(); - public List registrations = new ArrayList<>(); - - private final String internalName; - private final MultiTileEntityBlock block; - - /** - * @param internalName the internal Name of the Item - */ - public MultiTileEntityRegistry(String internalName, MultiTileEntityBlock block) { - if (!Loader.instance() - .isInState(LoaderState.PREINITIALIZATION)) { - throw new IllegalStateException( - "The MultiTileEntity Registry must be initialized during Preload Phase and not before"); - } - if (!block.isRegistered()) { - throw new IllegalStateException("Block not registered"); - } - this.internalName = internalName; - this.block = block; - GT_FML_LOGGER.info(internalName + " " + Block.getIdFromBlock(block) + " This is the answer"); - this.block.setRegistry(this); - REGISTRIES.put(new ItemStack(Item.getItemById(Block.getIdFromBlock(block)), 1, GTValues.W), this); - NAMED_REGISTRIES.put(internalName, this); - } - - public static TileEntity getReferenceTileEntity(int aRegistryID, int aMultiTileEntityID) { - final MultiTileEntityRegistry tRegistry = getRegistry(aRegistryID); - if (tRegistry == null) return null; - final MultiTileEntityClassContainer tClassContainer = tRegistry.getClassContainer(aMultiTileEntityID); - if (tClassContainer == null) return null; - return tClassContainer.getReferenceTileEntity(); - } - - public MultiTileEntity getReferenceTileEntity(ItemStack stack) { - return getReferenceTileEntity(Items.feather.getDamage(stack)); - } - - public MultiTileEntity getReferenceTileEntity(int metaId) { - final MultiTileEntityClassContainer muteClass = registry.get((short) metaId); - if (muteClass == null) return null; - return muteClass.getReferenceTileEntity(); - } - - public static MultiTileEntityRegistry getRegistry(int aRegistryID) { - return REGISTRIES.get(new ItemStack(Item.getItemById(aRegistryID), 1, GTValues.W)); - } - - public static MultiTileEntityRegistry getRegistry(String aRegistryName) { - return NAMED_REGISTRIES.get(aRegistryName); - } - - public MultiTileEntityClassContainer create(int aID, Class aClass) { - return new MultiTileEntityClassContainer(this, aID, aClass); - } - - /** - * Adds a new MultiTileEntity. It is highly recommended to do this in either the PreInit or the Init Phase. PostInit - * might not work well. - */ - public ItemStack add(String aLocalised, MultiTileEntityClassContainer aClassContainer) { - boolean tFailed = false; - if (GTUtility.isStringInvalid(aLocalised)) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Localisation Missing!"); - tFailed = true; - } - if (aClassContainer == null) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Class Container is null!"); - tFailed = true; - } else { - if (aClassContainer.getMuteClass() == null) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Class inside Class Container is null!"); - tFailed = true; - } - if (aClassContainer.getMuteID() == GTValues.W) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Class Container uses Wildcard MetaData!"); - tFailed = true; - } - if (aClassContainer.getMuteID() < 0) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Class Container uses negative MetaData!"); - tFailed = true; - } - if (registry.containsKey(aClassContainer.getMuteID())) { - GT_FML_LOGGER.error( - "MULTI-TILE REGISTRY ERROR: Class Container uses occupied MetaData! (" + aClassContainer.getMuteID() - + ")"); - tFailed = true; - } - } - if (tFailed) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR " + aLocalised + " : STACKTRACE START"); - int i = 0; - for (StackTraceElement tElement : new Exception().getStackTrace()) if (i++ < 5 && !tElement.getClassName() - .startsWith("sun")) GT_FML_LOGGER.error("\tat " + tElement); - else break; - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: STACKTRACE END"); - return null; - } - - GTLanguageManager.addStringLocalization(internalName + "." + aClassContainer.getMuteID() + ".name", aLocalised); - registry.put(aClassContainer.getMuteID(), aClassContainer); - mLastRegisteredID = aClassContainer.getMuteID(); - registrations.add(aClassContainer); - - if (sRegisteredTileEntities.add( - aClassContainer.getReferenceTileEntity() - .getClass())) { - aClassContainer.getReferenceTileEntity() - .onRegistrationFirst(this, aClassContainer.getMuteID()); - } - - return getItem(aClassContainer.getMuteID()); - } - - public short mLastRegisteredID = GTValues.W; - - public ItemStack getItem() { - return getItem(mLastRegisteredID, 1, null); - } - - public ItemStack getItem(int aID) { - return getItem(aID, 1, null); - } - - public ItemStack getItem(int aID, NBTTagCompound nbt) { - return getItem(aID, 1, nbt); - } - - public ItemStack getItem(int aID, long aAmount) { - return getItem(aID, aAmount, null); - } - - public ItemStack getItem(int metaID, long amount, NBTTagCompound nbt) { - final ItemStack stack = new ItemStack(block, (int) amount, metaID); - if (nbt == null || nbt.hasNoTags()) { - nbt = new NBTTagCompound(); - final TileEntity tileEntity = getNewTileEntity(metaID, nbt); - ((IMultiTileEntity) tileEntity).writeItemNBT(nbt); - } - stack.setTagCompound(nbt); - return stack; - } - - public String getLocal(int aID) { - return StatCollector.translateToLocal(internalName + "." + aID + ".name"); - } - - public MultiTileEntityClassContainer getClassContainer(int aID) { - return registry.get((short) aID); - } - - public MultiTileEntityClassContainer getClassContainer(ItemStack stack) { - return registry.get((short) Items.feather.getDamage(stack)); - } - - public TileEntity getNewTileEntity(int aID) { - return getNewTileEntity(null, 0, 0, 0, aID); - } - - public TileEntity getNewTileEntity(World aWorld, int x, int y, int z, int metaID) { - return getNewTileEntity(aWorld, x, y, z, metaID, null); - } - - public TileEntity getNewTileEntity(World aWorld, int x, int y, int z, int metaID, NBTTagCompound nbt) { - final MultiTileEntityClassContainer container = registry.get((short) metaID); - if (container == null) return null; - final MultiTileEntity te = (MultiTileEntity) GTUtility - .callConstructor(container.getMuteClass(), -1, null, true); - te.setWorldObj(aWorld); - te.xCoord = x; - te.yCoord = y; - te.zCoord = z; - nbt = (nbt == null || nbt.hasNoTags()) ? container.getParameters() - : GTUtil.fuseNBT(nbt, container.getParameters()); - te.initFromNBT(nbt, (short) metaID, (short) Block.getIdFromBlock(block)); - return te; - } - - public TileEntity getNewTileEntity(int meta, NBTTagCompound nbt) { - return getNewTileEntity(null, 0, 0, 0, meta, nbt); - } - - public String getInternalName() { - return internalName; - } - - public MultiTileEntityBlock getBlock() { - return block; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/WeakTargetRef.java b/src/main/java/gregtech/api/multitileentity/WeakTargetRef.java deleted file mode 100644 index 1509384f5ef..00000000000 --- a/src/main/java/gregtech/api/multitileentity/WeakTargetRef.java +++ /dev/null @@ -1,88 +0,0 @@ -package gregtech.api.multitileentity; - -import java.lang.ref.WeakReference; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; - -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; - -public class WeakTargetRef { - - protected final ChunkCoordinates position = new ChunkCoordinates(0, -1, 0); - protected final Class targetClass; - protected boolean shouldCache; - protected WeakReference target = new WeakReference<>(null); - protected World world = null; - - public WeakTargetRef(Class targetClass, boolean shouldCache) { - this.targetClass = targetClass; - this.shouldCache = shouldCache; - } - - public WeakTargetRef(T target, boolean shouldCache) { - this(target.getClass(), shouldCache); - setTarget(target); - } - - public void setTarget(T newTarget) { - if (!targetClass.isInstance(newTarget)) { - throw new IllegalArgumentException("Target is not of the correct type"); - } - position.set(newTarget.getXCoord(), newTarget.getYCoord(), newTarget.getZCoord()); - world = newTarget.getWorld(); - } - - public void setWorld(World world) { - this.world = world; - } - - public void setPosition(ChunkCoordinates position) { - this.position.set(position.posX, position.posY, position.posZ); - } - - public void setPosition(int x, int y, int z) { - this.position.set(x, y, z); - } - - public void setShouldCache(boolean shouldCache) { - this.shouldCache = shouldCache; - } - - public T get() { - if (!shouldCache) { - return resolveTarget(); - } - T result = target.get(); - if (result == null || result.isDead()) { - result = resolveTarget(); - if (result != null) { - target = new WeakReference<>(result); - } else { - target.clear(); - } - } - return result; - } - - @SuppressWarnings("unchecked") - protected T resolveTarget() { - if (world != null && position.posX >= 0 && world.blockExists(position.posX, position.posY, position.posZ)) { - final TileEntity te = world.getTileEntity(position.posX, position.posY, position.posZ); - return this.targetClass.isInstance(te) ? (T) te : null; - } - return null; - } - - public ChunkCoordinates getPosition() { - return position; - } - - public void invalidate() { - target.clear(); - world = null; - position.set(0, -1, 0); - } - -} diff --git a/src/main/java/gregtech/api/multitileentity/base/MultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/MultiTileEntity.java deleted file mode 100644 index b776e5e3b9a..00000000000 --- a/src/main/java/gregtech/api/multitileentity/base/MultiTileEntity.java +++ /dev/null @@ -1,1382 +0,0 @@ -package gregtech.api.multitileentity.base; - -import static gregtech.GTMod.GT_FML_LOGGER; -import static gregtech.api.enums.GTValues.VALID_SIDES; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import javax.annotation.Nonnull; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; - -import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTechAPI; -import gregtech.api.enums.GTValues; -import gregtech.api.enums.GTValues.NBT; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Mods; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons.CustomIcon; -import gregtech.api.gui.modularui.GTUIInfos; -import gregtech.api.interfaces.ITexture; -import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.metatileentity.GregTechTileClientEvents; -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.MultiTileEntityClassContainer; -import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; -import gregtech.api.multitileentity.interfaces.SyncedMultiTileEntity; -import gregtech.api.net.GTPacket; -import gregtech.api.net.GTPacketMultiTileEntity; -import gregtech.api.net.data.CommonData; -import gregtech.api.net.data.CoordinateData; -import gregtech.api.net.data.MultiTileEntityData; -import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.XSTR; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GTLog; -import gregtech.api.util.GTModHandler; -import gregtech.api.util.GTUtil; -import gregtech.api.util.GTUtility; -import gregtech.common.render.MultiTileBasicRender; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - -public abstract class MultiTileEntity extends CoverableTileEntity - implements IMultiTileEntity, MultiTileBasicRender, SyncedMultiTileEntity { - - private ITexture baseTexture = null; - private ITexture topOverlayTexture = null; - private ITexture bottomOverlayTexture = null; - private ITexture leftOverlayTexture = null; - private ITexture rightOverlayTexture = null; - private ITexture backOverlayTexture = null; - private ITexture frontOverlayTexture = null; - - // A Bounding Box without having to constantly specify the Offset Coordinates. - protected static final float[] PX_BOX = { 0, 0, 0, 1, 1, 1 }; - - public Materials material = Materials._NULL; - protected final boolean isTicking; // If this TileEntity is ticking at all - - // Checks if this TileEntity should refresh when the Block is being set. - // This way you can toggle this check at any time. - protected boolean shouldRefresh = true; - - protected boolean needsBlockUpdate = false; // This Variable is for a buffered Block Update. - protected boolean forceFullSelectionBox = false; // This Variable is for forcing the Selection Box to be full. - protected boolean needsUpdate = false; - protected boolean hasInventoryChanged = false; - protected boolean isPainted = false; - @Nonnull - protected ForgeDirection facing = ForgeDirection.WEST; // Default to WEST, so it renders facing Left in the - // inventory - protected byte color; - protected int rgba = GTValues.UNCOLORED; - private short mteID = GTValues.W, mteRegistry = GTValues.W; - private String customName = null; - private String ownerName = ""; - private UUID ownerUUID = GTUtility.defaultUuid; - private boolean lockUpgrade = false; - - private final GTPacketMultiTileEntity fullPacket = new GTPacketMultiTileEntity(); - private final GTPacketMultiTileEntity timedPacket = new GTPacketMultiTileEntity(); - private final GTPacketMultiTileEntity graphicPacket = new GTPacketMultiTileEntity(); - - public MultiTileEntity(boolean isTicking) { - this.isTicking = isTicking; - } - - @Override - public short getMultiTileEntityID() { - return mteID; - } - - @Override - public short getMultiTileEntityRegistryID() { - return mteRegistry; - } - - @Override - public void onRegistrationFirst(MultiTileEntityRegistry registry, short id) { - GameRegistry.registerTileEntity(getClass(), getTileEntityName()); - } - - @Override - public void initFromNBT(NBTTagCompound nbt, short muteID, short muteRegistry) { - if (this.mteID == muteID && this.mteRegistry == muteRegistry) { - return; - } - // Set ID and Registry ID. - this.mteID = muteID; - this.mteRegistry = muteRegistry; - // Read the Default Parameters from NBT. - if (nbt != null) readFromNBT(nbt); - } - - @Override - public void loadTextures(String folder) { - // Loading the registry - for (SidedTextureNames textureName : SidedTextureNames.TEXTURES) { - ITexture texture; - try { - Minecraft.getMinecraft() - .getResourceManager() - .getResource( - new ResourceLocation( - Mods.GregTech.ID, - "textures/blocks/multitileentity/" + folder + "/" + textureName.getName() + ".png")); - texture = TextureFactory.of(new CustomIcon("multitileentity/" + folder + "/" + textureName.getName())); - } catch (IOException ignored) { - texture = TextureFactory.of(Textures.BlockIcons.VOID); - } - switch (textureName) { - case Top -> topOverlayTexture = texture; - case Bottom -> bottomOverlayTexture = texture; - case Back -> backOverlayTexture = texture; - case Front -> frontOverlayTexture = texture; - case Left -> leftOverlayTexture = texture; - case Right -> rightOverlayTexture = texture; - case Base -> baseTexture = texture; - } - } - } - - @Override - public void copyTextures() { - // Loading an instance - final TileEntity referenceTileEntity = MultiTileEntityRegistry - .getReferenceTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); - if (!(referenceTileEntity instanceof MultiTileEntity canonicalEntity)) { - return; - } - baseTexture = canonicalEntity.baseTexture; - topOverlayTexture = canonicalEntity.topOverlayTexture; - bottomOverlayTexture = canonicalEntity.bottomOverlayTexture; - leftOverlayTexture = canonicalEntity.leftOverlayTexture; - rightOverlayTexture = canonicalEntity.rightOverlayTexture; - backOverlayTexture = canonicalEntity.backOverlayTexture; - frontOverlayTexture = canonicalEntity.frontOverlayTexture; - } - - @Override - public ITexture getTexture(ForgeDirection side) { - if (facing == side) { - return TextureFactory.of(baseTexture, frontOverlayTexture); - } - - if (facing.getOpposite() == side) { - return TextureFactory.of(baseTexture, backOverlayTexture); - } - - if (side == ForgeDirection.UP) { - return TextureFactory.of(baseTexture, topOverlayTexture); - } - - if (side == ForgeDirection.DOWN) { - return TextureFactory.of(baseTexture, bottomOverlayTexture); - } - - if (facing.getRotation(ForgeDirection.DOWN) == side) { - return TextureFactory.of(baseTexture, rightOverlayTexture); - } else { - return TextureFactory.of(baseTexture, leftOverlayTexture); - } - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - // Check if it is a World/Chunk-Loading Process calling readFromNBT - if (mteID == GTValues.W || mteRegistry == GTValues.W) { - // Read the ID Tags first - mteID = nbt.getShort(NBT.MTE_ID); - mteRegistry = nbt.getShort(NBT.MTE_REG); - // Add additional Default Parameters in case the Mod updated with new ones - final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(mteRegistry); - if (tRegistry != null) { - final MultiTileEntityClassContainer tClass = tRegistry.getClassContainer(mteID); - if (tClass != null) { - // Add the Default Parameters. Useful for things that differ between different tiers/types of the - // same machine - nbt = GTUtil.fuseNBT(nbt, tClass.getParameters()); - } - } - } - // read the Coords if it has them. - if (nbt.hasKey("x")) xCoord = nbt.getInteger("x"); - if (nbt.hasKey("y")) yCoord = nbt.getInteger("y"); - if (nbt.hasKey("z")) zCoord = nbt.getInteger("z"); - // read the custom Name. - if (nbt.hasKey(NBT.DISPLAY)) customName = nbt.getCompoundTag(NBT.DISPLAY) - .getString(NBT.CUSTOM_NAME); - - // And now everything else. - try { - if (nbt.hasKey(NBT.MATERIAL)) material = Materials.get(nbt.getString(NBT.MATERIAL)); - if (nbt.hasKey(NBT.COLOR)) rgba = nbt.getInteger(NBT.COLOR); - - ownerName = nbt.getString(NBT.OWNER); - try { - ownerUUID = UUID.fromString(nbt.getString(NBT.OWNER_UUID)); - } catch (IllegalArgumentException e) { - ownerUUID = null; - } - if (nbt.hasKey(NBT.LOCK_UPGRADE)) lockUpgrade = nbt.getBoolean(NBT.LOCK_UPGRADE); - if (nbt.hasKey(NBT.FACING)) facing = ForgeDirection.getOrientation(nbt.getInteger(NBT.FACING)); - - readCoverNBT(nbt); - readTasksNBT(nbt); - readMultiTileNBT(nbt); - - if (NetworkUtils.isDedicatedClient()) { - if (GregTechAPI.sBlockIcons == null && nbt.hasKey(NBT.TEXTURE_FOLDER)) { - loadTextures(nbt.getString(NBT.TEXTURE_FOLDER)); - } else { - copyTextures(); - } - } - - if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; - - updateCoverBehavior(); - - } catch (Throwable e) { - GT_FML_LOGGER.error("readFromNBT", e); - } - } - - public void readMultiTileNBT(NBTTagCompound aNBT) { - /* Do Nothing */ - } - - protected void readTasksNBT(NBTTagCompound nbt) {} - - @Override - public final void writeToNBT(NBTTagCompound nbt) { - super.writeToNBT(nbt); - // write the IDs - nbt.setShort(NBT.MTE_ID, mteID); - nbt.setShort(NBT.MTE_REG, mteRegistry); - // write the Custom Name - if (GTUtility.isStringValid(customName)) { - final NBTTagCompound displayNBT; - if (nbt.hasKey(NBT.DISPLAY)) { - displayNBT = nbt.getCompoundTag(NBT.DISPLAY); - } else { - displayNBT = new NBTTagCompound(); - nbt.setTag(NBT.DISPLAY, displayNBT); - } - displayNBT.setString(NBT.CUSTOM_NAME, customName); - } - - // write the rest - try { - nbt.setString(NBT.OWNER, ownerName); - nbt.setString(NBT.OWNER_UUID, ownerUUID == null ? "" : ownerUUID.toString()); - nbt.setBoolean(NBT.LOCK_UPGRADE, lockUpgrade); - nbt.setInteger(NBT.FACING, facing.ordinal()); - - writeCoverNBT(nbt, false); - writeTasksNBT(nbt); - writeMultiTileNBT(nbt); - } catch (Throwable e) { - GT_FML_LOGGER.error("writeToNBT", e); - } - } - - public void writeMultiTileNBT(NBTTagCompound aNBT) { - /* Do Nothing */ - } - - protected void writeTasksNBT(NBTTagCompound aNBT) {} - - @Override - public NBTTagCompound writeItemNBT(NBTTagCompound aNBT) { - writeCoverNBT(aNBT, true); - if (shouldSaveNBTToItemStack()) { - writeTasksNBT(aNBT); - writeMultiTileNBT(aNBT); - } - return aNBT; - } - - protected boolean shouldSaveNBTToItemStack() { - return false; - } - - @Override - public boolean useModularUI() { - return false; - } - - @Override - public long getTimer() { - return 0; - } - - @Override - public int getRandomNumber(int aRange) { - return XSTR.XSTR_INSTANCE.nextInt(aRange); - } - - @Override - public TileEntity getTileEntity(int aX, int aY, int aZ) { - if (worldObj == null - || (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ))) return null; - return GTUtil.getTileEntity(worldObj, aX, aY, aZ, true); - } - - @Override - public boolean canUpdate() { - return isTicking && shouldRefresh; - } - - @Override - public boolean shouldRefresh(Block aOldBlock, Block aNewBlock, int aOldMeta, int aNewMeta, World aWorld, int aX, - int aY, int aZ) { - return shouldRefresh || aOldBlock != aNewBlock; - } - - @Override - public void updateEntity() { - super.updateEntity(); - if (needsBlockUpdate) doBlockUpdate(); - } - - public void doBlockUpdate() { - final Block tBlock = getBlock(getCoords()); - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, tBlock); - if (this.providesStrongPower()) { - for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - if (getBlockAtSide(side) - .isNormalCube(worldObj, xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ)) { - worldObj.notifyBlocksOfNeighborChange( - xCoord + side.offsetX, - yCoord + side.offsetY, - zCoord + side.offsetZ, - tBlock, - side.getOpposite() - .ordinal()); - } - } - } - needsBlockUpdate = false; - } - - @Override - public boolean shouldSideBeRendered(ForgeDirection side) { - final TileEntity tTileEntity = getTileEntityAtSideAndDistance(side, 1); - // TODO: check to an interface - // if (getBlockAtSide(aSide) == Blocks.glass) return false; - return tTileEntity instanceof IMultiTileEntity mte ? !mte.isSurfaceOpaque(side.getOpposite()) - : !getBlockAtSide(side).isOpaqueCube(); - } - - @Override - public boolean isSurfaceOpaque(ForgeDirection side) { - return true; - } - - @Override - public void setCustomName(String aName) { - customName = aName; - } - - @Override - public String getCustomName() { - return GTUtility.isStringValid(customName) ? customName : null; - } - - @Override - public byte getColorization() { - // TODO - return 0; - } - - @Override - public boolean unpaint() { - return false; - } - - @Override - public byte setColorization(byte aColor) { - // TODO - return 0; - } - - @Override - public boolean isPainted() { - return false; - } - - @Override - public boolean paint(int aRGB) { - return false; - } - - @Override - public boolean isFacingValid(ForgeDirection facing) { - return false; - } - - @Override - public ForgeDirection getFrontFacing() { - return facing; - } - - /** - * Sets the main facing to {aSide} and update as appropriately - * - * @return Whether the facing was changed - */ - @Override - public boolean setMainFacing(ForgeDirection side) { - if (!isValidFacing(side)) return false; - facing = side; - - issueClientUpdate(); - issueBlockUpdate(); - onFacingChange(); - checkDropCover(); - doEnetUpdate(); - - if (shouldTriggerBlockUpdate()) { - // If we're triggering a block update this will call onMachineBlockUpdate() - GregTechAPI.causeMachineUpdate(worldObj, xCoord, yCoord, zCoord); - } else { - // If we're not trigger a cascading one, call the update here. - onMachineBlockUpdate(); - } - return true; - } - - @Override - public int getPaint() { - return this.rgba; - } - - @Override - public ForgeDirection getBackFacing() { - return facing.getOpposite(); - } - - @Override - public boolean isValidFacing(ForgeDirection side) { - return side != ForgeDirection.UNKNOWN && getValidFacings()[side.ordinal()]; - } - - @Override - public boolean[] getValidFacings() { - return VALID_SIDES; - } - - @Override - public void issueCoverUpdate(ForgeDirection side) { - super.issueCoverUpdate(side); - issueClientUpdate(); - } - - public AxisAlignedBB box(double[] aBox) { - return AxisAlignedBB.getBoundingBox( - xCoord + aBox[0], - yCoord + aBox[1], - zCoord + aBox[2], - xCoord + aBox[3], - yCoord + aBox[4], - zCoord + aBox[5]); - } - - public boolean box(AxisAlignedBB aAABB, List aList, double aMinX, double aMinY, double aMinZ, - double aMaxX, double aMaxY, double aMaxZ) { - final AxisAlignedBB tBox = box(aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ); - return tBox.intersectsWith(aAABB) && aList.add(tBox); - } - - @Override - public void onFacingChange() { - /* Do nothing */ - } - - public AxisAlignedBB box(double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, double aMaxZ) { - return AxisAlignedBB.getBoundingBox( - xCoord + aMinX, - yCoord + aMinY, - zCoord + aMinZ, - xCoord + aMaxX, - yCoord + aMaxY, - zCoord + aMaxZ); - } - - @Override - public boolean shouldTriggerBlockUpdate() { - return false; - } - - public boolean box(AxisAlignedBB aAABB, List aList, double[] aBox) { - final AxisAlignedBB tBox = box(aBox[0], aBox[1], aBox[2], aBox[3], aBox[4], aBox[5]); - return tBox.intersectsWith(aAABB) && aList.add(tBox); - } - - @Override - public void onMachineBlockUpdate() { - /* Do nothing */ - } - - public boolean box(AxisAlignedBB aAABB, List aList, float[] aBox) { - final AxisAlignedBB tBox = box(aBox[0], aBox[1], aBox[2], aBox[3], aBox[4], aBox[5]); - return tBox.intersectsWith(aAABB) && aList.add(tBox); - } - - public boolean box(AxisAlignedBB aAABB, List aList) { - final AxisAlignedBB tBox = box(PX_BOX); - return tBox.intersectsWith(aAABB) && aList.add(tBox); - } - - public AxisAlignedBB box(float[] aBox) { - return AxisAlignedBB.getBoundingBox( - xCoord + aBox[0], - yCoord + aBox[1], - zCoord + aBox[2], - xCoord + aBox[3], - yCoord + aBox[4], - zCoord + aBox[5]); - } - - public boolean box(Block aBlock) { - aBlock.setBlockBounds(0, 0, 0, 1, 1, 1); - return true; - } - - /** - * Causes a general Texture update. - *

- * Only used Client Side to mark Blocks dirty. - */ - @Override - public void issueTextureUpdate() { - if (!isTicking) { - markBlockForUpdate(); - } else { - needsUpdate = true; - } - } - - public boolean box(Block aBlock, double[] aBox) { - aBlock.setBlockBounds( - (float) aBox[0], - (float) aBox[1], - (float) aBox[2], - (float) aBox[3], - (float) aBox[4], - (float) aBox[5]); - return true; - } - - protected void markBlockForUpdate() { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - // worldObj.func_147479_m(xCoord, yCoord, zCoord); - needsUpdate = false; - } - - public boolean box(Block aBlock, float[] aBox) { - aBlock.setBlockBounds(aBox[0], aBox[1], aBox[2], aBox[3], aBox[4], aBox[5]); - return true; - } - - @Override - public void onTileEntityPlaced() { - /* empty */ - } - - public boolean box(Block aBlock, double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, - double aMaxZ) { - aBlock.setBlockBounds((float) aMinX, (float) aMinY, (float) aMinZ, (float) aMaxX, (float) aMaxY, (float) aMaxZ); - return true; - } - - @Override - public void setShouldRefresh(boolean aShouldRefresh) { - shouldRefresh = aShouldRefresh; - } - - /** - * shouldJoinIc2Enet - defaults to false, override to change - */ - @Override - public boolean shouldJoinIc2Enet() { - return false; - } - - @Override - public final void addCollisionBoxesToList(AxisAlignedBB aAABB, List aList, Entity aEntity) { - box(getCollisionBoundingBoxFromPool(), aAABB, aList); - } - - /** - * Simple Function to prevent Block Updates from happening multiple times within the same Tick. - */ - @Override - public final void issueBlockUpdate() { - if (isTicking) needsBlockUpdate = true; - else doBlockUpdate(); - } - - @Override - public boolean isStillValid() { - return !isInvalid(); - } - - @Override - public boolean allowCoverOnSide(ForgeDirection side, GTItemStack aCoverID) { - return true; - } - - public AxisAlignedBB box() { - return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1); - } - - public boolean box(AxisAlignedBB aBox, AxisAlignedBB aAABB, List aList) { - return aBox != null && aBox.intersectsWith(aAABB) && aList.add(aBox); - } - - public float[] shrunkBox() { - return PX_BOX; - } - - @Override - public void setBlockBoundsBasedOnState(Block aBlock) { - box(aBlock); - } - - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool() { - return box(); - } - - @Override - public AxisAlignedBB getSelectedBoundingBoxFromPool() { - if (forceFullSelectionBox) return box(); - return box(shrunkBox()); - } - - @Override - public ItemStack getPickBlock(MovingObjectPosition aTarget) { - final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(mteRegistry); - return tRegistry == null ? null : tRegistry.getItem(mteID, writeItemNBT(new NBTTagCompound())); - } - - @Override - public void onBlockAdded() {} - - @Override - public String getOwnerName() { - if (GTUtility.isStringInvalid(ownerName)) return "Player"; - return ownerName; - } - - @Override - public String setOwnerName(String aName) { - if (GTUtility.isStringInvalid(aName)) return ownerName = "Player"; - return ownerName = aName; - } - - @Override - public UUID getOwnerUuid() { - return ownerUUID; - } - - @Override - public void setOwnerUuid(UUID uuid) { - ownerUUID = uuid; - } - - @Override - public boolean onPlaced(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - ForgeDirection side, float aHitX, float aHitY, float aHitZ) { - facing = getSideForPlayerPlacing(aPlayer, facing, getValidFacings()); - setOwnerUuid(aPlayer.getUniqueID()); - setOwnerName(aPlayer.getDisplayName()); - onFacingChange(); - return true; - } - - @Override - public boolean allowInteraction(Entity aEntity) { - return true; - } - - public boolean allowRightclick(Entity aEntity) { - return allowInteraction(aEntity); - } - - @Override - public boolean onBlockActivated(EntityPlayer aPlayer, ForgeDirection side, float aX, float aY, float aZ) { - try { - return allowRightclick(aPlayer) && onRightClick(aPlayer, side, aX, aY, aZ); - } catch (Throwable e) { - GT_FML_LOGGER.error("onBlockActivated Failed", e); - e.printStackTrace(GTLog.err); - return true; - } - } - - @Override - public boolean onRightClick(EntityPlayer aPlayer, ForgeDirection side, float aX, float aY, float aZ) { - if (isClientSide()) { - // Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron - if (aPlayer.isSneaking()) { - final ForgeDirection tSide = (getCoverIDAtSide(side) == 0) - ? GTUtility.determineWrenchingSide(side, aX, aY, aZ) - : side; - return (getCoverBehaviorAtSideNew(tSide).hasCoverGUI()); - } else if (getCoverBehaviorAtSideNew(side).onCoverRightclickClient(side, this, aPlayer, aX, aY, aZ)) { - return true; - } - - if (!getCoverInfoAtSide(side).isGUIClickable()) return false; - } else { // server side - if (!privateAccess() || aPlayer.getDisplayName() - .equalsIgnoreCase(getOwnerName())) { - final ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - final ForgeDirection wrenchSide = GTUtility.determineWrenchingSide(side, aX, aY, aZ); - - if (tCurrentItem != null) { - if (getColorization() >= 0 - && GTUtility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { - // TODO (Colorization) - } - - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sWrenchList)) - return onWrenchRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ, tCurrentItem); - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sScrewdriverList)) - return onScrewdriverRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ, tCurrentItem); - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sHardHammerList)) - return onHammerRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ, tCurrentItem); - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sSoftHammerList)) - return onMalletRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ, tCurrentItem); - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sSolderingToolList)) - return onSolderingRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ, tCurrentItem); - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sWireCutterList)) - return onWireCutterRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ, tCurrentItem); - - final ForgeDirection coverSide = getCoverIDAtSide(side) == 0 ? wrenchSide : side; - - if (getCoverIDAtSide(coverSide) == 0) { - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sCovers.keySet())) { - if (GregTechAPI.getCoverBehaviorNew(tCurrentItem) - .isCoverPlaceable(coverSide, tCurrentItem, this) - && allowCoverOnSide(coverSide, new GTItemStack(tCurrentItem))) { - setCoverItemAtSide(coverSide, tCurrentItem); - if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--; - GTUtility.sendSoundToPlayers( - worldObj, - SoundResource.IC2_TOOLS_WRENCH, - 1.0F, - -1, - xCoord, - yCoord, - zCoord); - issueClientUpdate(); - } - sendCoverDataIfNeeded(); - return true; - } - } else { - if (GTUtility.isStackInList(tCurrentItem, GregTechAPI.sCrowbarList)) { - if (GTModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - GTUtility.sendSoundToPlayers( - worldObj, - SoundResource.RANDOM_BREAK, - 1.0F, - -1, - xCoord, - yCoord, - zCoord); - dropCover(coverSide, side, false); - } - sendCoverDataIfNeeded(); - return true; - } - } - } else if (aPlayer.isSneaking()) { // Sneak click, no tool -> open cover config if possible. - side = (getCoverIDAtSide(side) == 0) ? GTUtility.determineWrenchingSide(side, aX, aY, aZ) : side; - return getCoverIDAtSide(side) > 0 && getCoverBehaviorAtSideNew(side).onCoverShiftRightClick( - side, - getCoverIDAtSide(side), - getComplexCoverDataAtSide(side), - this, - aPlayer); - } - - if (getCoverBehaviorAtSideNew(side).onCoverRightClick( - side, - getCoverIDAtSide(side), - getComplexCoverDataAtSide(side), - this, - aPlayer, - aX, - aY, - aZ)) return true; - - if (!getCoverInfoAtSide(side).isGUIClickable()) return false; - - if (aPlayer.getHeldItem() != null && aPlayer.getHeldItem() - .getItem() instanceof ItemBlock) { - return false; - } - - return openModularUi(aPlayer, side); - } - } - return false; - } - - public boolean hasGui(ForgeDirection side) { - return false; - } - - boolean openModularUi(EntityPlayer aPlayer, ForgeDirection side) { - if (!hasGui(side) || !isServerSide()) { - System.out.println("No GUI or Not Serverside"); - return false; - } - - GTUIInfos.openGTTileEntityUI(this, aPlayer); - System.out.println("Trying to open a UI"); - return true; - } - - public boolean onWrenchRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ, ItemStack aTool) { - if (setMainFacing(wrenchSide)) { - GTModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GTUtility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); - } - return onWrenchRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - } - - public boolean onScrewdriverRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, - float aX, float aY, float aZ, ItemStack aTool) { - if (GTModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) { - setCoverDataAtSide( - wrenchSide, - getCoverBehaviorAtSideNew(wrenchSide).onCoverScrewdriverClick( - wrenchSide, - getCoverIDAtSide(wrenchSide), - getComplexCoverDataAtSide(wrenchSide), - this, - aPlayer, - aX, - aY, - aZ)); - // TODO: Update connections! - GTUtility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); - } - return onScrewdriverRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - } - - public boolean onHammerRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ, ItemStack aTool) { - - return onHammerRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - } - - public boolean onMalletRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ, ItemStack aTool) { - - return onMalletRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - } - - public boolean onSolderingRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, - float aX, float aY, float aZ, ItemStack aTool) { - - return onSolderingRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - } - - public boolean onWireCutterRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, - float aX, float aY, float aZ, ItemStack aTool) { - - return onWireCutterRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - } - - @Deprecated - public boolean onHammerRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ) { - return true; - } - - @Deprecated - public boolean onSolderingRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, - float aX, float aY, float aZ) { - return true; - } - - @Deprecated - public boolean onMalletRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ) { - return true; - } - - @Deprecated - public boolean onWireCutterRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, - float aX, float aY, float aZ) { - return true; - } - - @Deprecated - public boolean onWrenchRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ) { - return true; - } - - @Deprecated - public boolean onScrewdriverRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, - float aX, float aY, float aZ) { - return true; - } - - @Override - public float getExplosionResistance(Entity aExploder, double aExplosionX, double aExplosionY, double aExplosionZ) { - return getExplosionResistance(); - } - - @Override - public float getExplosionResistance() { - return 10.0F; - } - - @Override - public void onExploded(Explosion aExplosion) {} - - @Override - public boolean isSideSolid(ForgeDirection side) { - return true; - } - - @Override - public ArrayList getDrops(int aFortune, boolean aSilkTouch) { - final ArrayList rList = new ArrayList<>(); - final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(getMultiTileEntityRegistryID()); - if (tRegistry != null) rList.add(tRegistry.getItem(getMultiTileEntityID(), writeItemNBT(new NBTTagCompound()))); - return rList; - } - - @Override - public boolean onBlockBroken() { - isDead = true; - onBaseTEDestroyed(); - return false; - } - - @Override - public boolean getSubItems(MultiTileEntityBlock block, Item item, CreativeTabs tab, List list, - short aID) { - return true; - } - - @Override - public boolean recolourBlock(ForgeDirection side, byte aColor) { - // if (aColor > 15 || aColor < -1) aColor = -1; - // if(paint((byte) (aColor + 1))) { - //// updateClientData(); - //// causeBlockUpdate(); - // return true; - // } - // if (unpaint()) {updateClientData(); causeBlockUpdate(); return T;} - // mColor = (byte) (aColor + 1); - //// if (canAccessData()) mMetaTileEntity.onColorChangeServer(aColor); - return false; - } - - @Override - public boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely) { - if (aCheckPrecicely || privateAccess() || (ownerName.isEmpty())) if ((ownerName.isEmpty()) && isServerSide()) { - setOwnerName(aPlayer.getDisplayName()); - setOwnerUuid(aPlayer.getUniqueID()); - } else return !privateAccess() || aPlayer.getDisplayName() - .equals("Player") || ownerName.equals("Player") || ownerName.equals(aPlayer.getDisplayName()); - return true; - } - - @Override - public boolean privateAccess() { - return lockUpgrade; - } - - /** - * @return a Packet containing all Data which has to be synchronised to the Client - Override as needed - */ - public GTPacketMultiTileEntity getClientDataPacket() { - return new GTPacketMultiTileEntity(); - } - - @Override - public void sendClientData(EntityPlayerMP aPlayer) { - if (worldObj == null || worldObj.isRemote) return; - final GTPacket tPacket = getClientDataPacket(); - if (aPlayer == null) { - GTValues.NW.sendPacketToAllPlayersInRange(worldObj, tPacket, getXCoord(), getZCoord()); - } else { - GTValues.NW.sendToPlayer(tPacket, aPlayer); - } - sendCoverDataIfNeeded(); - } - - @Override - public boolean receiveClientData(int aEventID, int aValue) { - super.receiveClientEvent(aEventID, aValue); - if (isClientSide()) { - issueTextureUpdate(); - switch (aEventID) { - case GregTechTileClientEvents.CHANGE_COMMON_DATA: - facing = ForgeDirection.getOrientation(aValue & 7); - // mActive = ((aValue & 8) != 0); - mRedstone = ((aValue & 16) != 0); - // mLockUpgrade = ((aValue&32) != 0); - // mWorks = ((aValue & 64) != 0); - break; - case GregTechTileClientEvents.CHANGE_CUSTOM_DATA: - // Nothing here, currently - break; - case GregTechTileClientEvents.CHANGE_COLOR: - if (aValue > 16 || aValue < 0) aValue = 0; - color = (byte) aValue; - break; - case GregTechTileClientEvents.CHANGE_REDSTONE_OUTPUT: - mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0); - mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0); - mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0); - mSidedRedstone[3] = (byte) ((aValue & 8) == 8 ? 15 : 0); - mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0); - mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0); - break; - // case GregTechTileClientEvents.DO_SOUND: - // if (mTickTimer > 20) - // doSound((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); - // break; - // case GregTechTileClientEvents.START_SOUND_LOOP: - // if (mTickTimer > 20) - // startSoundLoop((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); - // break; - // case GregTechTileClientEvents.STOP_SOUND_LOOP: - // if (mTickTimer > 20) - // stopSoundLoop((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); - // break; - // case GregTechTileClientEvents.CHANGE_LIGHT: - // mLightValue = (byte) aValue; - // break; - } - } - return true; - } - - @Override - public Packet getDescriptionPacket() { - issueClientUpdate(); - return null; - } - - @Override - public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { - super.getWailaBody(itemStack, currentTip, accessor, config); - currentTip.add(String.format("Facing: %s", getFrontFacing().name())); - } - - @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { - super.getWailaNBTData(player, tile, tag, world, x, y, z); - } - - @Override - public ArrayList getDebugInfo(EntityPlayer aPlayer, int aLogLevel) { - final ArrayList tList = new ArrayList<>(); - if (aLogLevel > 2) { - tList.add( - "MultiTileRegistry-ID: " + EnumChatFormatting.BLUE - + mteRegistry - + EnumChatFormatting.RESET - + " MultiTile-ID: " - + EnumChatFormatting.BLUE - + mteID - + EnumChatFormatting.RESET); - } - - addDebugInfo(aPlayer, aLogLevel, tList); - - return tList; - } - - protected void addDebugInfo(EntityPlayer aPlayer, int aLogLevel, ArrayList tList) { - /* Do nothing */ - } - - /** - * Energy - Do nothing by Default - */ - @Override - public boolean isUniversalEnergyStored(long aEnergyAmount) { - return false; - } - - @Override - public long getUniversalEnergyStored() { - return 0; - } - - @Override - public long getUniversalEnergyCapacity() { - return 0; - } - - @Override - public long getOutputAmperage() { - return 0; - } - - @Override - public long getOutputVoltage() { - return 0; - } - - @Override - public long getInputAmperage() { - return 0; - } - - @Override - public long getInputVoltage() { - return 0; - } - - @Override - public boolean decreaseStoredEnergyUnits(long energy, boolean ignoreTooLittleEnergy) { - return false; - } - - @Override - public boolean increaseStoredEnergyUnits(long energy, boolean ignoreTooMuchEnergy) { - return false; - } - - @Override - public boolean drainEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) { - return false; - } - - @Override - public long getAverageElectricInput() { - return 0; - } - - @Override - public long getAverageElectricOutput() { - return 0; - } - - @Override - public long getStoredEU() { - return 0; - } - - @Override - public long getEUCapacity() { - return 0; - } - - @Override - public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) { - return 0; - } - - @Override - public boolean inputEnergyFrom(ForgeDirection side) { - return false; - } - - @Override - public boolean outputsEnergyTo(ForgeDirection side) { - return false; - } - - /** - * Inventory - Do nothing by default - */ - - @Override - public boolean hasInventoryBeenModified() { - return false; - } - - @Override - public boolean isValidSlot(int aIndex) { - return false; - } - - @Override - public boolean addStackToSlot(int aIndex, ItemStack aStack) { - return false; - } - - @Override - public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) { - return false; - } - - @Override - public void markInventoryBeenModified() { - hasInventoryChanged = true; - } - - /* - * Cover Helpers - */ - - public boolean coverLetsFluidIn(ForgeDirection side, Fluid aFluid) { - return getCoverInfoAtSide(side).letsFluidIn(aFluid); - } - - public boolean coverLetsFluidOut(ForgeDirection side, Fluid aFluid) { - return getCoverInfoAtSide(side).letsFluidOut(aFluid); - } - - public boolean coverLetsEnergyIn(ForgeDirection side) { - return getCoverInfoAtSide(side).letsEnergyIn(); - } - - public boolean coverLetsEnergyOut(ForgeDirection side) { - return getCoverInfoAtSide(side).letsEnergyOut(); - } - - public boolean coverLetsItemsIn(ForgeDirection side, int aSlot) { - return getCoverInfoAtSide(side).letsItemsIn(aSlot); - } - - public boolean coverLetsItemsOut(ForgeDirection side, int aSlot) { - return getCoverInfoAtSide(side).letsItemsOut(aSlot); - } - - @Override - public ItemStack getStackForm(long aAmount) { - return new ItemStack(Item.getItemById(getMultiTileEntityRegistryID()), (int) aAmount, getMultiTileEntityID()); - } - - protected enum SidedTextureNames { - - Base("base"), - Left("left"), - Right("right"), - Top("top"), - Bottom("bottom"), - Back("back"), - Front("front"); - - private final String name; - public static final SidedTextureNames[] TEXTURES = { Base, Left, Right, Top, Bottom, Back, Front }; - - SidedTextureNames(String name) { - this.name = name; - } - - public String getName() { - return name; - } - } - - protected enum StatusTextures { - - Active("active", false), - ActiveWithGlow("active_glow", true), - Inactive("inactive", false), - InactiveWithGlow("inactive_glow", true); - - private final String name; - private final boolean hasGlow; - public static final StatusTextures[] TEXTURES = { Active, ActiveWithGlow, Inactive, InactiveWithGlow }; - - StatusTextures(String name, boolean hasGlow) { - this.name = name; - this.hasGlow = hasGlow; - } - - public String getName() { - return name; - } - - public boolean hasGlow() { - return hasGlow; - } - } - - @Override - public void getFullPacketData(GTPacketMultiTileEntity packet) { - packet.addData(new CoordinateData(getCoords())); - packet.addData(new CommonData(mStrongRedstone, color, (byte) 0)); - packet.addData(new MultiTileEntityData(mteRegistry, mteID)); - } - - @Override - public void getGraphicPacketData(GTPacketMultiTileEntity packet) { - packet.addData(new CoordinateData(getCoords())); - packet.addData(new MultiTileEntityData(mteRegistry, mteID)); - } - - @Override - public void getTimedPacketData(GTPacketMultiTileEntity packet) { - packet.addData(new CoordinateData(getCoords())); - packet.addData(new MultiTileEntityData(mteRegistry, mteID)); - } - - @Override - public void sendFullPacket(@Nonnull EntityPlayerMP player) { - fullPacket.clearData(); - getFullPacketData(fullPacket); - GTValues.NW.sendToPlayer(fullPacket, player); - } - - @Override - public void sendGraphicPacket() { - graphicPacket.clearData(); - getGraphicPacketData(graphicPacket); - GTValues.NW.sendPacketToAllPlayersInRange(worldObj, graphicPacket, getXCoord(), getZCoord()); - } - - @Override - public void sendTimedPacket() { - timedPacket.clearData(); - getTimedPacketData(timedPacket); - GTValues.NW.sendPacketToAllPlayersInRange(worldObj, timedPacket, getXCoord(), getZCoord()); - } - - @Override - public void onChunkUnload() { - super.onChunkUnload(); - } -} diff --git a/src/main/java/gregtech/api/multitileentity/base/NonTickableMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/NonTickableMultiTileEntity.java deleted file mode 100644 index 7866ad69dc7..00000000000 --- a/src/main/java/gregtech/api/multitileentity/base/NonTickableMultiTileEntity.java +++ /dev/null @@ -1,62 +0,0 @@ -package gregtech.api.multitileentity.base; - -import static gregtech.api.enums.GTValues.NW; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.Packet; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.net.GTPacketSendCoverData; -import gregtech.api.util.ISerializableObject; -import gregtech.common.covers.CoverInfo; - -public abstract class NonTickableMultiTileEntity extends MultiTileEntity { - - boolean mConstructed = false; // Keeps track of whether this TE has been constructed and placed in the world - - public NonTickableMultiTileEntity() { - super(false); - } - - @Override - public void issueClientUpdate() { - if (worldObj != null && !worldObj.isRemote) { - sendClientData(null); - sendGraphicPacket(); - } - } - - @Override - public Packet getDescriptionPacket() { - // We should have a world object and have been constructed by this point - mConstructed = true; - - super.getDescriptionPacket(); - // We don't get ticked, so if we have any cover data that needs to be sent, send it now - sendCoverDataIfNeeded(); - return null; - } - - @Override - public void issueCoverUpdate(ForgeDirection side) { - if (!mConstructed) { - // Queue these up and send them with the description packet - super.issueCoverUpdate(side); - } else { - // Otherwise, send the data right away - final CoverInfo coverInfo = getCoverInfoAtSide(side); - NW.sendPacketToAllPlayersInRange(worldObj, new GTPacketSendCoverData(coverInfo, this), xCoord, zCoord); - - // Just in case - coverInfo.setNeedsUpdate(false); - } - } - - @Override - public void receiveCoverData(ForgeDirection coverSide, int aCoverID, ISerializableObject aCoverData, - EntityPlayerMP aPlayer) { - super.receiveCoverData(coverSide, aCoverID, aCoverData, aPlayer); - // We don't get ticked so issue the texture update right away - issueTextureUpdate(); - } -} diff --git a/src/main/java/gregtech/api/multitileentity/base/TickableMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/TickableMultiTileEntity.java deleted file mode 100644 index dfc600483be..00000000000 --- a/src/main/java/gregtech/api/multitileentity/base/TickableMultiTileEntity.java +++ /dev/null @@ -1,172 +0,0 @@ -package gregtech.api.multitileentity.base; - -import static gregtech.GTMod.GT_FML_LOGGER; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.enums.GTValues; -import gregtech.api.task.TaskHost; -import gregtech.api.task.TickableTask; -import gregtech.api.util.GTLog; -import gregtech.api.util.GTUtil; - -public abstract class TickableMultiTileEntity extends MultiTileEntity implements TaskHost { - - /** Variable for seeing if the Tick Function is called right now. */ - public boolean isRunningTick = false; - /** Gets set to true when the Block received a Block Update. */ - public boolean blockUpdated = false; - /** Timer Value */ - protected long timer = 0; - /** Variable for updating Data to the Client */ - private boolean sendClientData = false; - - private final Map> tasks = new HashMap<>(); - - public TickableMultiTileEntity() { - super(true); - } - - @Override - public final void registerTask(@Nonnull TickableTask task) { - if (tasks.containsKey(task.getName())) { - throw new IllegalStateException(String.format("Task with name %s is already registered", task.getName())); - } - tasks.put(task.getName(), task); - } - - @Nullable - public TickableTask getTask(@Nonnull String name) { - return tasks.get(name); - } - - @Override - public final void updateEntity() { - isRunningTick = true; - final boolean isServerSide = isServerSide(); - try { - if (timer++ == 0) { - markDirty(); - GTUtil.markChunkDirty(this); - onFirstTick(isServerSide); - } - if (isDead()) { - return; - } - onPreTick(timer, isServerSide); - super.updateEntity(); - if (!isServerSide && needsUpdate) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - needsUpdate = false; - } - onTick(timer, isServerSide); - for (TickableTask task : tasks.values()) { - task.update(timer, isServerSide); - } - if (isServerSide && timer > 2 && sendClientData) { - sendClientData(null); - } - onPostTick(timer, isServerSide); - - } catch (Throwable e) { - GT_FML_LOGGER.error("UpdateEntity Failed", e); - e.printStackTrace(GTLog.err); - try { - onTickFailed(timer, isServerSide); - } catch (Throwable e2) { - GT_FML_LOGGER.error("UpdateEntity:onTickFailed Failed", e); - } - } - - isRunningTick = false; - } - - @Override - public void sendClientData(EntityPlayerMP aPlayer) { - if (sendClientData) { - // GT_FML_LOGGER.info("Sending client data"); - super.sendClientData(aPlayer); - sendClientData = false; - } - } - - /** - * The very first Tick happening to this TileEntity. - */ - public void onFirstTick(boolean isServerSide) { - if (isServerSide) { - checkDropCover(); - } else { - requestCoverDataIfNeeded(); - } - } - - /** - * The first part of the Tick, before block update. - */ - public void onPreTick(long tick, boolean isServerSide) {} - - /** - * The regular Tick. After block update, before sending data to client. - */ - public void onTick(long tick, boolean isServerSide) {} - - /** - * The absolute last part of the Tick, after sending data to client. - */ - public void onPostTick(long tick, boolean isServerSide) {} - - /** - * Gets called when there is an Exception/Error happening during one of the Tick methods. - */ - public void onTickFailed(long tick, boolean isServerSide) {} - - @Override - protected final void readTasksNBT(NBTTagCompound nbt) { - if (nbt.hasKey(GTValues.NBT.TASKS)) { - NBTTagCompound tasksTag = nbt.getCompoundTag(GTValues.NBT.TASKS); - for (TickableTask task : tasks.values()) { - if (tasksTag.hasKey(task.getName())) { - task.readFromNBT(tasksTag.getCompoundTag(task.getName())); - } - } - } - } - - @Override - protected final void writeTasksNBT(NBTTagCompound aNBT) { - NBTTagCompound tasksTag = new NBTTagCompound(); - for (TickableTask task : tasks.values()) { - NBTTagCompound tag = new NBTTagCompound(); - task.writeToNBT(tag); - tasksTag.setTag(task.getName(), tag); - } - aNBT.setTag(GTValues.NBT.TASKS, tasksTag); - } - - @Override - public void onNeighborBlockChange(World aWorld, Block aBlock) { - blockUpdated = true; - } - - @Override - public void issueClientUpdate() { - sendClientData = true; - sendGraphicPacket(); - } - - @Override - public byte getComparatorValue(ForgeDirection side) { - return 0; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileCasing.java b/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileCasing.java deleted file mode 100644 index 4efaff34d75..00000000000 --- a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileCasing.java +++ /dev/null @@ -1,43 +0,0 @@ -package gregtech.api.multitileentity.enums; - -import static gregtech.api.util.GT_StructureUtilityMuTE.createMuTEStructureCasing; -import static gregtech.loaders.preload.GT_Loader_MultiTileEntities.CASING_REGISTRY_NAME; - -import gregtech.api.enums.GTValues; -import gregtech.api.util.GT_StructureUtilityMuTE; - -public enum GT_MultiTileCasing { - - CokeOven(0), - Chemical(1), - Distillation(2), - Macerator(18000), - LaserEngraver(4), - Mirror(5), - BlackLaserEngraverCasing(6), - LaserEngraverUpgrade1(7), - LaserEngraverUpgrade2(8), - LaserEngraverUpgrade3(9), - LaserEngraverUpgrade4(10), - NONE(GTValues.W); - - private final int meta; - private final GT_StructureUtilityMuTE.MuTEStructureCasing casing; - - GT_MultiTileCasing(int meta) { - this.meta = meta; - casing = createMuTEStructureCasing(CASING_REGISTRY_NAME, meta); - } - - public int getId() { - return meta; - } - - public short getRegistryId() { - return (short) casing.getRegistryId(); - } - - public GT_StructureUtilityMuTE.MuTEStructureCasing getCasing() { - return casing; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileComponentCasing.java b/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileComponentCasing.java deleted file mode 100644 index 431da32353b..00000000000 --- a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileComponentCasing.java +++ /dev/null @@ -1,130 +0,0 @@ -package gregtech.api.multitileentity.enums; - -import gregtech.api.enums.GTValues; - -public enum GT_MultiTileComponentCasing { - - LV_Motor(0), - MV_Motor(1), - HV_Motor(2), - EV_Motor(3), - IV_Motor(4), - LuV_Motor(5), - ZPM_Motor(6), - UV_Motor(7), - UHV_Motor(8), - UEV_Motor(9), - UIV_Motor(10), - UMV_Motor(11), - UXV_Motor(12), - MAX_Motor(13), - LV_Pump(14), - MV_Pump(15), - HV_Pump(16), - EV_Pump(17), - IV_Pump(18), - LuV_Pump(19), - ZPM_Pump(20), - UV_Pump(21), - UHV_Pump(22), - UEV_Pump(23), - UIV_Pump(24), - UMV_Pump(25), - UXV_Pump(26), - MAX_Pump(27), - LV_Conveyor(28), - MV_Conveyor(29), - HV_Conveyor(30), - EV_Conveyor(31), - IV_Conveyor(32), - LuV_Conveyor(33), - ZPM_Conveyor(34), - UV_Conveyor(35), - UHV_Conveyor(36), - UEV_Conveyor(37), - UIV_Conveyor(38), - UMV_Conveyor(39), - UXV_Conveyor(40), - MAX_Conveyor(41), - LV_Piston(42), - MV_Piston(43), - HV_Piston(44), - EV_Piston(45), - IV_Piston(46), - LuV_Piston(47), - ZPM_Piston(48), - UV_Piston(49), - UHV_Piston(50), - UEV_Piston(51), - UIV_Piston(52), - UMV_Piston(53), - UXV_Piston(54), - MAX_Piston(55), - LV_RobotArm(56), - MV_RobotArm(57), - HV_RobotArm(58), - EV_RobotArm(59), - IV_RobotArm(60), - LuV_RobotArm(61), - ZPM_RobotArm(62), - UV_RobotArm(63), - UHV_RobotArm(64), - UEV_RobotArm(65), - UIV_RobotArm(66), - UMV_RobotArm(67), - UXV_RobotArm(68), - MAX_RobotArm(69), - LV_Emitter(70), - MV_Emitter(71), - HV_Emitter(72), - EV_Emitter(73), - IV_Emitter(74), - LuV_Emitter(75), - ZPM_Emitter(76), - UV_Emitter(77), - UHV_Emitter(78), - UEV_Emitter(79), - UIV_Emitter(80), - UMV_Emitter(81), - UXV_Emitter(82), - MAX_Emitter(83), - LV_Sensor(84), - MV_Sensor(85), - HV_Sensor(86), - EV_Sensor(87), - IV_Sensor(88), - LuV_Sensor(89), - ZPM_Sensor(90), - UV_Sensor(91), - UHV_Sensor(92), - UEV_Sensor(93), - UIV_Sensor(94), - UMV_Sensor(95), - UXV_Sensor(96), - MAX_Sensor(97), - LV_FieldGenerator(98), - MV_FieldGenerator(99), - HV_FieldGenerator(100), - EV_FieldGenerator(101), - IV_FieldGenerator(102), - LuV_FieldGenerator(103), - ZPM_FieldGenerator(104), - UV_FieldGenerator(105), - UHV_FieldGenerator(106), - UEV_FieldGenerator(107), - UIV_FieldGenerator(108), - UMV_FieldGenerator(109), - UXV_FieldGenerator(110), - MAX_FieldGenerator(111), - NONE(GTValues.W); - - private final int meta; - - GT_MultiTileComponentCasing(int meta) { - this.meta = meta; - } - - public int getId() { - return meta; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileMachine.java b/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileMachine.java deleted file mode 100644 index 6787ab00d71..00000000000 --- a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileMachine.java +++ /dev/null @@ -1,19 +0,0 @@ -package gregtech.api.multitileentity.enums; - -import gregtech.api.enums.GTValues; - -public enum GT_MultiTileMachine { - - CokeOven(0), - NONE(GTValues.W); - - private final int meta; - - GT_MultiTileMachine(int meta) { - this.meta = meta; - } - - public int getId() { - return meta; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileUpgradeCasing.java b/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileUpgradeCasing.java deleted file mode 100644 index 5acdd5aeef7..00000000000 --- a/src/main/java/gregtech/api/multitileentity/enums/GT_MultiTileUpgradeCasing.java +++ /dev/null @@ -1,71 +0,0 @@ -package gregtech.api.multitileentity.enums; - -import gregtech.api.enums.GTValues; - -public enum GT_MultiTileUpgradeCasing { - - ULV_Inventory(0), - LV_Inventory(1), - MV_Inventory(2), - HV_Inventory(3), - EV_Inventory(4), - IV_Inventory(5), - LuV_Inventory(6), - ZPM_Inventory(7), - UV_Inventory(8), - UHV_Inventory(9), - UEV_Inventory(10), - UIV_Inventory(11), - UXV_Inventory(12), - UMV_Inventory(13), - MAX_Inventory(14), - ULV_Tank(15), - LV_Tank(16), - MV_Tank(17), - HV_Tank(18), - EV_Tank(19), - IV_Tank(20), - LuV_Tank(21), - ZPM_Tank(22), - UV_Tank(23), - UHV_Tank(24), - UEV_Tank(25), - UIV_Tank(26), - UXV_Tank(27), - UMV_Tank(28), - MAX_Tank(29), - Amp_4(30), - Amp_16(31), - Amp_64(32), - Amp_256(33), - Amp_1_024(34), - Amp_4_096(35), - Amp_16_384(36), - Amp_65_536(37), - Amp_262_144(38), - Amp_1_048_576(39), - Laser(40), - Wireless(41), - Cleanroom(42), - Heater_Prototype(100), - Heater_IndustrialGrade(101), - Heater_NextGen(102), - Heater_Omnipotent(103), - Heater_OmegaType(104), - Insulator_Prototype(105), - Insulator_IndustrialGrade(106), - Insulator_NextGen(107), - Insulator_Omnipotent(108), - Insulator_OmegaType(109), - NONE(GTValues.W); - - private final int meta; - - GT_MultiTileUpgradeCasing(int meta) { - this.meta = meta; - } - - public int getId() { - return meta; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/enums/MultiTileCasingPurpose.java b/src/main/java/gregtech/api/multitileentity/enums/MultiTileCasingPurpose.java deleted file mode 100644 index 2733da33cf7..00000000000 --- a/src/main/java/gregtech/api/multitileentity/enums/MultiTileCasingPurpose.java +++ /dev/null @@ -1,13 +0,0 @@ -package gregtech.api.multitileentity.enums; - -/** - * Purposes with which a casing can registered itself in the MuTE controller to be ticked. - * Can be used for example to auto output recipe outputs from output casings. - * - * @author minecraft7771 - */ -public enum MultiTileCasingPurpose { - ItemOutput, - FluidOutput, - EnergyOutput, -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java deleted file mode 100644 index 58af918c501..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java +++ /dev/null @@ -1,51 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import java.util.UUID; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.util.ChunkCoordinates; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.enums.InventoryType; -import gregtech.api.gui.GUIHost; -import gregtech.api.logic.FluidInventoryLogic; -import gregtech.api.logic.ItemInventoryLogic; -import gregtech.api.logic.interfaces.FluidInventoryLogicHost; -import gregtech.api.logic.interfaces.ItemInventoryLogicHost; -import gregtech.api.logic.interfaces.PowerLogicHost; -import gregtech.api.multitileentity.enums.MultiTileCasingPurpose; - -public interface IMultiBlockController - extends IMultiTileEntity, FluidInventoryLogicHost, ItemInventoryLogicHost, UpgradableMuTE, PowerLogicHost, GUIHost { - - boolean checkStructure(boolean aForceReset); - - /** Set the structure as having changed, and trigger an update */ - void onStructureChange(); - - @Override - ChunkCoordinates getCoords(); - - void registerCoveredPartOnSide(final ForgeDirection side, IMultiBlockPart part); - - void unregisterCoveredPartOnSide(final ForgeDirection side, IMultiBlockPart part); - - void registerCaseWithPurpose(MultiTileCasingPurpose purpose, IMultiBlockPart part); - - void unregisterCaseWithPurpose(MultiTileCasingPurpose purpose, IMultiBlockPart part); - - UUID registerItemInventory(int slots, int tier, @Nonnull InventoryType type, boolean isUpgradeInventory); - - ItemInventoryLogic unregisterItemInventory(@Nonnull UUID id, @Nonnull InventoryType type); - - void changeItemInventoryDisplayName(@Nonnull UUID id, @Nullable String displayName, @Nonnull InventoryType type); - - UUID registerFluidInventory(int tanks, long capacity, int tier, @Nonnull InventoryType type, - boolean isUpgradeInventory); - - FluidInventoryLogic unregisterFluidInventory(@Nonnull UUID id, @Nonnull InventoryType type); - - void changeFluidInventoryDisplayName(@Nonnull UUID id, @Nullable String displayName, @Nonnull InventoryType type); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java deleted file mode 100644 index d6d8bf53108..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java +++ /dev/null @@ -1,42 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -interface IMultiBlockEnergy { - - boolean isUniversalEnergyStored(MultiBlockPart aPart, long aEnergyAmount); - - long getUniversalEnergyStored(MultiBlockPart aPart); - - long getUniversalEnergyCapacity(MultiBlockPart aPart); - - long getOutputAmperage(MultiBlockPart aPart); - - long getOutputVoltage(MultiBlockPart aPart); - - long getInputAmperage(MultiBlockPart aPart); - - long getInputVoltage(MultiBlockPart aPart); - - boolean decreaseStoredEnergyUnits(MultiBlockPart aPart, long aEnergy, boolean aIgnoreTooLittleEnergy); - - boolean increaseStoredEnergyUnits(MultiBlockPart aPart, long aEnergy, boolean aIgnoreTooMuchEnergy); - - boolean drainEnergyUnits(MultiBlockPart aPart, ForgeDirection side, long aVoltage, long aAmperage); - - long injectEnergyUnits(MultiBlockPart aPart, ForgeDirection side, long aVoltage, long aAmperage); - - long getAverageElectricInput(MultiBlockPart aPart); - - long getAverageElectricOutput(MultiBlockPart aPart); - - long getStoredEU(MultiBlockPart aPart); - - long getEUCapacity(MultiBlockPart aPart); - - boolean inputEnergyFrom(MultiBlockPart aPart, ForgeDirection side); - - boolean outputsEnergyTo(MultiBlockPart aPart, ForgeDirection side); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java deleted file mode 100644 index b513f51324d..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import java.util.List; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidTank; - -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public interface IMultiBlockFluidHandler { - - int fill(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoFill); - - FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain); - - FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain); - - boolean canFill(MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid); - - boolean canDrain(MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid); - - FluidTankInfo[] getTankInfo(MultiBlockPart aPart, ForgeDirection aDirection); - - IFluidTank[] getFluidTanksForGUI(MultiBlockPart aPart); - - List getTankArrayNames(MultiBlockPart aPart); - - List getTankArrayIDs(MultiBlockPart aPart); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java deleted file mode 100644 index 5dc0fec1964..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java +++ /dev/null @@ -1,60 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; - -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public interface IMultiBlockInventory { - - boolean hasInventoryBeenModified(MultiBlockPart aPart); - - boolean isValidSlot(MultiBlockPart aPart, int aIndex); - - boolean addStackToSlot(MultiBlockPart aPart, int aIndex, ItemStack aStack); - - boolean addStackToSlot(MultiBlockPart aPart, int aIndex, ItemStack aStack, int aAmount); - - int[] getAccessibleSlotsFromSide(MultiBlockPart aPart, ForgeDirection side); - - boolean canInsertItem(MultiBlockPart aPart, int aSlot, ItemStack aStack, ForgeDirection side); - - boolean canExtractItem(MultiBlockPart aPart, int aSlot, ItemStack aStack, ForgeDirection side); - - int getSizeInventory(MultiBlockPart aPart); - - ItemStack getStackInSlot(MultiBlockPart aPart, int aSlot); - - ItemStack decrStackSize(MultiBlockPart aPart, int aSlot, int aDecrement); - - ItemStack getStackInSlotOnClosing(MultiBlockPart aPart, int aSlot); - - void setInventorySlotContents(MultiBlockPart aPart, int aSlot, ItemStack aStack); - - String getInventoryName(MultiBlockPart aPart); - - boolean hasCustomInventoryName(MultiBlockPart aPart); - - int getInventoryStackLimit(MultiBlockPart aPart); - - void markDirty(MultiBlockPart aPart); - - boolean isUseableByPlayer(MultiBlockPart aPart, EntityPlayer aPlayer); - - void openInventory(MultiBlockPart aPart); - - void closeInventory(MultiBlockPart aPart); - - boolean isItemValidForSlot(MultiBlockPart aPart, int aSlot, ItemStack aStack); - - IItemHandlerModifiable getInventoryForGUI(MultiBlockPart aPart); - - List getInventoryNames(MultiBlockPart aPart); - - List getInventoryIDs(MultiBlockPart aPart); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java deleted file mode 100644 index f5bbbec7ab2..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockPart.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import java.util.UUID; - -import net.minecraft.util.ChunkCoordinates; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.logic.interfaces.FluidInventoryLogicHost; -import gregtech.api.logic.interfaces.ItemInventoryLogicHost; - -public interface IMultiBlockPart extends IMultiTileEntity, ItemInventoryLogicHost, FluidInventoryLogicHost { - - ChunkCoordinates getTargetPos(); - - void setLockedInventoryIndex(int aIndex); - - int getLockedInventoryIndex(); - - UUID getLockedInventory(); - - boolean tickCoverAtSide(ForgeDirection side, long aTickTimer); - - boolean shouldTick(long tickTimer); - - int getMode(); - - void setMode(int mode); - - int getAllowedModes(); - - void setAllowedModes(int allowedModes); - -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java deleted file mode 100644 index b16ca8a376b..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java +++ /dev/null @@ -1,237 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IDebugableTileEntity; -import gregtech.api.interfaces.tileentity.ITurnable; -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.MultiTileEntityRegistry; - -/* - * Heavily inspired by GT6 - */ -public interface IMultiTileEntity extends ICoverable, ITurnable, IDebugableTileEntity { - - /** - * Those two IDs HAVE to be saved inside the NBT of the TileEntity itself. They get set by the Registry itself, when - * the TileEntity is placed. - */ - short getMultiTileEntityID(); - - short getMultiTileEntityRegistryID(); - - /** - * Called by the Registry with the default NBT Parameters and the two IDs you have to save, when the TileEntity is - * created. aNBT may be null, take that into account if you decide to call the regular readFromNBT Function from - * here. - */ - void initFromNBT(NBTTagCompound aNBT, short aMTEID, short aMTERegistry); - - /** Writes Item Data to the NBT. */ - NBTTagCompound writeItemNBT(NBTTagCompound aNBT); - - /** Sets the Item Display Name. Use null to reset it. */ - void setCustomName(String aName); - - String getCustomName(); - - /** return the internal Name of this TileEntity to be registered. */ - String getTileEntityName(); - - /** - * Called when a TileEntity of this particular Class is being registered first at any MultiTileEntity Registry. So - * basically one call per Class. - */ - void onRegistrationFirst(MultiTileEntityRegistry aRegistry, short aID); - - /** Called after the TileEntity has been placed and set up. */ - void onTileEntityPlaced(); - - /** Checks if the TileEntity is Invalid or Unloaded, should bes required for every TileEntity. */ - @Override - boolean isDead(); - - void loadTextures(String folder); - - void copyTextures(); - - void issueClientUpdate(); - - void sendClientData(EntityPlayerMP aPlayer); - - boolean receiveClientData(int aEventID, int aValue); - - void setShouldRefresh(boolean aShouldRefresh); - - void addCollisionBoxesToList(AxisAlignedBB aAABB, List aList, Entity aEntity); - - AxisAlignedBB getCollisionBoundingBoxFromPool(); - - AxisAlignedBB getSelectedBoundingBoxFromPool(); - - void setBlockBoundsBasedOnState(Block aBlock); - - void onBlockAdded(); - - boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely); - - boolean privateAccess(); - - /** @return the amount of Time this TileEntity has been loaded. */ - @Override - long getTimer(); - - /** Sets the Owner of the Machine. Returns the set Name. */ - String setOwnerName(String aName); - - /** gets the Name of the Machines Owner or "Player" if not set. */ - String getOwnerName(); - - /** Gets the UniqueID of the Machines Owner. */ - UUID getOwnerUuid(); - - /** Sets the UniqueID of the Machines Owner. */ - void setOwnerUuid(UUID uuid); - - /** - * Causes a general Texture update. Only used Client Side to mark Blocks dirty. - */ - void issueTextureUpdate(); - - /** - * Paintable Support - */ - boolean unpaint(); - - boolean isPainted(); - - boolean paint(int aRGB); - - int getPaint(); - - /** - * Sets the main facing to {side} and update as appropriately - * - * @return Whether the facing was changed - */ - boolean setMainFacing(ForgeDirection side); - - boolean isFacingValid(ForgeDirection facing); - - void onFacingChange(); - - @Override - default void setFrontFacing(ForgeDirection side) { - setMainFacing(side); - } - - boolean shouldTriggerBlockUpdate(); - - void onMachineBlockUpdate(); - - boolean allowInteraction(Entity aEntity); - - default void onLeftClick(EntityPlayer aPlayer) { - /* do nothing */ - } - - boolean onBlockActivated(EntityPlayer aPlayer, ForgeDirection side, float aX, float aY, float aZ); - - boolean onRightClick(EntityPlayer aPlayer, ForgeDirection side, float aX, float aY, float aZ); - - ArrayList getDrops(int aFortune, boolean aSilkTouch); - - boolean isSideSolid(ForgeDirection side); - - float getExplosionResistance(Entity aExploder, double aExplosionX, double aExplosionY, double aExplosionZ); - - float getExplosionResistance(); - - void onExploded(Explosion aExplosion); - - boolean recolourBlock(ForgeDirection side, byte aColor); - - /** Adds to the Creative Tab. return false to prevent it from being added. */ - boolean getSubItems(MultiTileEntityBlock block, Item item, CreativeTabs tab, List list, short aID); - - ItemStack getPickBlock(MovingObjectPosition aTarget); - - boolean shouldSideBeRendered(ForgeDirection side); - - boolean isSurfaceOpaque(ForgeDirection side); - - boolean onPlaced(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, ForgeDirection side, - float aHitX, float aHitY, float aHitZ); - - /** return true to prevent the TileEntity from being removed. */ - boolean onBlockBroken(); - - default void onNeighborBlockChange(World aWorld, Block aBlock) { - /* Do Nothing */ - } - - // ItemStack getPickBlock(MovingObjectPosition aTarget); - - /** Remember that it passes the opposite Side due to the way vanilla works! */ - default int isProvidingWeakPower(ForgeDirection oppositeSide) { - return 0; - } - - default boolean providesStrongPower() { - return false; - } - - /** Remember that it passes the opposite Side due to the way vanilla works! */ - default int isProvidingStrongPower(ForgeDirection oppositeSide) { - return 0; - } - - default boolean shouldCheckWeakPower(ForgeDirection side) { - return false; - } - - default boolean getWeakChanges() { - return false; - } - - default boolean hasComparatorInputOverride() { - return false; - } - - default int getComparatorInputOverride(ForgeDirection side) { - return 0; - } - - default float getBlockHardness() { - return 1.0f; - } - - /** Adds ToolTips to the Item. */ - default void addToolTips(List aList, ItemStack aStack, boolean aF3_H) { - // Do nothing - } - - // interface IMTE_HasMultiBlockMachineRelevantData extends IMultiTileEntity { - // - // /** Return true to mark this Block as a Machine Block for Multiblocks. (Triggers machine update thread) */ - // boolean hasMultiBlockMachineRelevantData(); - // } - -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileMachine.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileMachine.java deleted file mode 100644 index babb85d1183..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileMachine.java +++ /dev/null @@ -1,10 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -public interface IMultiTileMachine { - - void setBooleans(int booleans); - - int getBooleans(); - - void setSound(byte soundEvent, int soundEventValue); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/SyncedMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/interfaces/SyncedMultiTileEntity.java deleted file mode 100644 index 92a147ff532..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/SyncedMultiTileEntity.java +++ /dev/null @@ -1,63 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import javax.annotation.Nonnull; - -import net.minecraft.entity.player.EntityPlayerMP; - -import gregtech.api.net.GTPacketMultiTileEntity; - -public interface SyncedMultiTileEntity { - - int DEFAULT_TIMED_PACKET_PERIOD = 20; - - /** - * Will send a packet to the client when they open the controller or access a casing. - * Should only be sent to one player! - */ - void sendFullPacket(@Nonnull EntityPlayerMP player); - - /** - * Should always collect all the data that the controller or casing has and should send - * Called by {@link #sendFullPacket()} - * - * @param packet The packet which will be sent - */ - void getFullPacketData(GTPacketMultiTileEntity packet); - - /** - * Will send a packet at a certain period of time, defined by {@link #getTimedPacketPeriod()}, to all players around - * the controller or casing to send important information. - * Redstone state, color, ect. It shouldn't send data about the internals like inventory and processing time - */ - void sendTimedPacket(); - - /** - * Collects all the data that should be sent out at a certain period of time defined by - * {@link #getTimedPacketPeriod()} - * Called by {@link #sendTimedPacket()} - * - * @param packet The packet which will be sent - */ - void getTimedPacketData(GTPacketMultiTileEntity packet); - - /** - * Defines the period of time at which a timed packet should be sent out. Default 20 ticks - */ - default int getTimedPacketPeriod() { - return DEFAULT_TIMED_PACKET_PERIOD; - } - - /** - * Will send a packet, which should only contain data about how the TileEntity should be rendered. - * !!! Warning !!! This is sent every single tick! Do not put a lot of data here! - */ - void sendGraphicPacket(); - - /** - * Collects all the data that is needed to be send every single tick - * Called by {@link #sendGraphicPacket()} - * - * @param packet The packet which will be sent - */ - void getGraphicPacketData(GTPacketMultiTileEntity packet); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/UpgradableModularMuTE.java b/src/main/java/gregtech/api/multitileentity/interfaces/UpgradableModularMuTE.java deleted file mode 100644 index 3b4c3cb6f38..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/UpgradableModularMuTE.java +++ /dev/null @@ -1,10 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -import gregtech.api.util.GT_StructureUtilityMuTE.UpgradeCasings; - -public interface UpgradableModularMuTE extends UpgradableMuTE { - - void increaseMucCount(UpgradeCasings casingType, int tier); - - void resetMucCount(); -} diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/UpgradableMuTE.java b/src/main/java/gregtech/api/multitileentity/interfaces/UpgradableMuTE.java deleted file mode 100644 index c18852c95ec..00000000000 --- a/src/main/java/gregtech/api/multitileentity/interfaces/UpgradableMuTE.java +++ /dev/null @@ -1,12 +0,0 @@ -package gregtech.api.multitileentity.interfaces; - -public interface UpgradableMuTE { - - void setCleanroom(boolean isCleanroom); - - void setWirelessSupport(boolean canUse); - - void setLaserSupport(boolean canUse); - - void setMaxAmperage(long amperage); -} diff --git a/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java b/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java deleted file mode 100644 index 13810520bbd..00000000000 --- a/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java +++ /dev/null @@ -1,799 +0,0 @@ -package gregtech.api.multitileentity.machine; - -import static gregtech.api.enums.GTValues.*; -import static gregtech.api.enums.TickTime.MINUTE; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Objects; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityFurnace; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -import org.jetbrains.annotations.ApiStatus.OverrideOnly; - -import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; -import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GTValues; -import gregtech.api.enums.GTValues.NBT; -import gregtech.api.enums.InventoryType; -import gregtech.api.enums.Mods; -import gregtech.api.enums.SoundResource; -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons.CustomIcon; -import gregtech.api.enums.TickTime; -import gregtech.api.enums.VoidingMode; -import gregtech.api.gui.GUIHost; -import gregtech.api.gui.GUIProvider; -import gregtech.api.interfaces.ITexture; -import gregtech.api.logic.FluidInventoryLogic; -import gregtech.api.logic.ItemInventoryLogic; -import gregtech.api.logic.MuTEProcessingLogic; -import gregtech.api.logic.NullPowerLogic; -import gregtech.api.logic.PowerLogic; -import gregtech.api.logic.interfaces.PowerLogicHost; -import gregtech.api.logic.interfaces.ProcessingLogicHost; -import gregtech.api.metatileentity.GregTechTileClientEvents; -import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.base.TickableMultiTileEntity; -import gregtech.api.multitileentity.interfaces.IMultiTileMachine; -import gregtech.api.render.TextureFactory; -import gregtech.api.task.tasks.ProcessingTask; -import gregtech.api.util.GTUtility; -import gregtech.client.GTSoundLoop; -import gregtech.common.gui.MachineGUIProvider; - -public abstract class MultiTileBasicMachine

> extends TickableMultiTileEntity - implements IMultiTileMachine, ProcessingLogicHost

, PowerLogicHost, GUIHost { - - protected static final int ACTIVE = B[0]; - protected static final int TICKS_BETWEEN_RECIPE_CHECKS = 5 * TickTime.SECOND; - protected static final int POLLUTION_TICK = TickTime.SECOND; - protected static final byte INTERRUPT_SOUND_INDEX = 8; - protected static final byte PROCESS_START_SOUND_INDEX = 1; - - protected static final IItemHandlerModifiable EMPTY_INVENTORY = new ItemStackHandler(0); - - public ITexture activeOverlayTexture = null; - public ITexture activeOverlayGlowTexture = null; - public ITexture inactiveOverlayTexture = null; - public ITexture inactiveOverlayGlowTexture = null; - - protected int maxParallel = 1; - protected boolean active = false; - protected int tier = 0; - protected long burnTime = 0; - protected long totalBurnTime = 0; - - protected boolean outputInventoryChanged = false; - protected boolean powerShutDown = false; - protected boolean wasEnabled = false; - protected boolean canWork = true; - protected boolean isElectric = true; - protected boolean isSteam = false; - protected boolean acceptsFuel = false; - - protected byte soundEvent = 0; - protected int soundEventValue = 0; - protected ItemInventoryLogic itemInput; - protected ItemInventoryLogic itemOutput; - protected FluidInventoryLogic fluidInput; - protected FluidInventoryLogic fluidOutput; - - protected P processingLogic; - @Nonnull - protected VoidingMode voidingMode = VoidingMode.VOID_NONE; - protected boolean processingUpdate = false; - @Nonnull - protected PowerLogic power = createPowerLogic(); - @Nonnull - protected GUIProvider guiProvider = createGUIProvider(); - - @SideOnly(Side.CLIENT) - protected GTSoundLoop activitySoundLoop; - - public MultiTileBasicMachine() { - new ProcessingTask<>(this); - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.machine.basic"; - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - super.writeMultiTileNBT(nbt); - if (maxParallel > 0) { - nbt.setInteger(NBT.PARALLEL, maxParallel); - } - - if (active) { - nbt.setBoolean(NBT.ACTIVE, active); - } - - saveItemLogic(nbt); - saveFluidLogic(nbt); - - if (processingLogic != null) { - NBTTagCompound processingLogicNBT = processingLogic.saveToNBT(); - nbt.setTag("processingLogic", processingLogicNBT); - } - - nbt.setInteger(NBT.TIER, tier); - nbt.setLong(NBT.BURN_TIME_LEFT, burnTime); - nbt.setLong(NBT.TOTAL_BURN_TIME, totalBurnTime); - nbt.setBoolean(NBT.ALLOWED_WORK, canWork); - nbt.setBoolean(NBT.ACTIVE, active); - power.saveToNBT(nbt); - } - - protected void saveItemLogic(NBTTagCompound nbt) { - NBTTagCompound nbtListInput = itemInput.saveToNBT(); - nbt.setTag(NBT.INV_INPUT_LIST, nbtListInput); - NBTTagCompound nbtListOutput = itemOutput.saveToNBT(); - nbt.setTag(NBT.INV_OUTPUT_LIST, nbtListOutput); - } - - protected void saveFluidLogic(NBTTagCompound nbt) { - NBTTagCompound fluidInputNBT = fluidInput.saveToNBT(); - nbt.setTag(NBT.TANK_IN, fluidInputNBT); - NBTTagCompound fluidOutputNBT = fluidOutput.saveToNBT(); - nbt.setTag(NBT.TANK_OUT, fluidOutputNBT); - } - - @Override - public void readMultiTileNBT(NBTTagCompound nbt) { - super.readMultiTileNBT(nbt); - if (nbt.hasKey(NBT.PARALLEL)) { - maxParallel = Math.max(1, nbt.getInteger(NBT.PARALLEL)); - } - - if (nbt.hasKey(NBT.ACTIVE)) { - active = nbt.getBoolean(NBT.ACTIVE); - } - - loadItemLogic(nbt); - loadFluidLogic(nbt); - - if (nbt.hasKey("processingLogic")) { - P processingLogic = getProcessingLogic(); - processingLogic.loadFromNBT(Objects.requireNonNull(nbt.getCompoundTag("processingLogic"))); - } - - tier = nbt.getInteger(NBT.TIER); - burnTime = nbt.getLong(NBT.BURN_TIME_LEFT); - totalBurnTime = nbt.getLong(NBT.TOTAL_BURN_TIME); - canWork = nbt.getBoolean(NBT.ALLOWED_WORK); - active = nbt.getBoolean(NBT.ACTIVE); - power.loadFromNBT(nbt); - } - - protected void loadItemLogic(NBTTagCompound nbt) { - itemInput = new ItemInventoryLogic(nbt.getInteger(NBT.INV_OUTPUT_SIZE), tier); - itemOutput = new ItemInventoryLogic(nbt.getInteger(NBT.INV_OUTPUT_SIZE), tier); - if (nbt.hasKey(NBT.INV_INPUT_LIST)) { - itemInput.loadFromNBT(nbt.getCompoundTag(NBT.INV_INPUT_LIST)); - } - if (nbt.hasKey(NBT.INV_OUTPUT_LIST)) { - itemOutput.loadFromNBT(nbt.getCompoundTag(NBT.INV_OUTPUT_LIST)); - } - } - - protected void loadFluidLogic(NBTTagCompound nbt) { - fluidInput = new FluidInventoryLogic(16, 10000, tier); - fluidOutput = new FluidInventoryLogic(16, 10000, tier); - fluidInput.loadFromNBT(nbt.getCompoundTag(NBT.TANK_IN)); - fluidOutput.loadFromNBT(nbt.getCompoundTag(NBT.TANK_OUT)); - } - - public boolean checkTexture(String modID, String resourcePath) { - try { - Minecraft.getMinecraft() - .getResourceManager() - .getResource(new ResourceLocation(modID, resourcePath)); - return true; - } catch (IOException ignored) { - return false; - } - } - - @Override - public void loadTextures(String folder) { - super.loadTextures(folder); - for (StatusTextures textureName : StatusTextures.TEXTURES) { - ITexture texture = null; - String texturePath = "textures/blocks/multitileentity/" + folder + "/" + textureName.getName() + ".png"; - if (!checkTexture(Mods.GregTech.ID, texturePath)) { - texture = TextureFactory.of(Textures.BlockIcons.VOID); - } else { - if (textureName.hasGlow()) { - texture = TextureFactory.builder() - .addIcon(new CustomIcon("multitileentity/" + folder + "/" + textureName.getName())) - .glow() - .build(); - } else { - texture = TextureFactory - .of(new CustomIcon("multitileentity/" + folder + "/" + textureName.getName())); - } - } - switch (textureName) { - case Active -> activeOverlayTexture = texture; - case ActiveWithGlow -> activeOverlayGlowTexture = texture; - case Inactive -> inactiveOverlayTexture = texture; - case InactiveWithGlow -> inactiveOverlayGlowTexture = texture; - } - } - } - - @Override - public void copyTextures() { - super.copyTextures(); - final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry - .getReferenceTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); - if (!(tCanonicalTileEntity instanceof MultiTileBasicMachine canonicalEntity)) { - return; - } - activeOverlayTexture = canonicalEntity.activeOverlayTexture; - activeOverlayGlowTexture = canonicalEntity.activeOverlayGlowTexture; - inactiveOverlayTexture = canonicalEntity.inactiveOverlayTexture; - inactiveOverlayGlowTexture = canonicalEntity.inactiveOverlayGlowTexture; - } - - @Override - public ITexture getTexture(ForgeDirection side) { - final ITexture texture = super.getTexture(side); - if (side == facing) { - if (isActive()) { - return TextureFactory.of(texture, activeOverlayTexture, activeOverlayGlowTexture); - } - - return TextureFactory.of(texture, inactiveOverlayTexture, inactiveOverlayGlowTexture); - } - - return TextureFactory.of(texture, getCoverTexture(side)); - } - /* - * Fluids - */ - - /** - * The number of fluid (input) slots available for this machine - */ - public int getFluidInputCount() { - return 7; - } - - /** - * The number of fluid (output) slots available for this machine - */ - public int getFluidOutputCount() { - return 3; - } - - @Override - public void setLightValue(byte aLightValue) {} - - /* - * Inventory - */ - - @Override - public boolean hasInventoryBeenModified() { - // True if the input inventory has changed - return hasInventoryChanged; - } - - public void markOutputInventoryBeenModified() { - outputInventoryChanged = true; - } - - public boolean hasOutputInventoryBeenModified() { - // True if the output inventory has changed - return outputInventoryChanged; - } - - public void markInputInventoryBeenModified() { - hasInventoryChanged = true; - } - - // #region Machine - - @Override - public void onPostTick(long tick, boolean isServerSide) { - if (isServerSide) { - runMachine(tick); - } else { - doActivitySound(getActivitySoundLoop()); - } - } - - /** - * Runs only on server side - * - * @param tick The current tick of the machine - */ - protected void runMachine(long tick) { - if (acceptsFuel() && isActive() && !consumeFuel()) { - stopMachine(true); - return; - } - - if (hasThingsToDo()) { - markDirty(); - runningTick(tick); - return; - } - - if (tick % TICKS_BETWEEN_RECIPE_CHECKS == 0 || hasWorkJustBeenEnabled() - || hasInventoryBeenModified() && isAllowedToWork()) { - wasEnabled = false; - if (checkRecipe()) { - setActive(true); - setSound(GregTechTileClientEvents.START_SOUND_LOOP, PROCESS_START_SOUND_INDEX); - updateSlots(); - markDirty(); - issueClientUpdate(); - } - } - } - - /** - * Runs only on server side - * - * @param tick The current tick of the machine - */ - protected void runningTick(long tick) { - consumeEnergy(); - } - - /** - * Runs only on server side - */ - protected boolean checkRecipe() { - return false; - } - - /** - * Runs only on server side - */ - protected void consumeEnergy() { - PowerLogic logic = getPowerLogic(); - - P processing = getProcessingLogic(); - - if (!logic.removeEnergyUnsafe(processing.getCalculatedEut())) { - stopMachine(true); - } - } - - public void doSound(byte aIndex, double aX, double aY, double aZ) { - switch (aIndex) { - case PROCESS_START_SOUND_INDEX -> { - if (getProcessStartSound() != null) - GTUtility.doSoundAtClient(getProcessStartSound(), getTimeBetweenProcessSounds(), 1.0F, aX, aY, aZ); - } - case INTERRUPT_SOUND_INDEX -> GTUtility - .doSoundAtClient(SoundResource.IC2_MACHINES_INTERRUPT_ONE, 100, 1.0F, aX, aY, aZ); - } - } - - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - if (aIndex == PROCESS_START_SOUND_INDEX && getProcessStartSound() != null) { - GTUtility.doSoundAtClient(getProcessStartSound(), getTimeBetweenProcessSounds(), 1.0F, aX, aY, aZ); - } - } - - protected ResourceLocation getProcessStartSound() { - return null; - } - - protected int getTimeBetweenProcessSounds() { - return 100; - } - - @SideOnly(Side.CLIENT) - protected void doActivitySound(ResourceLocation activitySound) { - if (isActive() && activitySound != null && activitySoundLoop == null) { - activitySoundLoop = new GTSoundLoop(activitySound, this, false, true); - Minecraft.getMinecraft() - .getSoundHandler() - .playSound(activitySoundLoop); - return; - } - - if (activitySoundLoop != null) { - activitySoundLoop = null; - } - - } - - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySoundLoop() { - return null; - } - - protected ItemStack[] getInputItems() { - return itemInput.getStoredItems(); - } - - protected FluidStack[] getInputFluids() { - return fluidInput.getStoredFluids(); - } - - @Override - public int getProgress() { - P processing = getProcessingLogic(); - return processing.getProgress(); - } - - @Override - public int getMaxProgress() { - P processing = getProcessingLogic(); - return processing.getDuration(); - } - - @Override - public boolean increaseProgress(int progressAmount) { - P processing = getProcessingLogic(); - processing.increaseProgress(progressAmount); - return true; - } - - @Override - public boolean hasThingsToDo() { - return getMaxProgress() > 0; - } - - @Override - public boolean hasWorkJustBeenEnabled() { - return wasEnabled; - } - - @Override - public void enableWorking() { - wasEnabled = true; - canWork = true; - } - - @Override - public void disableWorking() { - canWork = false; - } - - @Override - public boolean wasShutdown() { - return powerShutDown; - } - - @Override - public boolean isAllowedToWork() { - return canWork; - } - - @Override - public boolean isActive() { - return active; - } - - @Override - public void setActive(boolean active) { - this.active = active; - } - - protected boolean isElectric() { - return isElectric; - } - - protected void setElectric(boolean isElectric) { - this.isElectric = isElectric; - } - - protected boolean isSteam() { - return isSteam; - } - - protected void setSteam(boolean isSteam) { - this.isSteam = isSteam; - } - - protected boolean acceptsFuel() { - return acceptsFuel; - } - - protected void setFuel(boolean acceptsFuel) { - this.acceptsFuel = acceptsFuel; - } - - protected boolean consumeFuel() { - if (isElectric() || isSteam()) return false; - if (isActive() && burnTime <= 0) { - for (int i = 0; i < itemInput.getSlots(); i++) { - ItemStack item = itemInput.getItemInSlot(i); - if (item == null) continue; - int checkBurnTime = TileEntityFurnace.getItemBurnTime(item) / 10; - if (checkBurnTime <= 0) continue; - item.stackSize--; - burnTime = checkBurnTime; - totalBurnTime = checkBurnTime; - break; - } - updateSlots(); - } - - if (--burnTime < 0) { - burnTime = 0; - totalBurnTime = 0; - return false; - } - return false; - } - - @Override - protected void addDebugInfo(EntityPlayer player, int logLevel, ArrayList list) { - list.add( - GTUtility.trans("186", "Owned by: ") + EnumChatFormatting.BLUE - + getOwnerName() - + EnumChatFormatting.RESET - + " (" - + EnumChatFormatting.AQUA - + getOwnerUuid() - + EnumChatFormatting.RESET - + ")"); - - if (acceptsFuel()) { - list.add("Fuel: " + EnumChatFormatting.GOLD + burnTime + "/" + totalBurnTime); - } - - PowerLogic logic = getPowerLogic(); - if (isElectric) { - list.add( - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GTUtility.formatNumbers(logic.getStoredEnergy()) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GTUtility.formatNumbers(logic.getCapacity()) - + EnumChatFormatting.RESET - + " EU"); - list.add( - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " - + EnumChatFormatting.RED - + GTUtility.formatNumbers(getProcessingLogic().getCalculatedEut()) - + EnumChatFormatting.RESET - + " EU/t"); - list.add( - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " - + EnumChatFormatting.YELLOW - + GTUtility.formatNumbers(logic.getVoltage()) - + EnumChatFormatting.RESET - // TODO: Put ampere getter here, once that's variable - + " EU/t(*2A) " - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + VN[GTUtility.getTier(logic.getVoltage())] - + EnumChatFormatting.RESET); - } - - addProgressStringToScanner(player, logLevel, list); - - // TODO: Add CPU load calculator - list.add( - "Average CPU load of ~" + GTUtility.formatNumbers(0) - + "ns over " - + GTUtility.formatNumbers(0) - + " ticks with worst time of " - + GTUtility.formatNumbers(0) - + "ns."); - } - - protected void addProgressStringToScanner(EntityPlayer player, int logLevel, ArrayList list) { - P processing = getProcessingLogic(); - int progressTime = processing.getProgress(); - int maxProgressTime = processing.getDuration(); - list.add( - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GTUtility.formatNumbers(progressTime > 20 ? progressTime / 20 : progressTime) - + EnumChatFormatting.RESET - + (progressTime > 20 ? " s / " : " ticks / ") - + EnumChatFormatting.YELLOW - + GTUtility.formatNumbers(maxProgressTime > 20 ? maxProgressTime / 20 : maxProgressTime) - + EnumChatFormatting.RESET - + (maxProgressTime > 20 ? " s" : " ticks")); - } - - protected void stopMachine(boolean powerShutDown) { - setActive(false); - disableWorking(); - if (powerShutDown) { - setSound(GregTechTileClientEvents.STOP_SOUND_LOOP, INTERRUPT_SOUND_INDEX); - } - issueClientUpdate(); - } - - protected void updateSlots() { - itemInput.update(false); - itemOutput.update(false); - fluidInput.update(); - fluidOutput.update(); - } - - @Override - public int getBooleans() { - int booleans = 0; - if (isActive()) { - booleans |= ACTIVE; - } - return booleans; - } - - @Override - public void setBooleans(int booleans) { - setActive((booleans & ACTIVE) == ACTIVE); - } - - public boolean hasItemInput() { - return true; - } - - public boolean hasItemOutput() { - return true; - } - - public boolean hasFluidInput() { - return true; - } - - public boolean hasFluidOutput() { - return true; - } - - @Override - public void setSound(byte soundEvent, int soundEventValue) { - this.soundEvent = soundEvent; - this.soundEventValue = soundEventValue; - if (isServerSide()) { - return; - } - - switch (soundEventValue) { - case PROCESS_START_SOUND_INDEX -> { - if (getProcessStartSound() != null) GTUtility.doSoundAtClient( - getProcessStartSound(), - getTimeBetweenProcessSounds(), - 1.0F, - getXCoord(), - getYCoord(), - getZCoord()); - } - case INTERRUPT_SOUND_INDEX -> GTUtility.doSoundAtClient( - SoundResource.IC2_MACHINES_INTERRUPT_ONE, - 100, - 1.0F, - getXCoord(), - getYCoord(), - getZCoord()); - } - - } - - @Nullable - public ItemInventoryLogic getItemLogic(@Nonnull ForgeDirection side, @Nonnull InventoryType type) { - if (side == facing) return null; - return switch (type) { - case Input -> itemInput; - case Output -> itemOutput; - default -> null; - }; - } - - @Nullable - public FluidInventoryLogic getFluidLogic(@Nonnull ForgeDirection side, @Nonnull InventoryType type) { - if (side == facing) return null; - return switch (type) { - case Input -> fluidInput; - case Output -> fluidOutput; - default -> null; - }; - } - - @Override - @Nonnull - public P getProcessingLogic() { - if (processingLogic == null) { - processingLogic = createProcessingLogic().setMachineHost(this); - } - return Objects.requireNonNull(processingLogic); - } - - @OverrideOnly - @Nonnull - protected abstract P createProcessingLogic(); - - @Override - public boolean isInputSeparated() { - return false; - } - - @Nonnull - @Override - public VoidingMode getVoidMode() { - return voidingMode; - } - - @Override - public boolean needsUpdate() { - return processingUpdate; - } - - @Override - public void setProcessingUpdate(boolean update) { - processingUpdate = update; - } - - @Override - @Nonnull - public PowerLogic getPowerLogic(@Nonnull ForgeDirection side) { - if (side == facing) return new NullPowerLogic(); - return power; - } - - @Override - @Nonnull - public ForgeDirection getPowerOutputSide() { - return Objects.requireNonNull(facing.getOpposite()); - } - - protected void updatePowerLogic() { - power.setEnergyCapacity(GTValues.V[tier] * power.getMaxAmperage() * 2 * MINUTE); - power.setMaxVoltage(GTValues.V[tier]); - power.setMaxAmperage(1); - } - - @Nonnull - protected PowerLogic createPowerLogic() { - return new PowerLogic().setMaxAmperage(1) - .setType(PowerLogic.RECEIVER); - } - - @Nonnull - protected GUIProvider createGUIProvider() { - return new MachineGUIProvider<>(this); - } - - @Nonnull - public GUIProvider getGUI(@Nonnull UIBuildContext uiContext) { - return guiProvider; - } - - @Override - public ItemStack getAsItem() { - return MultiTileEntityRegistry.getRegistry(getMultiTileEntityRegistryID()) - .getItem(getMultiTileEntityID()); - } - - @Override - public String getMachineName() { - return StatCollector.translateToLocal(getAsItem().getUnlocalizedName()); - } - -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/ComplexParallelController.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/ComplexParallelController.java deleted file mode 100644 index 3abb69dd514..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/ComplexParallelController.java +++ /dev/null @@ -1,111 +0,0 @@ -package gregtech.api.multitileentity.multiblock.base; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import gregtech.api.logic.ComplexParallelProcessingLogic; -import gregtech.api.util.GTUtility; -import gregtech.api.util.GTWaila; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - -public abstract class ComplexParallelController, P extends ComplexParallelProcessingLogic

> - extends Controller { - - protected int maxComplexParallels = 0; - protected int currentComplexParallels = 0; - - public ComplexParallelController() { - isSimpleMachine = false; - } - - protected void setMaxComplexParallels(int parallel, boolean stopMachine) { - if (parallel != maxComplexParallels && maxComplexParallels != 0 && stopMachine) { - stopMachine(false); - } - maxComplexParallels = parallel; - setProcessingUpdate(true); - } - - @Override - protected void stopMachine(boolean powerShutDown) { - super.stopMachine(powerShutDown); - } - - protected boolean hasPerfectOverclock() { - return false; - } - - @Override - protected void addProgressStringToScanner(EntityPlayer player, int logLevel, ArrayList list) { - P processing = getProcessingLogic(); - for (int i = 0; i < maxComplexParallels; i++) { - list.add( - StatCollector.translateToLocal("GT5U.multiblock.Progress") + " " - + (i + 1) - + ": " - + EnumChatFormatting.GREEN - + GTUtility.formatNumbers( - processing.getProgress(i) > 20 ? processing.getProgress(i) / 20 : processing.getProgress(i)) - + EnumChatFormatting.RESET - + (processing.getProgress(i) > 20 ? " s / " : " ticks / ") - + EnumChatFormatting.YELLOW - + GTUtility.formatNumbers( - processing.getDuration(i) > 20 ? processing.getDuration(i) / 20 : processing.getDuration(i)) - + EnumChatFormatting.RESET - + (processing.getDuration(i) > 20 ? " s" : " ticks")); - } - } - - @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { - super.getWailaNBTData(player, tile, tag, world, x, y, z); - P processing = getProcessingLogic(); - tag.setInteger("maxComplexParallels", maxComplexParallels); - for (int i = 0; i < maxComplexParallels; i++) { - tag.setInteger("maxProgress" + i, processing.getDuration(i)); - tag.setInteger("progress" + i, processing.getProgress(i)); - } - } - - @Override - public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { - super.getWailaBody(itemStack, currentTip, accessor, config); - final NBTTagCompound tag = accessor.getNBTData(); - maxComplexParallels = tag.getInteger("maxComplexParallels"); - for (int i = 0; i < maxComplexParallels; i++) { - long maxProgress = tag.getInteger("maxProgress" + i); - long progress = tag.getInteger("progress" + i); - currentTip.add( - "Process " + (i + 1) - + ": " - + GTWaila - .getMachineProgressString(maxProgress > 0 && maxProgress >= progress, maxProgress, progress)); - } - } - - @Override - public void setProcessingLogicPower(@Nonnull P processingLogic) { - processingLogic.setAmperageOC(true); - processingLogic.setAvailableAmperage(getPowerLogic().getMaxAmperage() / maxComplexParallels); - processingLogic.setAvailableVoltage(getPowerLogic().getVoltage() / maxComplexParallels); - } - - @Override - public void updateProcessingLogic(@Nonnull P processingLogic) { - processingLogic.setMaxComplexParallel(maxComplexParallels); - } -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/Controller.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/Controller.java deleted file mode 100644 index d6b4ef7fe3b..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/Controller.java +++ /dev/null @@ -1,1079 +0,0 @@ -package gregtech.api.multitileentity.multiblock.base; - -import static gregtech.api.util.GTUtility.moveMultipleItemStacks; -import static gregtech.common.misc.WirelessNetworkManager.strongCheckOrAddUser; -import static mcp.mobius.waila.api.SpecialChars.*; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -import org.jetbrains.annotations.NotNull; -import org.lwjgl.input.Keyboard; - -import com.gtnewhorizon.structurelib.StructureLibAPI; -import com.gtnewhorizon.structurelib.alignment.IAlignment; -import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; -import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; -import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; -import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; -import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; -import com.gtnewhorizon.structurelib.util.Vec3Impl; -import com.gtnewhorizons.modularui.api.screen.ModularWindow; - -import cpw.mods.fml.common.network.NetworkRegistry; -import gregtech.api.enums.GTValues.NBT; -import gregtech.api.enums.InventoryType; -import gregtech.api.enums.VoidingMode; -import gregtech.api.interfaces.IDescribable; -import gregtech.api.interfaces.fluid.IFluidStore; -import gregtech.api.logic.ControllerFluidLogic; -import gregtech.api.logic.ControllerItemLogic; -import gregtech.api.logic.FluidInventoryLogic; -import gregtech.api.logic.ItemInventoryLogic; -import gregtech.api.logic.MuTEProcessingLogic; -import gregtech.api.logic.PowerLogic; -import gregtech.api.multitileentity.WeakTargetRef; -import gregtech.api.multitileentity.enums.MultiTileCasingPurpose; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.interfaces.IMultiBlockPart; -import gregtech.api.multitileentity.machine.MultiTileBasicMachine; -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; -import gregtech.api.net.GTPacketMultiTileEntity; -import gregtech.api.objects.GTItemStack; -import gregtech.api.util.GTUtility; -import gregtech.api.util.GTWaila; -import gregtech.api.util.MultiblockTooltipBuilder; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - -/** - * Multi Tile Entities - or MuTEs - don't have dedicated hatches, but their casings can become hatches. - */ -public abstract class Controller, P extends MuTEProcessingLogic

> extends - MultiTileBasicMachine

implements IAlignment, IMultiBlockController, IDescribable, ISurvivalConstructable { - - public static final String ALL_INVENTORIES_NAME = "all"; - protected static final int AUTO_OUTPUT_FREQUENCY_TICK = 20; - - private static final Map tooltip = new ConcurrentHashMap<>(); - private final List> upgradeCasings = new ArrayList<>(); - private final List> functionalCasings = new ArrayList<>(); - protected BuildState buildState = new BuildState(); - - private boolean structureOkay = false, structureChanged = false; - private ExtendedFacing extendedFacing = ExtendedFacing.DEFAULT; - private IAlignmentLimits limits = getInitialAlignmentLimits(); - protected boolean separateInputs = getDefaultInputSeparationMode(); - protected VoidingMode voidingMode = getDefaultVoidingMode(); - protected boolean batchMode = getDefaultBatchMode(); - protected boolean recipeLock = getDefaultRecipeLockingMode(); - protected boolean shouldSort = false; - /** If this is set to true, the machine will get default WAILA behavior */ - protected boolean isSimpleMachine = true; - - protected boolean isCleanroom = false; - protected ControllerItemLogic controllerItemInput = new ControllerItemLogic(); - protected ControllerItemLogic controllerItemOutput = new ControllerItemLogic(); - protected ControllerFluidLogic controllerFluidInput = new ControllerFluidLogic(); - protected ControllerFluidLogic controllerFluidOutput = new ControllerFluidLogic(); - - // A list of sides - // Each side has a list of parts that have a cover that need to be ticked - protected List>> registeredCoveredParts = Arrays.asList( - new ArrayList<>(), - new ArrayList<>(), - new ArrayList<>(), - new ArrayList<>(), - new ArrayList<>(), - new ArrayList<>()); - - // A list for each purpose that a casing can register to, to be ticked - protected List>> registeredTickableParts = new ArrayList<>(); - - public Controller() { - for (int i = 0; i < MultiTileCasingPurpose.values().length; i++) { - registeredTickableParts.add(new ArrayList<>()); - } - } - - /** Registry ID of the required casing */ - public abstract short getCasingRegistryID(); - - /** Meta ID of the required casing */ - public abstract int getCasingMeta(); - - /** - * Create the tooltip for this multi block controller. - */ - protected abstract MultiblockTooltipBuilder createTooltip(); - - /** - * @return The starting offset for the structure builder - */ - public abstract Vec3Impl getStartingStructureOffset(); - - /** - * Due to limitation of Java type system, you might need to do an unchecked cast. HOWEVER, the returned - * IStructureDefinition is expected to be evaluated against current instance only, and should not be used against - * other instances, even for those of the same class. - */ - @Override - public abstract IStructureDefinition getStructureDefinition(); - - /** - * Checks the Machine. - *

- * NOTE: If using `buildState` be sure to `startBuilding()` and either `endBuilding()` or `failBuilding()` - */ - public boolean checkMachine() { - calculateTier(); - updatePowerLogic(); - return tier > 0; - } - - protected void calculateTier() { - if (functionalCasings.isEmpty()) { - return; - } - double sum = 0; - for (WeakTargetRef casingRef : functionalCasings) { - final FunctionalCasing casing = casingRef.get(); - if (casing == null) continue; - sum += casing.getPartTier() * casing.getPartModifier(); - } - tier = (int) Math.min(Math.floor(sum / functionalCasings.size()), 14); - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - super.writeMultiTileNBT(nbt); - - nbt.setBoolean(NBT.STRUCTURE_OK, structureOkay); - nbt.setByte( - NBT.ROTATION, - (byte) extendedFacing.getRotation() - .getIndex()); - nbt.setByte( - NBT.FLIP, - (byte) extendedFacing.getFlip() - .getIndex()); - - nbt.setString(NBT.VOIDING_MODE, voidingMode.name); - nbt.setBoolean(NBT.SEPARATE_INPUTS, separateInputs); - nbt.setBoolean(NBT.RECIPE_LOCK, recipeLock); - nbt.setBoolean(NBT.BATCH_MODE, batchMode); - } - - @Override - protected void saveItemLogic(NBTTagCompound nbt) { - NBTTagCompound itemInputNBT = controllerItemInput.saveToNBT(); - nbt.setTag(NBT.INV_INPUT_LIST, itemInputNBT); - NBTTagCompound itemOutputNBT = controllerItemOutput.saveToNBT(); - nbt.setTag(NBT.INV_OUTPUT_LIST, itemOutputNBT); - } - - @Override - protected void saveFluidLogic(NBTTagCompound nbt) { - NBTTagCompound fluidInputNBT = controllerFluidInput.saveToNBT(); - nbt.setTag(NBT.TANK_IN, fluidInputNBT); - NBTTagCompound fluidOutputNBT = controllerFluidOutput.saveToNBT(); - nbt.setTag(NBT.TANK_OUT, fluidOutputNBT); - } - - @Override - public void readMultiTileNBT(NBTTagCompound nbt) { - super.readMultiTileNBT(nbt); - - // Multiblock inventories are a collection of inventories. The first inventory is the default internal - // inventory, and the others are added by inventory extending blocks. - - structureOkay = nbt.getBoolean(NBT.STRUCTURE_OK); - extendedFacing = ExtendedFacing - .of(getFrontFacing(), Rotation.byIndex(nbt.getByte(NBT.ROTATION)), Flip.byIndex(nbt.getByte(NBT.FLIP))); - - voidingMode = VoidingMode.fromName(nbt.getString(NBT.VOIDING_MODE)); - separateInputs = nbt.getBoolean(NBT.SEPARATE_INPUTS); - recipeLock = nbt.getBoolean(NBT.RECIPE_LOCK); - batchMode = nbt.getBoolean(NBT.BATCH_MODE); - } - - @Override - protected void loadItemLogic(NBTTagCompound nbt) { - if (!nbt.hasKey(NBT.INV_INPUT_LIST) && !nbt.hasKey(NBT.INV_OUTPUT_LIST)) { - controllerItemInput.addInventory(new ItemInventoryLogic(16)); - controllerItemOutput.addInventory(new ItemInventoryLogic(16)); - return; - } - controllerItemInput.loadFromNBT(nbt.getCompoundTag(NBT.INV_INPUT_LIST)); - controllerItemOutput.loadFromNBT(nbt.getCompoundTag(NBT.INV_OUTPUT_LIST)); - } - - @Override - protected void loadFluidLogic(NBTTagCompound nbt) { - if (!nbt.hasKey(NBT.TANK_IN) && !nbt.hasKey(NBT.TANK_OUT)) { - controllerFluidInput.addInventory(new FluidInventoryLogic(16, 32000)); - controllerFluidOutput.addInventory(new FluidInventoryLogic(16, 32000)); - return; - } - controllerFluidInput.loadFromNBT(nbt.getCompoundTag(NBT.TANK_IN)); - controllerFluidOutput.loadFromNBT(nbt.getCompoundTag(NBT.TANK_OUT)); - } - - @Override - public void addToolTips(List aList, ItemStack aStack, boolean aF3_H) { - aList.addAll(Arrays.asList(getDescription())); - } - - @Override - public String[] getDescription() { - if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return getTooltip().getStructureInformation(); - } - - return getTooltip().getInformation(); - } - - @Override - protected void addDebugInfo(EntityPlayer aPlayer, int aLogLevel, ArrayList tList) { - super.addDebugInfo(aPlayer, aLogLevel, tList); - tList.add("Structure ok: " + checkStructure(false)); - } - - protected int getToolTipID() { - return getMultiTileEntityRegistryID() << 16 + getMultiTileEntityID(); - } - - protected MultiblockTooltipBuilder getTooltip() { - MultiblockTooltipBuilder builder = tooltip.get(getToolTipID()); - if (builder == null) { - builder = createTooltip(); - tooltip.put(getToolTipID(), builder); - } - return builder; - } - - @Override - public boolean checkStructure(boolean aForceReset) { - if (!isServerSide()) return structureOkay; - - // Only trigger an update if forced (from onPostTick, generally), or if the structure has changed - if ((structureChanged || aForceReset)) { - clearSpecialLists(); - structureOkay = checkMachine(); - } - structureChanged = false; - return structureOkay; - } - - @Override - public void onStructureChange() { - structureChanged = true; - } - - public final boolean checkPiece(String piece, Vec3Impl offset) { - return checkPiece(piece, offset.get0(), offset.get1(), offset.get2()); - } - - /** - * Explanation of the world coordinate these offset means: - *

- * Imagine you stand in front of the controller, with controller facing towards you not rotated or flipped. - *

- * The horizontalOffset would be the number of blocks on the left side of the controller, not counting controller - * itself. The verticalOffset would be the number of blocks on the top side of the controller, not counting - * controller itself. The depthOffset would be the number of blocks between you and controller, not counting - * controller itself. - *

- * All these offsets can be negative. - */ - protected final boolean checkPiece(String piece, int horizontalOffset, int verticalOffset, int depthOffset) { - return getCastedStructureDefinition().check( - this, - piece, - getWorld(), - getExtendedFacing(), - getXCoord(), - getYCoord(), - getZCoord(), - horizontalOffset, - verticalOffset, - depthOffset, - !structureOkay); - } - - public final boolean buildPiece(String piece, ItemStack trigger, boolean hintsOnly, Vec3Impl offset) { - return buildPiece(piece, trigger, hintsOnly, offset.get0(), offset.get1(), offset.get2()); - } - - protected final boolean buildPiece(String piece, ItemStack trigger, boolean hintOnly, int horizontalOffset, - int verticalOffset, int depthOffset) { - return getCastedStructureDefinition().buildOrHints( - this, - trigger, - piece, - getWorld(), - getExtendedFacing(), - getXCoord(), - getYCoord(), - getZCoord(), - horizontalOffset, - verticalOffset, - depthOffset, - hintOnly); - } - - protected final int survivalBuildPiece(String piece, ItemStack trigger, Vec3Impl offset, int elementBudget, - ISurvivalBuildEnvironment env, boolean check) { - return survivalBuildPiece( - piece, - trigger, - offset.get0(), - offset.get1(), - offset.get2(), - elementBudget, - env, - check); - } - - protected final Integer survivalBuildPiece(String piece, ItemStack trigger, int horizontalOffset, - int verticalOffset, int depthOffset, int elementBudget, ISurvivalBuildEnvironment env, boolean check) { - return getCastedStructureDefinition().survivalBuild( - this, - trigger, - piece, - getWorld(), - getExtendedFacing(), - getXCoord(), - getYCoord(), - getZCoord(), - horizontalOffset, - verticalOffset, - depthOffset, - elementBudget, - env, - check); - } - - @SuppressWarnings("unchecked") - private IStructureDefinition> getCastedStructureDefinition() { - return (IStructureDefinition>) getStructureDefinition(); - } - - @Override - public ExtendedFacing getExtendedFacing() { - return extendedFacing; - } - - @Override - public void setExtendedFacing(ExtendedFacing newExtendedFacing) { - if (extendedFacing == newExtendedFacing) { - return; - } - - onStructureChange(); - if (structureOkay) stopMachine(false); - extendedFacing = newExtendedFacing; - structureOkay = false; - if (isServerSide()) { - StructureLibAPI.sendAlignment( - this, - new NetworkRegistry.TargetPoint( - getWorld().provider.dimensionId, - getXCoord(), - getYCoord(), - getZCoord(), - 512)); - } else { - issueTextureUpdate(); - } - - } - - @Override - public boolean onWrenchRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ, ItemStack aTool) { - if (wrenchSide != getFrontFacing()) - return super.onWrenchRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - if (aPlayer.isSneaking()) { - // we won't be allowing horizontal flips, as it can be perfectly emulated by rotating twice and flipping - // horizontally allowing an extra round of flip make it hard to draw meaningful flip markers in - // GTProxy#drawGrid - toolSetFlip(getFlip().isHorizontallyFlipped() ? Flip.NONE : Flip.HORIZONTAL); - } else { - toolSetRotation(null); - } - return true; - } - - @Override - public void registerCoveredPartOnSide(final ForgeDirection side, IMultiBlockPart part) { - if (side == ForgeDirection.UNKNOWN) return; - - final List> registeredCovers = registeredCoveredParts.get(side.ordinal()); - // TODO: Make sure that we're not already registered on this side - registeredCovers.add(new WeakTargetRef<>(part, true)); - } - - @Override - public void unregisterCoveredPartOnSide(final ForgeDirection side, IMultiBlockPart aPart) { - if (side == ForgeDirection.UNKNOWN) return; - - final List> coveredParts = registeredCoveredParts.get(side.ordinal()); - final Iterator> it = coveredParts.listIterator(); - while (it.hasNext()) { - final IMultiBlockPart part = (it.next()).get(); - if (part == null || part == aPart) it.remove(); - } - } - - @Override - public void registerCaseWithPurpose(MultiTileCasingPurpose purpose, IMultiBlockPart part) { - final List> tickableParts = registeredTickableParts.get(purpose.ordinal()); - final Iterator> it = tickableParts.listIterator(); - while (it.hasNext()) { - final IMultiBlockPart next = (it.next()).get(); - if (next == null) { - it.remove(); - } else if (next == part) { - return; - } - } - tickableParts.add(new WeakTargetRef<>(part, true)); - } - - @Override - public void unregisterCaseWithPurpose(MultiTileCasingPurpose purpose, IMultiBlockPart part) { - final List> tickableParts = registeredTickableParts.get(purpose.ordinal()); - final Iterator> it = tickableParts.listIterator(); - while (it.hasNext()) { - final IMultiBlockPart next = (it.next()).get(); - if (next == null || next == part) it.remove(); - } - } - - @Override - public void onFirstTick(boolean isServerSide) { - super.onFirstTick(isServerSide); - if (isServerSide) { - checkStructure(true); - } else { - StructureLibAPI.queryAlignment(this); - } - } - - private boolean tickCovers() { - for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - // TODO: Tick controller covers, if any - final List> coveredParts = this.registeredCoveredParts.get(side.ordinal()); - final Iterator> it = coveredParts.listIterator(); - while (it.hasNext()) { - final IMultiBlockPart part = (it.next()).get(); - if (part == null) { - it.remove(); - continue; - } - if (!part.tickCoverAtSide(side, mTickTimer)) it.remove(); - } - } - - return true; - } - - @Override - public void onTick(long tick, boolean isServerSide) { - tickCovers(); - } - - @Override - public void onPostTick(long tick, boolean isServerSide) { - if (!isServerSide) { // client side - doActivitySound(getActivitySoundLoop()); - return; - } - - // server side - if (tick % 600 == 5) { - // Recheck the structure every 30 seconds or so - if (!checkStructure(false)) checkStructure(true); - } - if (checkStructure(false)) { - runMachine(tick); - pushItemOutputs(tick); - pushFluidOutputs(tick); - - } else { - stopMachine(false); - } - - } - - protected void pushItemOutputs(long tick) { - if (tick % AUTO_OUTPUT_FREQUENCY_TICK != 0) return; - final List> registeredItemOutputs = registeredTickableParts - .get(MultiTileCasingPurpose.ItemOutput.ordinal()); - final Iterator> itemOutputIterator = registeredItemOutputs.listIterator(); - while (itemOutputIterator.hasNext()) { - final IMultiBlockPart part = (itemOutputIterator.next()).get(); - if (part == null) { - itemOutputIterator.remove(); - continue; - } - if (!part.shouldTick(mTickTimer)) { - itemOutputIterator.remove(); - continue; - } - - final IInventory facingInventory = part.getIInventoryAtSide(part.getFrontFacing()); - if (facingInventory == null) { - continue; - } - - moveMultipleItemStacks( - part, - facingInventory, - part.getFrontFacing(), - part.getBackFacing(), - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1, - part.getSizeInventory()); - for (int i = 0; i < part.getSizeInventory(); i++) { - final ItemStack stack = part.getStackInSlot(i); - if (stack != null && stack.stackSize <= 0) { - part.setInventorySlotContents(i, null); - } - } - - } - } - - protected void pushFluidOutputs(long tick) { - if (tick % AUTO_OUTPUT_FREQUENCY_TICK != 0) return; - final List> registeredFluidOutputs = registeredTickableParts - .get(MultiTileCasingPurpose.FluidOutput.ordinal()); - final Iterator> fluidOutputIterator = registeredFluidOutputs.listIterator(); - while (fluidOutputIterator.hasNext()) { - final IMultiBlockPart part = (fluidOutputIterator.next()).get(); - if (part == null) { - fluidOutputIterator.remove(); - continue; - } - if (!part.shouldTick(mTickTimer)) { - fluidOutputIterator.remove(); - } - } - } - - @Override - public void setCleanroom(boolean cleanroom) { - isCleanroom = cleanroom; - } - - protected void clearSpecialLists() { - upgradeCasings.clear(); - functionalCasings.clear(); - } - - @Override - public final boolean isFacingValid(ForgeDirection facing) { - return canSetToDirectionAny(facing); - } - - @Override - public void onFacingChange() { - toolSetDirection(getFrontFacing()); - onStructureChange(); - } - - @Override - public boolean allowCoverOnSide(ForgeDirection side, GTItemStack aCoverID) { - return side != facing; - } - - @Override - public String[] getStructureDescription(ItemStack stackSize) { - return getTooltip().getStructureHint(); - } - - @Override - public IAlignmentLimits getAlignmentLimits() { - return limits; - } - - protected void setAlignmentLimits(IAlignmentLimits mLimits) { - this.limits = mLimits; - } - - public boolean isSeparateInputs() { - return separateInputs; - } - - public void setSeparateInputs(boolean aSeparateInputs) { - separateInputs = aSeparateInputs; - } - - protected IAlignmentLimits getInitialAlignmentLimits() { - return (d, r, f) -> !f.isVerticallyFliped(); - } - - public static class BuildState { - - /** - * Utility class to keep track of the build state of a multiblock - */ - boolean building = false; - - Vec3Impl currentOffset; - - public void startBuilding(Vec3Impl structureOffset) { - if (building) throw new IllegalStateException("Already building!"); - building = true; - setCurrentOffset(structureOffset); - } - - public Vec3Impl setCurrentOffset(Vec3Impl structureOffset) { - verifyBuilding(); - return (currentOffset = structureOffset); - } - - private void verifyBuilding() { - if (!building) throw new IllegalStateException("Not building!"); - } - - public boolean failBuilding() { - building = false; - currentOffset = null; - return false; - } - - public Vec3Impl stopBuilding() { - final Vec3Impl toReturn = getCurrentOffset(); - building = false; - currentOffset = null; - - return toReturn; - } - - public Vec3Impl getCurrentOffset() { - verifyBuilding(); - return currentOffset; - } - - public Vec3Impl addOffset(Vec3Impl offset) { - verifyBuilding(); - return setCurrentOffset(currentOffset.add(offset)); - } - } - - public void registerSpecialCasings(MultiBlockPart part) { - if (part instanceof UpgradeCasing upgradeCasing) { - upgradeCasings.add(new WeakTargetRef<>(upgradeCasing, true)); - } - if (part instanceof FunctionalCasing functionalCasing) { - functionalCasings.add(new WeakTargetRef<>(functionalCasing, true)); - } - } - - // #region Fluid - MultiBlock related Fluid Tank behaviour. - - @Override - @Nullable - public FluidInventoryLogic getFluidLogic(@Nonnull ForgeDirection side, @Nonnull InventoryType type) { - if (side == facing) return null; - return switch (type) { - case Input -> controllerFluidInput.getAllInventoryLogics(); - case Output -> controllerFluidOutput.getAllInventoryLogics(); - default -> null; - }; - } - - @Override - @Nonnull - public @NotNull FluidInventoryLogic getFluidLogic(@Nonnull InventoryType type, @Nullable UUID id) { - return switch (type) { - case Input -> controllerFluidInput.getInventoryLogic(id); - case Output -> controllerFluidOutput.getInventoryLogic(id); - default -> throw new IllegalStateException("Unexpected value: " + type); - }; - } - - @Override - @Nonnull - public UUID registerFluidInventory(int tanks, long capacity, int tier, @Nonnull InventoryType type, - boolean isUpgradeInventory) { - return switch (type) { - case Input -> controllerFluidInput - .addInventory(new FluidInventoryLogic(tanks, capacity, tier, isUpgradeInventory)); - case Output -> controllerFluidOutput - .addInventory(new FluidInventoryLogic(tanks, capacity, tier, isUpgradeInventory)); - case Both -> { - UUID id = controllerFluidInput - .addInventory(new FluidInventoryLogic(tanks, capacity, tier, isUpgradeInventory)); - controllerFluidOutput - .addInventory(id, new FluidInventoryLogic(tanks, capacity, tier, isUpgradeInventory)); - yield id; - } - }; - } - - @Override - @Nonnull - public FluidInventoryLogic unregisterFluidInventory(@Nonnull UUID id, @Nonnull InventoryType type) { - return switch (type) { - case Input -> controllerFluidInput.removeInventory(id); - case Output -> controllerFluidOutput.removeInventory(id); - case Both -> { - FluidInventoryLogic input = controllerFluidInput.removeInventory(id); - FluidInventoryLogic output = controllerFluidOutput.removeInventory(id); - yield new FluidInventoryLogic( - Stream.of(input, output) - .map(FluidInventoryLogic::getInventory) - .collect(Collectors.toList())); - } - }; - } - - @Override - public void changeFluidInventoryDisplayName(@Nullable UUID id, @Nullable String displayName, - @Nonnull InventoryType type) { - switch (type) { - case Input: - controllerFluidInput.setInventoryDisplayName(id, displayName); - break; - case Output: - controllerFluidOutput.setInventoryDisplayName(id, displayName); - break; - case Both: - controllerFluidInput.setInventoryDisplayName(id, displayName); - controllerFluidOutput.setInventoryDisplayName(id, displayName); - break; - } - } - - // #endregion Fluid - - // #region Item - MultiBlock related Item behaviour. - - @Override - @Nullable - public ItemInventoryLogic getItemLogic(@Nonnull ForgeDirection side, @Nonnull InventoryType type) { - if (side == facing) return null; - return switch (type) { - case Input -> controllerItemInput.getAllInventoryLogics(); - case Output -> controllerItemOutput.getAllInventoryLogics(); - default -> null; - }; - } - - @Override - @Nonnull - public ItemInventoryLogic getItemLogic(@Nonnull InventoryType type, @Nullable UUID id) { - return switch (type) { - case Input -> controllerItemInput.getInventoryLogic(id); - case Output -> controllerItemOutput.getInventoryLogic(id); - default -> throw new IllegalStateException("Unexpected value: " + type); - }; - } - - @Override - @Nonnull - public UUID registerItemInventory(int slots, int tier, @Nonnull InventoryType type, boolean isUpgradeInventory) { - return switch (type) { - case Input -> controllerItemInput.addInventory(new ItemInventoryLogic(slots, tier, isUpgradeInventory)); - case Output -> controllerItemOutput.addInventory(new ItemInventoryLogic(slots, tier, isUpgradeInventory)); - case Both -> { - UUID id = controllerItemInput.addInventory(new ItemInventoryLogic(slots, tier, isUpgradeInventory)); - controllerItemOutput.addInventory(id, new ItemInventoryLogic(slots, tier, isUpgradeInventory)); - yield id; - } - }; - } - - @Override - public ItemInventoryLogic unregisterItemInventory(@Nonnull UUID id, @Nonnull InventoryType type) { - return switch (type) { - case Input -> controllerItemInput.removeInventory(id); - case Output -> controllerItemOutput.removeInventory(id); - case Both -> { - ItemInventoryLogic input = controllerItemInput.removeInventory(id); - ItemInventoryLogic output = controllerItemOutput.removeInventory(id); - yield new ItemInventoryLogic( - Arrays.asList(input, output) - .stream() - .map(inv -> inv.getInventory()) - .collect(Collectors.toList())); - } - }; - } - - @Override - public void changeItemInventoryDisplayName(@Nullable UUID id, @Nullable String displayName, - @Nonnull InventoryType type) { - switch (type) { - case Input: - controllerItemInput.setInventoryDisplayName(id, displayName); - break; - case Output: - controllerItemOutput.setInventoryDisplayName(id, displayName); - break; - case Both: - controllerItemInput.setInventoryDisplayName(id, displayName); - controllerItemOutput.setInventoryDisplayName(id, displayName); - break; - } - } - - // #endregion Item - - // #region Energy - - @Nonnull - @Override - public PowerLogic getPowerLogic() { - return getPowerLogic(ForgeDirection.UNKNOWN); - } - - // #endregion Energy - - @Override - protected void updateSlots() { - controllerItemInput.getAllInventoryLogics() - .update(shouldSort); - controllerItemOutput.getAllInventoryLogics() - .update(shouldSort); - controllerFluidInput.getAllInventoryLogics() - .update(); - controllerFluidOutput.getAllInventoryLogics() - .update(); - } - - /* - * GUI Work - Multiblock GUI related methods - */ - @Override - public boolean useModularUI() { - return true; - } - - @Override - public boolean hasGui(ForgeDirection side) { - return true; - } - - @Override - protected void addTitleTextStyle(ModularWindow.Builder builder, String title) { - // leave empty - } - - @Override - public boolean supportsVoidProtection() { - return true; - } - - @Override - public VoidingMode getVoidingMode() { - return voidingMode; - } - - @Override - public void setVoidingMode(VoidingMode mode) { - this.voidingMode = mode; - } - - @Override - public boolean canDumpItemToME() { - return false; - } - - @Override - public boolean canDumpFluidToME() { - return false; - } - - @Override - public boolean supportsInputSeparation() { - return true; - } - - @Override - public boolean isInputSeparated() { - return separateInputs; - } - - @Override - public void setInputSeparation(Boolean enabled) { - this.separateInputs = enabled; - } - - @Override - public boolean supportsBatchMode() { - return true; - } - - @Override - public boolean isBatchModeEnabled() { - return batchMode; - } - - @Override - public void setBatchMode(Boolean mode) { - this.batchMode = mode; - } - - @Override - public boolean supportsSingleRecipeLocking() { - return false; - } - - @Override - public boolean isRecipeLockingEnabled() { - return recipeLock; - } - - @Override - public void setRecipeLocking(Boolean enabled) { - this.recipeLock = enabled; - } - - @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { - super.getWailaNBTData(player, tile, tag, world, x, y, z); - P processing = getProcessingLogic(); - tag.setInteger("progress", processing.getProgress()); - tag.setInteger("maxProgress", processing.getDuration()); - tag.setBoolean("structureOkay", structureOkay); - tag.setBoolean("isActive", isActive()); - if (isActive()) { - tag.setLong("energyUsage", getProcessingLogic().getCalculatedEut()); - tag.setLong("energyTier", tier); - } - } - - @Override - public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { - super.getWailaBody(itemStack, currentTip, accessor, config); - final NBTTagCompound tag = accessor.getNBTData(); - if (!tag.getBoolean("structureOkay")) { - currentTip.add(RED + "** INCOMPLETE STRUCTURE **" + RESET); - } else { - currentTip.add((GREEN + "Running Fine") + RESET); - } - if (isSimpleMachine) { - boolean isActive = tag.getBoolean("isActive"); - currentTip.add( - GTWaila.getMachineProgressString(isActive, tag.getInteger("maxProgress"), tag.getInteger("progress"))); - } - boolean isActive = tag.getBoolean("isActive"); - if (isActive) { - long energyTier = tag.getLong("energyTier"); - long actualEnergyUsage = tag.getLong("energyUsage"); - if (actualEnergyUsage > 0) { - currentTip.add( - StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.use_with_amperage", - GTUtility.formatNumbers(actualEnergyUsage), - GTUtility.getAmperageForTier(actualEnergyUsage, (byte) energyTier), - GTUtility.getColoredTierNameFromTier((byte) energyTier))); - } else if (actualEnergyUsage < 0) { - currentTip.add( - StatCollector.translateToLocalFormatted( - "GT5U.waila.energy.produce_with_amperage", - GTUtility.formatNumbers(-actualEnergyUsage), - GTUtility.getAmperageForTier(-actualEnergyUsage, (byte) energyTier), - GTUtility.getColoredTierNameFromTier((byte) energyTier))); - } - } - } - - @Override - public GTPacketMultiTileEntity getClientDataPacket() { - return super.getClientDataPacket(); - } - - @Override - public void enableWorking() { - super.enableWorking(); - if (!structureOkay) { - checkStructure(true); - } - } - - @Override - public List getItemOutputSlots(ItemStack[] toOutput) { - return new ArrayList<>(0); - } - - @Override - public List getFluidOutputSlots(FluidStack[] toOutput) { - return new ArrayList<>(0); - } - - @Override - @Nonnull - public Set> getAllFluidInventoryLogics(@Nonnull InventoryType type) { - return switch (type) { - case Input -> controllerFluidInput.getAllInventoryLogicsAsEntrySet(); - case Output -> controllerFluidOutput.getAllInventoryLogicsAsEntrySet(); - default -> super.getAllFluidInventoryLogics(type); - }; - } - - @Override - @Nonnull - public Set> getAllItemInventoryLogics(@Nonnull InventoryType type) { - return switch (type) { - case Input -> controllerItemInput.getAllInventoryLogicsAsEntrySet(); - case Output -> controllerItemOutput.getAllInventoryLogicsAsEntrySet(); - default -> super.getAllItemInventoryLogics(type); - }; - } - - @Override - public void setWirelessSupport(boolean canUse) { - if (canUse) { - strongCheckOrAddUser(getOwnerUuid()); - } - power.setCanUseWireless(canUse, getOwnerUuid()); - } - - @Override - public void setLaserSupport(boolean canUse) { - power.setCanUseLaser(canUse); - } - - @Override - public void setMaxAmperage(long amperage) { - power.setMaxAmperage(amperage); - } -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java deleted file mode 100644 index faf3f1ae8ae..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java +++ /dev/null @@ -1,692 +0,0 @@ -package gregtech.api.multitileentity.multiblock.base; - -import static com.google.common.math.LongMath.log2; -import static gregtech.api.enums.GTValues.B; -import static gregtech.api.enums.Textures.BlockIcons.FLUID_IN_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.FLUID_OUT_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.ITEM_IN_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.ITEM_OUT_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGY_IN_MULTI; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGY_OUT_MULTI; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; - -import java.math.RoundingMode; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; - -import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; -import com.gtnewhorizons.modularui.common.widget.DrawableWidget; - -import gregtech.api.enums.GTValues.NBT; -import gregtech.api.enums.InventoryType; -import gregtech.api.fluid.GTFluidTank; -import gregtech.api.gui.GUIHost; -import gregtech.api.gui.GUIProvider; -import gregtech.api.interfaces.ITexture; -import gregtech.api.logic.FluidInventoryLogic; -import gregtech.api.logic.ItemInventoryLogic; -import gregtech.api.logic.NullPowerLogic; -import gregtech.api.logic.PowerLogic; -import gregtech.api.logic.interfaces.PowerLogicHost; -import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.WeakTargetRef; -import gregtech.api.multitileentity.base.NonTickableMultiTileEntity; -import gregtech.api.multitileentity.enums.MultiTileCasingPurpose; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.interfaces.IMultiBlockPart; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GTUtility; -import gregtech.common.covers.CoverInfo; -import gregtech.common.gui.PartGUIProvider; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - -public abstract class MultiBlockPart extends NonTickableMultiTileEntity - implements IMultiBlockPart, PowerLogicHost, GUIHost { - - public static final int NOTHING = 0, ENERGY_IN = B[0], ENERGY_OUT = B[1], FLUID_IN = B[2], FLUID_OUT = B[3], - ITEM_IN = B[4], ITEM_OUT = B[5]; - - protected final List BASIC_MODES = new ArrayList<>( - Arrays.asList(NOTHING, ENERGY_IN, ENERGY_OUT, FLUID_IN, FLUID_OUT, ITEM_IN, ITEM_OUT)); - - protected Set registeredPurposes = new HashSet<>(); - - protected final WeakTargetRef controller = new WeakTargetRef<>( - IMultiBlockController.class, - false); - - protected int allowedModes = NOTHING; // BITMASK - Modes allowed for this part - protected int mode = 0; // Mode selected for this part - - protected UUID lockedInventory; - protected int mLockedInventoryIndex = 0; - protected GTFluidTank configurationTank = new GTFluidTank(); - - @Nonnull - protected final GUIProvider guiProvider = createGUIProvider(); - - /** - * What Part Tier is this part? All Basic Casings are Tier 1, and will allow: Energy, Item, Fluid input/output. Some - * of the more advanced modes can be set to require a higher tier part. - */ - public int getPartTier() { - return 1; - } - - @Override - public UUID getLockedInventory() { - return lockedInventory; - } - - public void setTarget(IMultiBlockController newController, int aAllowedModes) { - final IMultiBlockController currentController = getTarget(false); - if (currentController != null && currentController != newController) { - for (MultiTileCasingPurpose purpose : registeredPurposes) { - unregisterPurpose(purpose); - } - } - - allowedModes = aAllowedModes; - if (newController != currentController) { - registerCovers(newController); - registerPurposes(); - } - } - - protected void registerPurpose(MultiTileCasingPurpose purpose) { - IMultiBlockController target = getTarget(false); - if (target != null) { - target.registerCaseWithPurpose(purpose, this); - registeredPurposes.add(purpose); - } - } - - protected void unregisterPurpose(MultiTileCasingPurpose purpose) { - IMultiBlockController target = getTarget(false); - if (target != null) { - target.unregisterCaseWithPurpose(purpose, this); - } - registeredPurposes.remove(purpose); - } - - @Override - protected void addDebugInfo(EntityPlayer aPlayer, int aLogLevel, ArrayList tList) { - final IMultiBlockController controller = getTarget(false); - if (controller != null) { - tList.add("Has controller"); - } else { - tList.add("No Controller"); - } - tList.add("Casing Mode: " + getModeName(mode)); - } - - @Override - public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { - super.getWailaBody(itemStack, currentTip, accessor, config); - currentTip.add(String.format("Mode: %s", getModeName(mode))); - if (modeSelected(FLUID_OUT)) { - if (configurationTank != null && configurationTank.get() != null) { - currentTip.add( - String.format( - "Locked to: %s", - configurationTank.get() - .getLocalizedName())); - } else { - currentTip.add("Locked to: Nothing"); - } - } - } - - public IMultiBlockController getTarget(boolean aCheckValidity) { - final IMultiBlockController res = controller.get(); - if (res != null && aCheckValidity) { - return res.checkStructure(false) ? res : null; - } - return res; - } - - public void registerCovers(IMultiBlockController controller) { - for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - final CoverInfo coverInfo = getCoverInfoAtSide(side); - if (coverInfo.isValid() && coverInfo.getTickRate() > 0) { - controller.registerCoveredPartOnSide(side, this); - } - } - } - - protected void registerPurposes() { - for (MultiTileCasingPurpose purpose : registeredPurposes) { - registerPurpose(purpose); - } - } - - @Override - public void setCoverItemAtSide(ForgeDirection side, ItemStack aCover) { - super.setCoverItemAtSide(side, aCover); - // TODO: Filter on tickable covers - final IMultiBlockController tTarget = getTarget(true); - if (tTarget == null) { - return; - } - - final CoverInfo coverInfo = getCoverInfoAtSide(side); - if (coverInfo.isValid() && coverInfo.getTickRate() > 0) { - tTarget.registerCoveredPartOnSide(side, this); - } - - } - - public void unregisterCovers(IMultiBlockController controller) { - for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - if (getCoverInfoAtSide(side).isValid()) { - controller.unregisterCoveredPartOnSide(side, this); - } - } - } - - @Override - public boolean dropCover(ForgeDirection side, ForgeDirection droppedSide, boolean aForced) { - final boolean res = super.dropCover(side, droppedSide, aForced); - final IMultiBlockController tTarget = getTarget(true); - if (tTarget != null) { - tTarget.unregisterCoveredPartOnSide(side, this); - } - return res; - } - - @Override - public void readMultiTileNBT(NBTTagCompound aNBT) { - if (aNBT.hasKey(NBT.ALLOWED_MODES)) allowedModes = aNBT.getInteger(NBT.ALLOWED_MODES); - if (aNBT.hasKey(NBT.MODE)) setMode(aNBT.getByte(NBT.MODE)); - if (aNBT.hasKey(NBT.TARGET)) { - controller - .setPosition(aNBT.getInteger(NBT.TARGET_X), aNBT.getShort(NBT.TARGET_Y), aNBT.getInteger(NBT.TARGET_Z)); - controller.setWorld(worldObj); - } - if (aNBT.hasKey(NBT.LOCKED_INVENTORY)) { - lockedInventory = UUID.fromString(aNBT.getString(NBT.LOCKED_INVENTORY)); - } - if (aNBT.hasKey(NBT.LOCKED_INVENTORY_INDEX)) { - mLockedInventoryIndex = aNBT.getInteger(NBT.LOCKED_INVENTORY_INDEX); - } - if (aNBT.hasKey(NBT.LOCKED_FLUID)) { - configurationTank.readFromNBT(aNBT, NBT.LOCKED_FLUID); - } - if (modeSelected(ITEM_OUT)) { - registeredPurposes.add(MultiTileCasingPurpose.ItemOutput); - } - if (modeSelected(FLUID_OUT)) { - registeredPurposes.add(MultiTileCasingPurpose.FluidOutput); - } - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - if (allowedModes != NOTHING) nbt.setInteger(NBT.ALLOWED_MODES, allowedModes); - if (mode != 0) nbt.setInteger(NBT.MODE, mode); - - final ChunkCoordinates pos = controller.getPosition(); - if (pos.posY >= 0) { - // Valid position - nbt.setBoolean(NBT.TARGET, true); - nbt.setInteger(NBT.TARGET_X, pos.posX); - nbt.setShort(NBT.TARGET_Y, (short) pos.posY); - nbt.setInteger(NBT.TARGET_Z, pos.posZ); - } - - if (lockedInventory != null) { - nbt.setString(NBT.LOCKED_INVENTORY, lockedInventory.toString()); - } - if (mLockedInventoryIndex != 0) { - nbt.setInteger(NBT.LOCKED_INVENTORY_INDEX, mLockedInventoryIndex); - } - configurationTank.writeToNBT(nbt, NBT.LOCKED_FLUID); - } - - @Override - public void setLockedInventoryIndex(int index) { - mLockedInventoryIndex = index; - } - - @Override - public int getLockedInventoryIndex() { - return mLockedInventoryIndex; - } - - @Override - public ChunkCoordinates getTargetPos() { - return controller.getPosition(); - } - - @Override - public void setMode(int mode) { - if (this.mode == mode) return; - if (modeSelected(FLUID_OUT)) { - unregisterPurpose(MultiTileCasingPurpose.FluidOutput); - } - if (modeSelected(ITEM_OUT)) { - unregisterPurpose(MultiTileCasingPurpose.ItemOutput); - } - this.mode = mode; - if (modeSelected(FLUID_OUT)) { - registerPurpose(MultiTileCasingPurpose.FluidOutput); - } - if (modeSelected(ITEM_OUT)) { - registerPurpose(MultiTileCasingPurpose.ItemOutput); - } - } - - @Override - public int getMode() { - return mode; - } - - @Override - public int getAllowedModes() { - return allowedModes; - } - - @Override - public void setAllowedModes(int aAllowedModes) { - allowedModes = aAllowedModes; - } - - /** - * True if `mode` is one of the allowed modes - */ - public boolean hasMode(int mode) { - // This is not sent to the client - return (allowedModes & mode) != 0; - } - - /** - * Returns true if the part has any of the modes provided, and that mode is the currently selected mode - */ - public boolean modeSelected(int... modes) { - for (int mode : modes) { - if (hasMode(mode) && this.mode == getModeOrdinal(mode)) return true; - } - return false; - } - - @Override - public boolean onBlockBroken() { - final IMultiBlockController tTarget = getTarget(false); - if (tTarget != null) { - unregisterCovers(tTarget); - tTarget.onStructureChange(); - } - return false; - } - - @Override - public void onBlockAdded() { - for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - final TileEntity te = getTileEntityAtSide(side); - if (te instanceof MultiBlockPart part) { - final IMultiBlockController tController = part.getTarget(false); - if (tController != null) tController.onStructureChange(); - } else if (te instanceof IMultiBlockController blockController) { - blockController.onStructureChange(); - } - } - } - - @Override - public ITexture getTexture(ForgeDirection side) { - ITexture texture = super.getTexture(side); - if (mode != 0 && side == facing) { - if (mode == getModeOrdinal(ITEM_IN)) { - return TextureFactory.of( - texture, - TextureFactory.of(OVERLAY_PIPE_IN), - TextureFactory.of(ITEM_IN_SIGN), - getCoverTexture(side)); - } - if (mode == getModeOrdinal(ITEM_OUT)) { - return TextureFactory.of( - texture, - TextureFactory.of(OVERLAY_PIPE_OUT), - TextureFactory.of(ITEM_OUT_SIGN), - getCoverTexture(side)); - } - if (mode == getModeOrdinal(FLUID_IN)) { - return TextureFactory.of( - texture, - TextureFactory.of(OVERLAY_PIPE_IN), - TextureFactory.of(FLUID_IN_SIGN), - getCoverTexture(side)); - } - if (mode == getModeOrdinal(FLUID_OUT)) { - return TextureFactory.of( - texture, - TextureFactory.of(OVERLAY_PIPE_OUT), - TextureFactory.of(FLUID_OUT_SIGN), - getCoverTexture(side)); - } - if (mode == getModeOrdinal(ENERGY_IN)) { - return TextureFactory.of(texture, TextureFactory.of(OVERLAY_ENERGY_IN_MULTI), getCoverTexture(side)); - } - if (mode == getModeOrdinal(ENERGY_OUT)) { - return TextureFactory.of(texture, TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI), getCoverTexture(side)); - } - } - - return TextureFactory.of(texture, getCoverTexture(side)); - } - - protected String getModeName(int aMode) { - if (aMode == NOTHING) return "Nothing"; - if (aMode == getModeOrdinal(ITEM_IN)) return "Item Input"; - if (aMode == getModeOrdinal(ITEM_OUT)) return "Item Output"; - if (aMode == getModeOrdinal(FLUID_IN)) return "Fluid Input"; - if (aMode == getModeOrdinal(FLUID_OUT)) return "Fluid Output"; - if (aMode == getModeOrdinal(ENERGY_IN)) return "Energy Input"; - if (aMode == getModeOrdinal(ENERGY_OUT)) return "Energy Output"; - return "Unknown"; - } - - protected byte getModeOrdinal(int aMode) { - // log2 returns the bit position of the only bit set, add 1 to account for 0 being NOTHING - // NOTE: Must be a power of 2 (single bit) - return (byte) (log2(aMode, RoundingMode.UNNECESSARY) + 1); - } - - protected byte getNextAllowedMode(List allowedModes) { - if (this.allowedModes == NOTHING) return NOTHING; - - final int numModes = allowedModes.size(); - for (byte i = 1; i <= numModes; i++) { - final byte curMode = (byte) ((mode + i) % numModes); - if (curMode == NOTHING || hasMode(1 << (curMode - 1))) return curMode; - } - // Nothing valid found - return 0; - } - - @Override - public boolean onMalletRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, ForgeDirection wrenchSide, float aX, - float aY, float aZ) { - if (allowedModes == NOTHING) return true; - if (mode == NOTHING) { - facing = wrenchSide; - } - setMode(getNextAllowedMode(BASIC_MODES)); - if (aPlayer.isSneaking()) { - facing = wrenchSide; - } - GTUtility.sendChatToPlayer(aPlayer, "Mode set to `" + getModeName(mode) + "' (" + mode + ")"); - sendClientData((EntityPlayerMP) aPlayer); - return true; - } - - @Override - public void setLightValue(byte aLightValue) {} - - @Override - public byte getComparatorValue(ForgeDirection side) { - return 0; - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.part"; - } - - @Override - public boolean shouldTick(long tickTimer) { - return modeSelected(ITEM_OUT, FLUID_OUT); - } - - /** - * TODO: Make sure the energy/item/fluid hatch is facing that way! or has that mode enabled on that side Check - * SIDE_UNKNOWN for or coverbehavior - */ - - // #region Fluid - Depending on the part type - proxy it to the multiblock controller, if we have one - @Override - @Nullable - public FluidInventoryLogic getFluidLogic(@Nonnull ForgeDirection side, @Nonnull InventoryType type) { - if (side != facing && side != ForgeDirection.UNKNOWN) return null; - - if (!modeSelected(FLUID_IN, FLUID_OUT)) return null; - - IMultiBlockController controller = getTarget(false); - if (controller == null) return null; - return controller - .getFluidLogic(modeSelected(FLUID_IN) ? InventoryType.Input : InventoryType.Output, lockedInventory); - } - - // #endregion Fluid - - // #region Energy - Depending on the part type - proxy to the multiblock controller, if we have one - - @Override - @Nonnull - public PowerLogic getPowerLogic(@Nonnull ForgeDirection side) { - if (side != facing && side != ForgeDirection.UNKNOWN) { - return new NullPowerLogic(); - } - - if (!modeSelected(ENERGY_IN, ENERGY_OUT)) { - return new NullPowerLogic(); - } - - final IMultiBlockController controller = getTarget(true); - if (controller == null) { - return new NullPowerLogic(); - } - return controller.getPowerLogic(); - } - - @Override - public boolean isEnetInput() { - return modeSelected(ENERGY_IN); - } - - @Override - public boolean isEnetOutput() { - return modeSelected(ENERGY_OUT); - } - - // #endregion Energy - - // #region Item - Depending on the part type - proxy to the multiblock controller, if we have one - - @Override - @Nullable - public ItemInventoryLogic getItemLogic(@Nonnull ForgeDirection side, @Nonnull InventoryType unused) { - if (side != facing && side != ForgeDirection.UNKNOWN) return null; - - if (!modeSelected(ITEM_IN, ITEM_OUT)) return null; - - final IMultiBlockController controller = getTarget(false); - if (controller == null) return null; - - return controller - .getItemLogic(modeSelected(ITEM_IN) ? InventoryType.Input : InventoryType.Output, lockedInventory); - } - - @Override - @Nullable - public InventoryType getItemInventoryType() { - if (!modeSelected(ITEM_IN, ITEM_OUT)) return InventoryType.Both; - return modeSelected(ITEM_IN) ? InventoryType.Input : InventoryType.Output; - } - - // #endregion Item - - // === Modular UI === - @Override - public boolean useModularUI() { - return true; - } - - @Override - public String getLocalName() { - if (modeSelected(ITEM_IN)) return "Input Inventory"; - if (modeSelected(ITEM_OUT)) return "Output Inventory"; - if (modeSelected(FLUID_IN)) return "Fluid Input Hatch"; - if (modeSelected(FLUID_OUT)) return "Fluid Output Hatch"; - - return "Unknown"; - } - - @Override - public boolean hasGui(ForgeDirection side) { - if (modeSelected(ENERGY_IN, ENERGY_OUT) && facing == side) { - return false; - } - return getTarget(true) != null; - } - - protected boolean isWrongFluid(Fluid fluid) { - if (fluid == null) { - return true; - } - Fluid lockedFluid = getLockedFluid(); - if (lockedFluid != null) { - return !fluid.equals(lockedFluid); - } - return false; - } - - protected Fluid getLockedFluid() { - if (configurationTank.get() != null && configurationTank.get() - .getFluid() != null) { - return configurationTank.get() - .getFluid(); - } - return null; - } - - @Override - public void addUIWidgets(Builder builder, UIBuildContext buildContext) { - super.addUIWidgets(builder, buildContext); - IMultiBlockController controller = getTarget(false); - if (controller == null) { - return; - } - if ((modeSelected(ITEM_IN, ITEM_OUT))) { - builder.widget( - controller - .getItemLogic(modeSelected(ITEM_IN) ? InventoryType.Input : InventoryType.Output, lockedInventory) - .getGuiPart() - .setSize(18 * 4 + 4, 18 * 5) - .setPos(52, 7)); - } - - if ((modeSelected(FLUID_IN, FLUID_OUT))) { - builder.widget( - controller - .getFluidLogic(modeSelected(FLUID_IN) ? InventoryType.Input : InventoryType.Output, lockedInventory) - .getGuiPart() - .setSize(18 * 4 + 4, 18 * 5) - .setPos(52, 7)); - } - } - - protected boolean canOpenControllerGui() { - return true; - } - - @Override - protected int getGUIHeight() { - return super.getGUIHeight() + 20; - } - - @Override - public void addGregTechLogo(Builder builder) { - if (modeSelected(ITEM_IN, ITEM_OUT)) { - builder.widget( - new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(152, 74)); - } else if (modeSelected(FLUID_IN, FLUID_OUT)) { - builder.widget( - new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()) - .setSize(17, 17) - .setPos(152, 82)); - } else { - super.addGregTechLogo(builder); - } - } - - @Override - public void addToolTips(List list, ItemStack stack, boolean f3_h) { - list.add("A MultiTileEntity Casing"); - } - - public String getInventoryName() { - IMultiBlockController controller = getTarget(false); - if (controller == null) return ""; - if (modeSelected(ITEM_IN, ITEM_OUT)) { - InventoryType type = modeSelected(ITEM_IN) ? InventoryType.Input : InventoryType.Output; - ItemInventoryLogic itemLogic = controller.getItemLogic(type, lockedInventory); - return itemLogic.getDisplayName(); - } - if (modeSelected(FLUID_IN, FLUID_OUT)) { - InventoryType type = modeSelected(FLUID_IN) ? InventoryType.Input : InventoryType.Output; - FluidInventoryLogic fluidLogic = controller.getFluidLogic(type, lockedInventory); - return fluidLogic.getDisplayName(); - } - return ""; - } - - @Override - @Nonnull - public ForgeDirection getPowerOutputSide() { - if (!modeSelected(ENERGY_OUT)) return ForgeDirection.UNKNOWN; - return facing; - } - - @Nonnull - protected GUIProvider createGUIProvider() { - return new PartGUIProvider<>(this); - } - - @Override - @Nonnull - public GUIProvider getGUI(@Nonnull UIBuildContext uiContext) { - IMultiBlockController controller = getTarget(false); - if (controller == null) return guiProvider; - if (!modeSelected(NOTHING, ENERGY_IN, ENERGY_OUT)) return guiProvider; - if (!canOpenControllerGui()) return guiProvider; - if (uiContext.getPlayer() - .isSneaking()) return guiProvider; - return controller.getGUI(uiContext); - } - - @Override - public ItemStack getAsItem() { - return MultiTileEntityRegistry.getRegistry(getMultiTileEntityRegistryID()) - .getItem(getMultiTileEntityID()); - } - - @Override - public String getMachineName() { - return StatCollector.translateToLocal(getAsItem().getUnlocalizedName()); - } - -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/StackableController.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/StackableController.java deleted file mode 100644 index 51feb363dd2..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/StackableController.java +++ /dev/null @@ -1,128 +0,0 @@ -package gregtech.api.multitileentity.multiblock.base; - -import net.minecraft.item.ItemStack; - -import com.gtnewhorizon.structurelib.util.Vec3Impl; - -import gregtech.api.logic.MuTEProcessingLogic; - -public abstract class StackableController, P extends MuTEProcessingLogic

> - extends Controller { - - protected static String STACKABLE_STOP = "STACKABLE_STOP"; - protected static String STACKABLE_MIDDLE = "STACKABLE_MIDDLE"; - protected static String STACKABLE_START = "STACKABLE_START"; - protected int stackCount = 0; - - /** - * construct implementation for stackable multi-blocks - */ - @Override - public void construct(ItemStack trigger, boolean hintsOnly) { - final int blueprintCount = (trigger.stackSize - 1) + getMinStacks(); - final int stackCount = Math.min(blueprintCount, getMaxStacks()); - - buildState.startBuilding(getStartingStructureOffset()); - buildPiece(getStackableStart(), trigger, hintsOnly, buildState.getCurrentOffset()); - buildState.addOffset(getStartingStackOffset()); - - for (int i = 0; i < stackCount; i++) { - buildPiece(getStackableMiddle(i), trigger, hintsOnly, buildState.getCurrentOffset()); - buildState.addOffset(getPerStackOffset()); - } - if (hasTop()) { - buildState.addOffset(getAfterLastStackOffset()); - buildPiece(getStackableStop(), trigger, hintsOnly, buildState.stopBuilding()); - } else { - buildState.stopBuilding(); - } - } - - /** - * Stackable - * - * @return The minimum number of stacks required for this multi-block to form - */ - public abstract int getMinStacks(); - - /** - * Stackable - * - * @return The maximum number of stacks allowed for this multi-block to form - */ - public abstract int getMaxStacks(); - - /** - * Stackable - * - * @return The starting offset for the first stack - */ - public abstract Vec3Impl getStartingStackOffset(); - - /** - * Stackable - * - * @return The per stack offset - */ - public abstract Vec3Impl getPerStackOffset(); - - /** - * Stackable - * - * @return Whether this structure has a Top/Cap. Defaults to true. - */ - public boolean hasTop() { - return true; - } - - /** - * Stackable - * - * @return Any offset needed after the last stack - */ - public Vec3Impl getAfterLastStackOffset() { - return new Vec3Impl(0, 0, 0); - } - - /** - * checkMachine implementation for stackable multi-blocks - */ - @Override - public boolean checkMachine() { - stackCount = 0; - - buildState.startBuilding(getStartingStructureOffset()); - if (!checkPiece(getStackableStart(), buildState.getCurrentOffset())) return buildState.failBuilding(); - - buildState.addOffset(getStartingStackOffset()); - - for (int i = 0; i < getMaxStacks(); i++) { - if (!checkPiece(getStackableMiddle(i), buildState.getCurrentOffset())) { - break; - } - - buildState.addOffset(getPerStackOffset()); - stackCount++; - - } - if (stackCount < getMinStacks()) return buildState.failBuilding(); - - buildState.addOffset(getAfterLastStackOffset()); - if (!checkPiece(getStackableStop(), buildState.stopBuilding())) { - return buildState.failBuilding(); - } - return super.checkMachine(); - } - - protected String getStackableStop() { - return STACKABLE_STOP; - } - - protected String getStackableMiddle(int stackIndex) { - return STACKABLE_MIDDLE; - } - - protected String getStackableStart() { - return STACKABLE_START; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/StackableModularController.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/StackableModularController.java deleted file mode 100644 index 5e7a928399f..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/StackableModularController.java +++ /dev/null @@ -1,77 +0,0 @@ -package gregtech.api.multitileentity.multiblock.base; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import org.jetbrains.annotations.NotNull; - -import gregtech.api.logic.MuTEProcessingLogic; -import gregtech.api.multitileentity.interfaces.UpgradableModularMuTE; -import gregtech.api.util.GT_StructureUtilityMuTE.UpgradeCasings; - -public abstract class StackableModularController, P extends MuTEProcessingLogic

> - extends StackableController implements UpgradableModularMuTE { - - protected double durationMultiplier = 1; - protected double euTickMultiplier = 1; - - private Map mucMap; - - protected @NotNull Map getMucMap() { - if (mucMap == null) { - mucMap = createMucMap(); - } - return mucMap; - } - - protected static @NotNull Map createMucMap() { - Map mucCount = new HashMap<>(); - mucCount.put(UpgradeCasings.Heater, new int[] { 0, 0, 0, 0, 0 }); - mucCount.put(UpgradeCasings.Insulator, new int[] { 0, 0, 0, 0, 0 }); - return mucCount; - } - - @Override - public void increaseMucCount(UpgradeCasings casingType, int tier) { - Map mucCounters = getMucMap(); - int[] casingCount = mucCounters.get(casingType); - - switch (tier) { - case 0, 1, 2 -> casingCount[0] += 1; - case 3, 4, 5 -> casingCount[1] += 1; - case 6, 7, 8 -> casingCount[2] += 1; - case 9, 10, 11 -> casingCount[3] += 1; - default -> casingCount[4] += 1; - } - } - - @Override - public void resetMucCount() { - Map mucCounters = getMucMap(); - mucCounters.forEach((type, casingCount) -> Arrays.fill(casingCount, 0)); - } - - // Returns the cheapest MUC that is possible for the multi, which gets the minimum bonuses. - protected abstract UpgradeCasings getBaseMucType(); - - // Minimum parallel bonus per MUC. Higher tier MUCs multiply with this value for even more parallels. - protected abstract int getParallelFactor(); - - protected void calculateParallels() { - int parallelCount = 0; - int parallelFactor = getParallelFactor(); - int[] parallelCasingList = mucMap.get(getBaseMucType()); - - for (int i = 0; i < 5; i++) { - // (i * 3 + 1) -> Convert MUC tier into minimum GT tier, in groups of 3 (LV, EV, LuV, UHV, UMV) - // If higher than multi tier, upgrade casing has no effect - if (i * 3 + 1 <= tier) { - parallelCount += parallelCasingList[i] * (i + 1) * parallelFactor; - } - } - maxParallel = parallelCount == 0 ? 1 : parallelCount; - } - - protected abstract boolean calculateMucMultipliers(); -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/WallShareablePart.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/WallShareablePart.java deleted file mode 100644 index c7364564374..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/WallShareablePart.java +++ /dev/null @@ -1,100 +0,0 @@ -package gregtech.api.multitileentity.multiblock.base; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.multitileentity.WeakTargetRef; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; - -public class WallShareablePart extends MultiBlockPart { - - protected List> targets = new ArrayList<>(); - - @Override - public void setTarget(IMultiBlockController newController, int allowedModes) { - if (!targets.isEmpty()) { - this.allowedModes = 0; - setMode((byte) 0); - controller.invalidate(); - } else { - this.allowedModes = allowedModes; - controller.setTarget(newController); - } - - if (newController == null) { - return; - } - - targets.add(new WeakTargetRef<>(IMultiBlockController.class, true)); - } - - @Override - public UUID getLockedInventory() { - if (targets.size() > 1) { - return null; - } - return super.getLockedInventory(); - } - - @Override - public IMultiBlockController getTarget(boolean aCheckValidity) { - if (targets.size() != 1) { - return null; - } - - controller.setTarget( - targets.get(0) - .get()); - return super.getTarget(aCheckValidity); - } - - @Override - public String getTileEntityName() { - return "gt.multiTileEntity.casing.wallSharable"; - } - - @Override - public boolean onBlockBroken() { - for (final WeakTargetRef tar : targets) { - IMultiBlockController target = getTarget(tar.getPosition(), false); - if (target == null) { - continue; - } - target.onStructureChange(); - } - return false; - } - - @Override - public void onBlockAdded() { - for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - final TileEntity te = getTileEntityAtSide(side); - if (te instanceof MultiBlockPart part) { - final IMultiBlockController tController = part.getTarget(false); - if (tController != null) tController.onStructureChange(); - } else if (te instanceof IMultiBlockController tController) { - tController.onStructureChange(); - } - } - } - - public IMultiBlockController getTarget(ChunkCoordinates coordinates, boolean aCheckValidity) { - IMultiBlockController target = null; - if (coordinates == null) return null; - if (worldObj.blockExists(coordinates.posX, coordinates.posY, coordinates.posZ)) { - final TileEntity te = worldObj.getTileEntity(coordinates.posX, coordinates.posY, coordinates.posZ); - if (te instanceof IMultiBlockController) { - target = (IMultiBlockController) te; - } - } - if (aCheckValidity) { - return target != null && target.checkStructure(false) ? target : null; - } - return target; - } -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/BasicCasing.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/BasicCasing.java deleted file mode 100644 index 84f1442a88a..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/BasicCasing.java +++ /dev/null @@ -1,7 +0,0 @@ -package gregtech.api.multitileentity.multiblock.casing; - -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public class BasicCasing extends MultiBlockPart { - /* Nothing */ -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java deleted file mode 100644 index 9f0d9bd2d18..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java +++ /dev/null @@ -1,10 +0,0 @@ -package gregtech.api.multitileentity.multiblock.casing; - -/** - * Allows for functional casings that influence the multiblock structure's behavior Examples include: - Extra Byproducts - * - Extra Speed - More parallels - Upgraded internal item/energy/fluid storage - Faster output - Voiding/Anti-Voiding - * upgrade - Ender Upgrades - etc, etc. - * - */ -public class CasingBehaviorBase { -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/FunctionalCasing.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/FunctionalCasing.java deleted file mode 100644 index d48bbd03fd2..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/FunctionalCasing.java +++ /dev/null @@ -1,29 +0,0 @@ -package gregtech.api.multitileentity.multiblock.casing; - -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.GTValues; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public abstract class FunctionalCasing extends MultiBlockPart { - - private int tier = 0; - - @Override - public int getPartTier() { - return tier; - } - - public abstract float getPartModifier(); - - @Override - public void readMultiTileNBT(NBTTagCompound nbt) { - super.readMultiTileNBT(nbt); - tier = nbt.getInteger(GTValues.NBT.TIER); - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - super.writeMultiTileNBT(nbt); - } -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/Glasses.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/Glasses.java deleted file mode 100644 index 4575716fd5e..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/Glasses.java +++ /dev/null @@ -1,38 +0,0 @@ -package gregtech.api.multitileentity.multiblock.casing; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static gregtech.api.enums.Mods.BartWorks; -import static gregtech.api.enums.Mods.Botania; -import static gregtech.api.enums.Mods.IndustrialCraft2; -import static gregtech.api.enums.Mods.Thaumcraft; - -import com.gtnewhorizon.structurelib.structure.IStructureElementChain; - -import gregtech.api.GregTechAPI; - -public class Glasses { - - /** support all Bart, Botania, Ic2, Thaumcraft glasses for multiblock structure **/ - public static IStructureElementChain chainAllGlasses() { - return ofChain( - // IndustrialCraft2 glass - ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - - // Botania glass - ofBlockUnlocalizedName(Botania.ID, "manaGlass", 0, false), - ofBlockUnlocalizedName(Botania.ID, "elfGlass", 0, false), - - // BartWorks glass - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - - // Tinted Industrial Glass - ofBlockAnyMeta(GregTechAPI.sBlockTintedGlass, 0), - - // warded glass - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false)); - } - -} diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/UpgradeCasing.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/UpgradeCasing.java deleted file mode 100644 index ae5b36c1e02..00000000000 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/UpgradeCasing.java +++ /dev/null @@ -1,35 +0,0 @@ -package gregtech.api.multitileentity.multiblock.casing; - -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.GTValues; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public abstract class UpgradeCasing extends MultiBlockPart { - - protected int tier = 0; - - @Override - public int getPartTier() { - return tier; - } - - @Override - public void setTarget(IMultiBlockController newController, int aAllowedModes) { - super.setTarget(newController, aAllowedModes); - - if (getTarget(false) != null) { - customWork(getTarget(false)); - } - } - - @Override - public void readMultiTileNBT(NBTTagCompound aNBT) { - super.readMultiTileNBT(aNBT); - tier = aNBT.getInteger(GTValues.NBT.TIER); - } - - protected abstract void customWork(IMultiBlockController aTarget); - -} diff --git a/src/main/java/gregtech/api/net/GTPacketMultiTileEntity.java b/src/main/java/gregtech/api/net/GTPacketMultiTileEntity.java deleted file mode 100644 index 1b9fab34d41..00000000000 --- a/src/main/java/gregtech/api/net/GTPacketMultiTileEntity.java +++ /dev/null @@ -1,254 +0,0 @@ -package gregtech.api.net; - -import static gregtech.api.enums.GTValues.B; - -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; - -import net.minecraft.world.IBlockAccess; - -import com.google.common.io.ByteArrayDataInput; - -import gregtech.api.net.data.CasingData; -import gregtech.api.net.data.CommonData; -import gregtech.api.net.data.CoordinateData; -import gregtech.api.net.data.MultiTileEntityData; -import gregtech.api.net.data.MultiTileEntityProcess; -import gregtech.api.net.data.PacketData; -import io.netty.buffer.ByteBuf; - -public class GTPacketMultiTileEntity extends GTPacket { - - private final Set> data = new HashSet<>(); - public static final int COVERS = B[0], REDSTONE = B[1], MODES = B[2], CONTROLLER = B[3], INVENTORY_INDEX = B[4], - INVENTORY_NAME_ID = B[5], BOOLEANS = B[6], SOUND = B[7]; - - public GTPacketMultiTileEntity() { - super(); - } - - @Override - public void encode(ByteBuf aOut) { - Set> set = data.stream() - .sorted() - .collect( - HashSet>::new, - HashSet>::add, - HashSet>::addAll); - clearData(); - data.addAll(set); - int features = 0; - for (PacketData data : data) { - features |= 1 << data.getId(); - } - - aOut.writeInt(features); - - for (PacketData data : data) { - data.encode(aOut); - } - /* - * TODO Move to new system - * if ((features & COVERS) == COVERS) { - * aOut.writeInt(mC0); - * aOut.writeInt(mC1); - * aOut.writeInt(mC2); - * aOut.writeInt(mC3); - * aOut.writeInt(mC4); - * aOut.writeInt(mC5); - * } - * if ((features & MODES) == MODES) { - * aOut.writeInt(mode); - * aOut.writeInt(allowedModes); - * } - * if ((features & CONTROLLER) == CONTROLLER) { - * aOut.writeInt(mTargetPos.posX); - * aOut.writeShort(mTargetPos.posY); - * aOut.writeInt(mTargetPos.posZ); - * } - * if ((features & INVENTORY_INDEX) == INVENTORY_INDEX) { - * aOut.writeInt(mLockedInventoryIndex); - * } - * if ((features & INVENTORY_NAME_ID) == INVENTORY_NAME_ID) { - * if (mInventoryName != null && mInventoryName.length() > 0) { - * byte[] bytes = mInventoryName.getBytes(); - * aOut.writeInt(bytes.length); - * aOut.writeBytes(bytes); - * } else { - * aOut.writeInt(0); - * } - * if (inventoryID != null && inventoryID.length() > 0) { - * byte[] bytes = inventoryID.getBytes(); - * aOut.writeInt(bytes.length); - * aOut.writeBytes(bytes); - * } else { - * aOut.writeInt(0); - * } - * } - * if ((features & BOOLEANS) == BOOLEANS) { - * aOut.writeInt(booleans); - * } - * if ((features & SOUND) == SOUND) { - * aOut.writeByte(soundEvent); - * aOut.writeInt(soundEventValue); - * } - */ - } - - @Override - public GTPacket decode(ByteArrayDataInput in) { - Objects.requireNonNull(in); - final int packetFeatures = in.readInt(); - - final GTPacketMultiTileEntity packet = new GTPacketMultiTileEntity(); - - if (containsBit(packetFeatures, CoordinateData.COORDINATE_DATA_ID)) { - packet.addData(new CoordinateData()); - } - if (containsBit(packetFeatures, MultiTileEntityData.MULTI_TILE_ENTITY_DATA_ID)) { - packet.addData(new MultiTileEntityData()); - } - if (containsBit(packetFeatures, CommonData.COMMON_DATA_ID)) { - packet.addData(new CommonData()); - } - if (containsBit(packetFeatures, CasingData.CASING_DATA_ID)) { - packet.addData(new CasingData()); - } - - Set> set = packet.data.stream() - .sorted() - .collect( - HashSet>::new, - HashSet>::add, - HashSet>::addAll); - packet.clearData(); - packet.data.addAll(set); - for (PacketData data : packet.data) { - data.decode(in); - } - /* - * if ((packetFeatures & COVERS) == COVERS) { - * packet.setCoverData( - * in.readInt(), - * in.readInt(), - * in.readInt(), - * in.readInt(), - * in.readInt(), - * in.readInt()); - * } - * if ((packetFeatures & INVENTORY_INDEX) == INVENTORY_INDEX) { - * packet.setInventoryIndex(aData.readInt()); - * } - * if ((packetFeatures & INVENTORY_NAME_ID) == INVENTORY_NAME_ID) { - * int nameLength = aData.readInt(); - * String inventoryName; - * if (nameLength > 0) { - * byte[] bytes = new byte[nameLength]; - * for (int i = 0; i < nameLength; i++) { - * bytes[i] = aData.readByte(); - * } - * inventoryName = new String(bytes); - * } else { - * inventoryName = null; - * } - * int idLength = aData.readInt(); - * String inventoryID; - * if (idLength > 0) { - * byte[] bytes = new byte[idLength]; - * for (int i = 0; i < idLength; i++) { - * bytes[i] = aData.readByte(); - * } - * inventoryID = new String(bytes); - * } else { - * inventoryID = null; - * } - * packet.setInventoryName(inventoryName, inventoryID); - * } - * if ((packetFeatures & BOOLEANS) == BOOLEANS) { - * packet.setBooleans(aData.readInt()); - * } - * if ((packetFeatures & SOUND) == SOUND) { - * packet.setSoundEvent(aData.readByte(), aData.readInt()); - * } - */ - return packet; - } - - @Override - public void process(IBlockAccess aWorld) { - if (aWorld == null) return; - MultiTileEntityProcess process = new MultiTileEntityProcess(aWorld); - for (PacketData data : data) { - data.process(process); - } - process.process(); - /* - * final TileEntity tTileEntity = aWorld.getTileEntity(mX, mY, mZ); - * try { - * final Block tBlock = aWorld.getBlock(mX, mY, mZ); - * if (tBlock instanceof MultiTileEntityBlock mteBlock) { - * final IMultiTileEntity mte = mteBlock.receiveMultiTileEntityData(aWorld, mX, mY, mZ, mRID, mID); - * if (mte == null) return; - * mte.receiveClientData(GregTechTileClientEvents.CHANGE_COMMON_DATA, mCommonData); - * mte.receiveClientData(GregTechTileClientEvents.CHANGE_COLOR, mColor); - * if ((features & COVERS) == COVERS) { - * mteBlock.receiveCoverData(mte, mC0, mC1, mC2, mC3, mC4, mC5); - * } - * if ((features & REDSTONE) == REDSTONE) { - * mte.receiveClientData(GregTechTileClientEvents.CHANGE_REDSTONE_OUTPUT, mRedstone); - * } - * if ((features & MODES) == MODES && mte instanceof IMultiTileEntity.IMTE_HasModes mteModes) { - * mteModes.setMode(mode); - * mteModes.setAllowedModes(allowedModes); - * } - * if ((features & INVENTORY_NAME_ID) == INVENTORY_NAME_ID && mte instanceof Inventory invUpg) { - * invUpg.setInventoryName(mInventoryName); - * invUpg.setInventoryId(inventoryID); - * } - * if ((features & CONTROLLER) == CONTROLLER && mte instanceof IMultiBlockPart) { - * final IMultiBlockPart mtePart = (IMultiBlockPart) mte; - * mtePart.setTargetPos(mTargetPos); - * } - * if ((features & INVENTORY_INDEX) == INVENTORY_INDEX && mte instanceof IMultiBlockPart) { - * final IMultiBlockPart mtePart = (IMultiBlockPart) mte; - * mtePart.setLockedInventoryIndex(mLockedInventoryIndex); - * } - * if ((features & BOOLEANS) == BOOLEANS && mte instanceof IMultiTileMachine) { - * final IMultiTileMachine machine = (IMultiTileMachine) mte; - * machine.setBooleans(booleans); - * } - * if ((features & SOUND) == SOUND && mte instanceof IMultiTileMachine) { - * final IMultiTileMachine machine = (IMultiTileMachine) mte; - * machine.setSound(soundEvent, soundEventValue); - * } - * } - * } catch (Exception e) { - * e.printStackTrace(); - * GTMod.GT_FML_LOGGER.error( - * "Exception setting tile entity data for tile entity {} at ({}, {}, {})", - * tTileEntity, - * mX, - * mY, - * mZ); - * } - */ - } - - @Override - public byte getPacketID() { - return GTPacketTypes.MULTI_TILE_ENTITY.id; - } - - public void clearData() { - data.clear(); - } - - public void addData(PacketData data) { - this.data.add(data); - } - - private static boolean containsBit(int toCheck, int bit) { - return (toCheck & (1 << bit)) > 0; - } -} diff --git a/src/main/java/gregtech/api/net/GTPacketTypes.java b/src/main/java/gregtech/api/net/GTPacketTypes.java index 0179fe5c0a2..a29d3da9e4f 100644 --- a/src/main/java/gregtech/api/net/GTPacketTypes.java +++ b/src/main/java/gregtech/api/net/GTPacketTypes.java @@ -25,7 +25,7 @@ public enum GTPacketTypes { UPDATE_ITEM(13, new GTPacketUpdateItem()), SEND_COVER_DATA(16, new GTPacketSendCoverData()), REQUEST_COVER_DATA(17, new GTPacketRequestCoverData()), - MULTI_TILE_ENTITY(18, new GTPacketMultiTileEntity()), + // Free ID 18 SEND_OREGEN_PATTERN(19, new GTPacketSendOregenPattern()), TOOL_SWITCH_MODE(20, new GTPacketToolSwitchMode()), MUSIC_SYSTEM_DATA(21, new GTPacketMusicSystemData()), diff --git a/src/main/java/gregtech/api/net/data/CasingData.java b/src/main/java/gregtech/api/net/data/CasingData.java deleted file mode 100644 index 627c1eacf27..00000000000 --- a/src/main/java/gregtech/api/net/data/CasingData.java +++ /dev/null @@ -1,53 +0,0 @@ -package gregtech.api.net.data; - -import javax.annotation.Nonnull; - -import net.minecraft.util.ChunkCoordinates; - -import com.google.common.io.ByteArrayDataInput; - -import io.netty.buffer.ByteBuf; - -public class CasingData extends PacketData { - - public static final int CASING_DATA_ID = 4; - - private int currentMode; - private int allowedModes; - private ChunkCoordinates controllerCoords; - - public CasingData() {} - - public CasingData(int currentMode, int allowedModes, ChunkCoordinates controllerCoords) { - this.currentMode = currentMode; - this.allowedModes = allowedModes; - this.controllerCoords = controllerCoords; - } - - @Override - public void decode(@Nonnull ByteArrayDataInput in) { - currentMode = in.readInt(); - allowedModes = in.readInt(); - controllerCoords = new ChunkCoordinates(in.readInt(), in.readInt(), in.readInt()); - } - - @Override - public void encode(@Nonnull ByteBuf out) { - out.writeInt(currentMode); - out.writeInt(allowedModes); - out.writeInt(controllerCoords.posX); - out.writeInt(controllerCoords.posY); - out.writeInt(controllerCoords.posZ); - } - - @Override - public int getId() { - return CASING_DATA_ID; - } - - @Override - public void process(MultiTileEntityProcess processData) { - - } - -} diff --git a/src/main/java/gregtech/api/net/data/CommonData.java b/src/main/java/gregtech/api/net/data/CommonData.java deleted file mode 100644 index 294cca134b0..00000000000 --- a/src/main/java/gregtech/api/net/data/CommonData.java +++ /dev/null @@ -1,50 +0,0 @@ -package gregtech.api.net.data; - -import javax.annotation.Nonnull; - -import com.google.common.io.ByteArrayDataInput; - -import io.netty.buffer.ByteBuf; - -public class CommonData extends PacketData { - - public static final int COMMON_DATA_ID = 2; - - private byte redstone; - private byte color; - private byte commonData; - - public CommonData() {} - - public CommonData(byte redstone, byte color, byte commonData) { - this.redstone = redstone; - this.color = color; - this.commonData = commonData; - } - - @Override - public void decode(@Nonnull ByteArrayDataInput in) { - redstone = in.readByte(); - color = in.readByte(); - commonData = in.readByte(); - } - - @Override - public void encode(@Nonnull ByteBuf out) { - out.writeByte(redstone); - out.writeByte(color); - out.writeByte(commonData); - } - - @Override - public int getId() { - return COMMON_DATA_ID; - } - - @Override - public void process(MultiTileEntityProcess processData) { - // TODO Auto-generated method stub - - } - -} diff --git a/src/main/java/gregtech/api/net/data/CoordinateData.java b/src/main/java/gregtech/api/net/data/CoordinateData.java deleted file mode 100644 index ad8ebbd2103..00000000000 --- a/src/main/java/gregtech/api/net/data/CoordinateData.java +++ /dev/null @@ -1,50 +0,0 @@ -package gregtech.api.net.data; - -import javax.annotation.Nonnull; - -import net.minecraft.util.ChunkCoordinates; - -import com.google.common.io.ByteArrayDataInput; - -import io.netty.buffer.ByteBuf; - -public class CoordinateData extends PacketData { - - public final static int COORDINATE_DATA_ID = 0; - - private ChunkCoordinates coords; - - public CoordinateData(ChunkCoordinates coords) { - this.coords = coords; - } - - public CoordinateData(int x, int y, int z) { - this(new ChunkCoordinates(x, y, z)); - } - - public CoordinateData() {} - - @Override - public int getId() { - return COORDINATE_DATA_ID; - } - - @Override - public void encode(@Nonnull ByteBuf out) { - out.writeInt(coords.posX); - out.writeInt(coords.posY); - out.writeInt(coords.posZ); - } - - @Override - public void decode(@Nonnull ByteArrayDataInput in) { - coords = new ChunkCoordinates(in.readInt(), in.readInt(), in.readInt()); - } - - @Override - public void process(MultiTileEntityProcess processData) { - if (coords == null) return; - processData.giveCoordinates(coords); - } - -} diff --git a/src/main/java/gregtech/api/net/data/MultiTileEntityData.java b/src/main/java/gregtech/api/net/data/MultiTileEntityData.java deleted file mode 100644 index 2bdbf4acc9f..00000000000 --- a/src/main/java/gregtech/api/net/data/MultiTileEntityData.java +++ /dev/null @@ -1,45 +0,0 @@ -package gregtech.api.net.data; - -import javax.annotation.Nonnull; - -import com.google.common.io.ByteArrayDataInput; - -import io.netty.buffer.ByteBuf; - -public class MultiTileEntityData extends PacketData { - - public static final int MULTI_TILE_ENTITY_DATA_ID = 1; - - private int registryId; - private int metaId; - - public MultiTileEntityData() {} - - public MultiTileEntityData(int registryId, int metaId) { - this.registryId = registryId; - this.metaId = metaId; - } - - @Override - public int getId() { - return MULTI_TILE_ENTITY_DATA_ID; - } - - @Override - public void encode(@Nonnull ByteBuf out) { - out.writeInt(registryId); - out.writeInt(metaId); - } - - @Override - public void decode(@Nonnull ByteArrayDataInput in) { - registryId = in.readInt(); - metaId = in.readInt(); - } - - @Override - public void process(MultiTileEntityProcess processData) { - processData.giveMultiTileEntityData(registryId, metaId); - } - -} diff --git a/src/main/java/gregtech/api/net/data/MultiTileEntityProcess.java b/src/main/java/gregtech/api/net/data/MultiTileEntityProcess.java deleted file mode 100644 index 02e04981c07..00000000000 --- a/src/main/java/gregtech/api/net/data/MultiTileEntityProcess.java +++ /dev/null @@ -1,54 +0,0 @@ -package gregtech.api.net.data; - -import javax.annotation.Nonnull; - -import net.minecraft.block.Block; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.IBlockAccess; - -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; - -public class MultiTileEntityProcess extends Process { - - @Nonnull - private final IBlockAccess world; - private ChunkCoordinates coords; - private int registryId; - private int metaId; - private byte redstone; - private byte color; - private byte commonData; - - public MultiTileEntityProcess(@Nonnull IBlockAccess world) { - this.world = world; - } - - @Override - public void process() { - if (coords == null) return; - Block block = world.getBlock(coords.posX, coords.posY, coords.posZ); - if (!(block instanceof MultiTileEntityBlock muteBlock)) { - return; - } - IMultiTileEntity mute = muteBlock - .receiveMultiTileEntityData(world, coords.posX, coords.posY, coords.posZ, registryId, metaId); - if (mute == null) return; - mute.setColorization(color); - } - - public void giveCoordinates(@Nonnull ChunkCoordinates coords) { - this.coords = coords; - } - - public void giveMultiTileEntityData(int registryId, int metaId) { - this.registryId = registryId; - this.metaId = metaId; - } - - public void giveCommonData(byte redstone, byte color, byte commonData) { - this.redstone = redstone; - this.color = color; - this.commonData = commonData; - } -} diff --git a/src/main/java/gregtech/api/net/data/PacketData.java b/src/main/java/gregtech/api/net/data/PacketData.java deleted file mode 100644 index bde2b9fb762..00000000000 --- a/src/main/java/gregtech/api/net/data/PacketData.java +++ /dev/null @@ -1,48 +0,0 @@ -package gregtech.api.net.data; - -import javax.annotation.Nonnull; - -import com.google.common.io.ByteArrayDataInput; - -import io.netty.buffer.ByteBuf; - -public abstract class PacketData implements Comparable> { - - /** - * This should return the Id of the packet. The Id is is used to bit-shift to be added a header for the packet its - * used in - */ - public abstract int getId(); - - /** - * Called by the packet it is held by to store the data it needs - */ - public abstract void encode(@Nonnull ByteBuf out); - - /** - * Called by the packet it is held by to decode the data to later be used in {@link #process()} - */ - public abstract void decode(@Nonnull ByteArrayDataInput in); - - /** - * Called by the packet it is held by to process the data it decoded. - */ - public abstract void process(T processData); - - @Override - public boolean equals(Object other) { - if (this == other) return true; - if (!(other instanceof PacketData otherData)) return false; - return this.getId() == otherData.getId(); - } - - @Override - public int hashCode() { - return getId(); - } - - @Override - public int compareTo(PacketData other) { - return Integer.compare(this.getId(), other.getId()); - } -} diff --git a/src/main/java/gregtech/api/net/data/Process.java b/src/main/java/gregtech/api/net/data/Process.java deleted file mode 100644 index d5bc1317b74..00000000000 --- a/src/main/java/gregtech/api/net/data/Process.java +++ /dev/null @@ -1,6 +0,0 @@ -package gregtech.api.net.data; - -public abstract class Process { - - public abstract void process(); -} diff --git a/src/main/java/gregtech/api/util/GTStructureUtility.java b/src/main/java/gregtech/api/util/GTStructureUtility.java index 6e7da9696de..0b6b26dfbdd 100644 --- a/src/main/java/gregtech/api/util/GTStructureUtility.java +++ b/src/main/java/gregtech/api/util/GTStructureUtility.java @@ -4,7 +4,14 @@ import static com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult.ACCEPT_STOP; import static com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult.REJECT; import static com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult.SKIP; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode.EXACT; +import static gregtech.api.enums.Mods.BartWorks; +import static gregtech.api.enums.Mods.Botania; +import static gregtech.api.enums.Mods.IndustrialCraft2; +import static gregtech.api.enums.Mods.Thaumcraft; import java.util.Arrays; import java.util.List; @@ -34,6 +41,7 @@ import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureElement; +import com.gtnewhorizon.structurelib.structure.IStructureElementChain; import com.gtnewhorizon.structurelib.structure.IStructureElementNoPlacement; import com.gtnewhorizon.structurelib.util.ItemStackPredicate; @@ -655,4 +663,25 @@ public static Predicate filterByMTETier(int aMinTier, int aMaxTier) { && ((MTETieredMachineBlock) tile).mTier >= aMinTier; }; } + + /** support all Bart, Botania, Ic2, Thaumcraft glasses for multiblock structure **/ + public static IStructureElementChain chainAllGlasses() { + return ofChain( + // IndustrialCraft2 glass + ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), + + // Botania glass + ofBlockUnlocalizedName(Botania.ID, "manaGlass", 0, false), + ofBlockUnlocalizedName(Botania.ID, "elfGlass", 0, false), + + // BartWorks glass + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), + + // Tinted Industrial Glass + ofBlockAnyMeta(GregTechAPI.sBlockTintedGlass, 0), + + // warded glass + ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false)); + } } diff --git a/src/main/java/gregtech/api/util/GTUtil.java b/src/main/java/gregtech/api/util/GTUtil.java index 0d226e48276..daf4c48bfca 100644 --- a/src/main/java/gregtech/api/util/GTUtil.java +++ b/src/main/java/gregtech/api/util/GTUtil.java @@ -24,7 +24,6 @@ import gregtech.api.interfaces.IDataCopyable; import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import gregtech.common.items.behaviors.BehaviourDataOrb; import gregtech.common.tileentities.machines.IDualInputHatch; @@ -106,7 +105,6 @@ else if (t.getSecond() instanceof NBTBase) nbt.setTag( public static TileEntity getTileEntity(World world, int x, int y, int z, boolean aLoadUnloadedChunks) { if (aLoadUnloadedChunks || world.blockExists(x, y, z)) { TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IMultiTileEntity && ((IMultiTileEntity) tileEntity).isDead()) return null; if (tileEntity != null) return tileEntity; tileEntity = LAST_BROKEN_TILEENTITY.get(); if (tileEntity != null && tileEntity.xCoord == x && tileEntity.yCoord == y && tileEntity.zCoord == z) diff --git a/src/main/java/gregtech/api/util/GT_StructureUtilityMuTE.java b/src/main/java/gregtech/api/util/GT_StructureUtilityMuTE.java deleted file mode 100644 index 9ad3ff1fed6..00000000000 --- a/src/main/java/gregtech/api/util/GT_StructureUtilityMuTE.java +++ /dev/null @@ -1,262 +0,0 @@ -package gregtech.api.util; - -import static gregtech.GTMod.GT_FML_LOGGER; -import static gregtech.api.multitileentity.enums.GT_MultiTileComponentCasing.*; -import static gregtech.api.multitileentity.enums.GT_MultiTileUpgradeCasing.*; -import static gregtech.loaders.preload.GT_Loader_MultiTileEntities.*; - -import java.util.Arrays; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import com.gtnewhorizon.structurelib.StructureLibAPI; -import com.gtnewhorizon.structurelib.structure.IStructureElement; - -import gregtech.api.enums.GTValues; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.TextureSet; -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.enums.GT_MultiTileUpgradeCasing; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.base.Controller; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public class GT_StructureUtilityMuTE { - - public static final MuTEStructureCasing MOTOR_CASINGS = FunctionalCasings.Motor.getCasing(); - public static final MuTEStructureCasing PUMP_CASINGS = FunctionalCasings.Pump.getCasing(); - public static final MuTEStructureCasing CONVEYOR_CASINGS = FunctionalCasings.Conveyor.getCasing(); - public static final MuTEStructureCasing PISTON_CASINGS = FunctionalCasings.Piston.getCasing(); - public static final MuTEStructureCasing ROBOT_ARM_CASINGS = FunctionalCasings.RobotArm.getCasing(); - public static final MuTEStructureCasing EMITTER_CASINGS = FunctionalCasings.Emitter.getCasing(); - public static final MuTEStructureCasing SENSOR_CASINGS = FunctionalCasings.Sensor.getCasing(); - public static final MuTEStructureCasing FIELD_GENERATOR_CASINGS = FunctionalCasings.FieldGenerator.getCasing(); - public static final MuTEStructureCasing INVENTORY_CASINGS = UpgradeCasings.Inventory.getCasing(); - public static final MuTEStructureCasing TANK_CASINGS = UpgradeCasings.Tank.getCasing(); - public static final MuTEStructureCasing AMPERAGE_CASINGS = UpgradeCasings.Amperage.getCasing(); - public static final MuTEStructureCasing LASER_CASINGS = UpgradeCasings.Laser.getCasing(); - public static final MuTEStructureCasing WIRELESS_CASINGS = UpgradeCasings.Wireless.getCasing(); - public static final MuTEStructureCasing CLEANROOM_CASINGS = UpgradeCasings.Cleanroom.getCasing(); - public static final MuTEStructureCasing HEATER_CASINGS = UpgradeCasings.Heater.getCasing(); - public static final MuTEStructureCasing INSULATOR_CASINGS = UpgradeCasings.Insulator.getCasing(); - - public enum FunctionalCasings { - - Motor(COMPONENT_CASING_REGISTRY_NAME, LV_Motor.getId(), MV_Motor.getId(), HV_Motor.getId(), EV_Motor.getId(), - IV_Motor.getId(), LuV_Motor.getId(), ZPM_Motor.getId(), UV_Motor.getId(), UHV_Motor.getId(), - UEV_Motor.getId(), UIV_Motor.getId(), UMV_Motor.getId(), UXV_Motor.getId(), MAX_Motor.getId()), - - Pump(COMPONENT_CASING_REGISTRY_NAME, LV_Pump.getId(), MV_Pump.getId(), HV_Pump.getId(), EV_Pump.getId(), - IV_Pump.getId(), LuV_Pump.getId(), ZPM_Pump.getId(), UV_Pump.getId(), UHV_Pump.getId(), UEV_Pump.getId(), - UIV_Pump.getId(), UMV_Pump.getId(), UXV_Pump.getId(), MAX_Pump.getId()), - - Conveyor(COMPONENT_CASING_REGISTRY_NAME, LV_Conveyor.getId(), MV_Conveyor.getId(), HV_Conveyor.getId(), - EV_Conveyor.getId(), IV_Conveyor.getId(), LuV_Conveyor.getId(), ZPM_Conveyor.getId(), UV_Conveyor.getId(), - UHV_Conveyor.getId(), UEV_Conveyor.getId(), UIV_Conveyor.getId(), UMV_Conveyor.getId(), - UXV_Conveyor.getId(), MAX_Conveyor.getId()), - - Piston(COMPONENT_CASING_REGISTRY_NAME, LV_Piston.getId(), MV_Piston.getId(), HV_Piston.getId(), - EV_Piston.getId(), IV_Piston.getId(), LuV_Piston.getId(), ZPM_Piston.getId(), UV_Piston.getId(), - UHV_Piston.getId(), UEV_Piston.getId(), UIV_Piston.getId(), UMV_Piston.getId(), UXV_Piston.getId(), - MAX_Piston.getId()), - - RobotArm(COMPONENT_CASING_REGISTRY_NAME, LV_RobotArm.getId(), MV_RobotArm.getId(), HV_RobotArm.getId(), - EV_RobotArm.getId(), IV_RobotArm.getId(), LuV_RobotArm.getId(), ZPM_RobotArm.getId(), UV_RobotArm.getId(), - UHV_RobotArm.getId(), UEV_RobotArm.getId(), UIV_RobotArm.getId(), UMV_RobotArm.getId(), - UXV_RobotArm.getId(), MAX_RobotArm.getId()), - - Emitter(COMPONENT_CASING_REGISTRY_NAME, LV_Emitter.getId(), MV_Emitter.getId(), HV_Emitter.getId(), - EV_Emitter.getId(), IV_Emitter.getId(), LuV_Emitter.getId(), ZPM_Emitter.getId(), UV_Emitter.getId(), - UHV_Emitter.getId(), UEV_Emitter.getId(), UIV_Emitter.getId(), UMV_Emitter.getId(), UXV_Emitter.getId(), - MAX_Emitter.getId()), - - Sensor(COMPONENT_CASING_REGISTRY_NAME, LV_Sensor.getId(), MV_Sensor.getId(), HV_Sensor.getId(), - EV_Sensor.getId(), IV_Sensor.getId(), LuV_Sensor.getId(), ZPM_Sensor.getId(), UV_Sensor.getId(), - UHV_Sensor.getId(), UEV_Sensor.getId(), UIV_Sensor.getId(), UMV_Sensor.getId(), UXV_Sensor.getId(), - MAX_Sensor.getId()), - - FieldGenerator(COMPONENT_CASING_REGISTRY_NAME, LV_FieldGenerator.getId(), MV_FieldGenerator.getId(), - HV_FieldGenerator.getId(), EV_FieldGenerator.getId(), IV_FieldGenerator.getId(), LuV_FieldGenerator.getId(), - ZPM_FieldGenerator.getId(), UV_FieldGenerator.getId(), UHV_FieldGenerator.getId(), - UEV_FieldGenerator.getId(), UIV_FieldGenerator.getId(), UMV_FieldGenerator.getId(), - UXV_FieldGenerator.getId(), MAX_FieldGenerator.getId()); - - private final MuTEStructureCasing casing; - - FunctionalCasings(String registryName, Integer... validIds) { - casing = createMuTEStructureCasing(registryName, validIds); - } - - public MuTEStructureCasing getCasing() { - return casing; - } - } - - public enum UpgradeCasings { - - Inventory(UPGRADE_CASING_REGISTRY_NAME, ULV_Inventory.getId(), LV_Inventory.getId(), MV_Inventory.getId(), - HV_Inventory.getId(), EV_Inventory.getId(), IV_Inventory.getId(), LuV_Inventory.getId(), - ZPM_Inventory.getId(), UV_Inventory.getId(), UHV_Inventory.getId(), UEV_Inventory.getId(), - UIV_Inventory.getId(), UMV_Inventory.getId(), UXV_Inventory.getId(), MAX_Inventory.getId()), - - Tank(UPGRADE_CASING_REGISTRY_NAME, ULV_Tank.getId(), LV_Tank.getId(), MV_Tank.getId(), HV_Tank.getId(), - EV_Tank.getId(), IV_Tank.getId(), LuV_Tank.getId(), ZPM_Tank.getId(), UV_Tank.getId(), UHV_Tank.getId(), - UEV_Tank.getId(), UIV_Tank.getId(), UMV_Tank.getId(), UXV_Tank.getId(), MAX_Tank.getId()), - - Amperage(UPGRADE_CASING_REGISTRY_NAME, Amp_4.getId(), Amp_16.getId(), Amp_64.getId(), Amp_256.getId(), - Amp_1_024.getId(), Amp_4_096.getId(), Amp_16_384.getId(), Amp_65_536.getId(), Amp_262_144.getId(), - Amp_1_048_576.getId()), - - Laser(UPGRADE_CASING_REGISTRY_NAME, GT_MultiTileUpgradeCasing.Laser.getId()), - - Wireless(UPGRADE_CASING_REGISTRY_NAME, GT_MultiTileUpgradeCasing.Wireless.getId()), - - Cleanroom(UPGRADE_CASING_REGISTRY_NAME, GT_MultiTileUpgradeCasing.Cleanroom.getId()), - - Heater(UPGRADE_CASING_REGISTRY_NAME, Heater_Prototype.getId(), Heater_IndustrialGrade.getId(), - Heater_NextGen.getId(), Heater_Omnipotent.getId(), Heater_OmegaType.getId()), - - Insulator(UPGRADE_CASING_REGISTRY_NAME, Insulator_Prototype.getId(), Insulator_IndustrialGrade.getId(), - Insulator_NextGen.getId(), Insulator_Omnipotent.getId(), Insulator_OmegaType.getId()); - - private final MuTEStructureCasing casing; - - UpgradeCasings(String registryName, Integer... validIds) { - casing = createMuTEStructureCasing(registryName, validIds); - } - - public MuTEStructureCasing getCasing() { - return casing; - } - } - - /** - * Specify all casing sets that are valid for a multiblock structure position. The first casing will be used as - * default when doing auto place - * - * @param modes Allowed modes on the casings - * @param validCasings Allowed casing sets - * @return Structure Element - * @param Multiblock class - */ - public static IStructureElement ofMuTECasings(int modes, MuTEStructureCasing... validCasings) { - if (validCasings == null || validCasings.length == 0) { - throw new IllegalArgumentException(); - } - return new IStructureElement<>() { - - final MuTEStructureCasing[] allowedCasings = validCasings; - private final static short[] DEFAULT = new short[] { 255, 255, 255, 0 }; - private static IIcon[] mIcons = null; - - @Override - public boolean check(T t, World world, int x, int y, int z) { - final TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!(tileEntity instanceof MultiBlockPart part)) return false; - - for (MuTEStructureCasing casing : allowedCasings) { - if (casing.isCasingValid(part.getMultiTileEntityRegistryID(), part.getMultiTileEntityID())) { - final IMultiBlockController tTarget = part.getTarget(false); - if (tTarget != null && tTarget != t) return false; - - part.setTarget((IMultiBlockController) t, modes); - - ((Controller) t).registerSpecialCasings(part); - return true; - } - } - - return false; - } - - @Override - public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { - // Moved here from Controller. TODO: Proper implementation - if (mIcons == null) { - mIcons = new IIcon[6]; - Arrays.fill(mIcons, TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex].getIcon()); - } - StructureLibAPI.hintParticleTinted(world, x, y, z, mIcons, DEFAULT); - return true; - } - - @Override - public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { - final int registryID = validCasings[0].getRegistryId(); - final MultiTileEntityRegistry registry = MultiTileEntityRegistry.getRegistry(registryID); - if (registry == null) { - GT_FML_LOGGER.error("NULL REGISTRY"); - return false; - } - final MultiTileEntityBlock block = registry.getBlock(); - if (world.setBlock(x, y, z, block, allowedCasings[0].getDefaultMeta(), 2)) { - final TileEntity te = world.getTileEntity(x, y, z); - if (!(te instanceof MultiBlockPart)) { - throw new IllegalStateException("TE is not an MultiBlockPart"); - } - ((MultiBlockPart) te).setTarget((IMultiBlockController) t, modes); - - ((Controller) t).registerSpecialCasings((MultiBlockPart) te); - } - - return false; - } - }; - } - - public static MuTEStructureCasing createMuTEStructureCasing(String registryName, Integer... validIds) { - return new MuTEStructureCasing(registryName, validIds); - } - - /** - * Object used to store a set of casings (e.g. all motor casings) - */ - public static class MuTEStructureCasing { - - private final String registryName; - private int registryId = GTValues.W; - private final int defaultMeta; - private final Integer[] validIds; - - public MuTEStructureCasing(String registryName, Integer... validIds) { - final MultiTileEntityRegistry registry = MultiTileEntityRegistry.getRegistry(registryName); - if (validIds == null || validIds.length == 0 || registry == null) { - throw new IllegalArgumentException(); - } - this.registryName = registryName; - this.validIds = validIds; - this.defaultMeta = validIds[0]; - } - - public boolean isCasingValid(int registryId, int id) { - if (getRegistryId() != registryId) { - return false; - } - for (Integer validId : validIds) { - if (validId == id) { - return true; - } - } - return false; - } - - public int getDefaultMeta() { - return defaultMeta; - } - - public int getRegistryId() { - // TODO: MuTE registry seems to somehow shift, probably due to NBT shenanigans. Lazy init circumvents this - // but it should be properly fixed in the future - if (registryId == GTValues.W) { - MultiTileEntityRegistry registry = MultiTileEntityRegistry.getRegistry(registryName); - registryId = Block.getIdFromBlock(registry.getBlock()); - } - return registryId; - } - } -} diff --git a/src/main/java/gregtech/client/GTSoundLoop.java b/src/main/java/gregtech/client/GTSoundLoop.java index 23569a83e40..6ddb241d464 100644 --- a/src/main/java/gregtech/client/GTSoundLoop.java +++ b/src/main/java/gregtech/client/GTSoundLoop.java @@ -9,7 +9,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.multitileentity.machine.MultiTileBasicMachine; @SideOnly(Side.CLIENT) public class GTSoundLoop extends MovingSound { @@ -33,19 +32,6 @@ public GTSoundLoop(ResourceLocation p_i45104_1_, IGregTechTileEntity base, boole volume = VOLUME_RAMP; } - public GTSoundLoop(ResourceLocation sound, MultiTileBasicMachine base, boolean stopWhenActive, - boolean stopWhenInactive) { - super(sound); - this.whileActive = stopWhenActive; - this.whileInactive = stopWhenInactive; - xPosF = base.getXCoord(); - yPosF = base.getYCoord(); - zPosF = base.getZCoord(); - worldID = base.getWorld().provider.dimensionId; - repeat = true; - volume = VOLUME_RAMP; - } - @Override public void update() { if (donePlaying) { @@ -70,11 +56,6 @@ public void update() { return; } - if ((tile instanceof MultiTileBasicMachine)) { - fadeMe |= ((MultiTileBasicMachine) tile).isActive() ? whileActive : whileInactive; - return; - } - donePlaying = true; } } diff --git a/src/main/java/gregtech/common/GTClient.java b/src/main/java/gregtech/common/GTClient.java index ab139273ee1..91f76a0c4db 100644 --- a/src/main/java/gregtech/common/GTClient.java +++ b/src/main/java/gregtech/common/GTClient.java @@ -74,7 +74,6 @@ import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.metatileentity.implementations.MTEBasicMachine; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; import gregtech.api.net.GTPacketClientPreference; import gregtech.api.objects.GTItemStack; import gregtech.api.recipe.RecipeCategory; @@ -102,7 +101,6 @@ import gregtech.common.render.GTRendererBlock; import gregtech.common.render.LaserRenderer; import gregtech.common.render.MetaGeneratedToolRenderer; -import gregtech.common.render.MultiTileRenderer; import gregtech.common.render.WormholeRenderer; import gregtech.common.render.items.DataStickRenderer; import gregtech.common.render.items.InfiniteSprayCanRenderer; @@ -632,7 +630,6 @@ public void onPreLoad() { public void onLoad() { super.onLoad(); GTRendererBlock.register(); - new MultiTileRenderer(); new DroneRender(); new LaserRenderer(); new WormholeRenderer(); @@ -828,8 +825,7 @@ public void onDrawBlockHighlight(DrawBlockHighlightEvent aEvent) { if (GTUtility.isStackInList(aEvent.currentItem, GregTechAPI.sWireCutterList) || GTUtility.isStackInList(aEvent.currentItem, GregTechAPI.sSolderingToolList) - || (GTUtility.isStackInList(aEvent.currentItem, GregTechAPI.sSoftHammerList) - && aTileEntity instanceof MultiBlockPart) && aEvent.player.isSneaking()) { + && aEvent.player.isSneaking()) { if (((ICoverable) aTileEntity).getCoverIDAtSide(ForgeDirection.getOrientation(aEvent.target.sideHit)) == 0) drawGrid(aEvent, false, false, aEvent.player.isSneaking()); return; diff --git a/src/main/java/gregtech/common/GTProxy.java b/src/main/java/gregtech/common/GTProxy.java index d95d29fe76a..04b714d48e1 100644 --- a/src/main/java/gregtech/common/GTProxy.java +++ b/src/main/java/gregtech/common/GTProxy.java @@ -538,7 +538,7 @@ public abstract class GTProxy implements IGTMod, IFuelHandler { public boolean mAxeWhenAdventure = true; public boolean mSurvivalIntoAdventure = false; public boolean mNerfedWoodPlank = true; - public boolean mNerfedVanillaTools = true; + public boolean mChangeWoodenVanillaTools = true; public boolean mHungerEffect = true; public boolean mIgnoreTcon = true; public boolean mAchievements = true; diff --git a/src/main/java/gregtech/common/config/Gregtech.java b/src/main/java/gregtech/common/config/Gregtech.java index 63a1057e960..c9aeb841ad6 100644 --- a/src/main/java/gregtech/common/config/Gregtech.java +++ b/src/main/java/gregtech/common/config/Gregtech.java @@ -238,10 +238,10 @@ public static class General { @Config.RequiresMcRestart public boolean nerfedWoodPlank; - @Config.Comment("if true, reduces the durability of the vanilla tools.") + @Config.Comment("if true, change the default durability of wooden vanilla tools to 64 and increase speed to match stone") @Config.DefaultBoolean(true) @Config.RequiresMcRestart - public boolean nerfedVanillaTools; + public boolean changedWoodenVanillaTools; @Config.Comment("if true, enables GT5U achievements.") @Config.DefaultBoolean(true) @@ -529,11 +529,6 @@ public static class Machines { @Config.DefaultBoolean(true) @Config.RequiresMcRestart public boolean useMachineMetal; - - @Config.Comment("if true, enables MuTEs(multitile entities) to be added to the game. MuTEs are in the start of development and its not recommended to enable them unless you know what you are doing. (always activated in dev env)") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public boolean enableMultiTileEntities; } @Config.LangKey("GT5U.gui.config.gregtech.ore_drop_behavior") diff --git a/src/main/java/gregtech/common/items/flinttools/FlintAxe.java b/src/main/java/gregtech/common/items/flinttools/FlintAxe.java deleted file mode 100644 index 207165ef60c..00000000000 --- a/src/main/java/gregtech/common/items/flinttools/FlintAxe.java +++ /dev/null @@ -1,30 +0,0 @@ -package gregtech.common.items.flinttools; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.item.Item; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemStack; - -public class FlintAxe extends ItemAxe { - - public FlintAxe() { - super(FlintTools.FLINT_MATERIAL); - this.setUnlocalizedName("flintAxe"); - this.setTextureName("gregtech:tools/flintAxe"); - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List subItems) { - // Create the default sword item - ItemStack flintTool = new ItemStack(this); - - // Enchant the sword with Fire Aspect I - flintTool.addEnchantment(Enchantment.fireAspect, 1); - - // Add the enchanted sword to the creative tab and NEI - subItems.add(flintTool); - } -} diff --git a/src/main/java/gregtech/common/items/flinttools/FlintHoe.java b/src/main/java/gregtech/common/items/flinttools/FlintHoe.java deleted file mode 100644 index 7e0e1ddc1dd..00000000000 --- a/src/main/java/gregtech/common/items/flinttools/FlintHoe.java +++ /dev/null @@ -1,12 +0,0 @@ -package gregtech.common.items.flinttools; - -import net.minecraft.item.ItemHoe; - -public class FlintHoe extends ItemHoe { - - public FlintHoe() { - super(FlintTools.FLINT_MATERIAL); - this.setUnlocalizedName("flintHoe"); - this.setTextureName("gregtech:tools/flintHoe"); - } -} diff --git a/src/main/java/gregtech/common/items/flinttools/FlintPickaxe.java b/src/main/java/gregtech/common/items/flinttools/FlintPickaxe.java deleted file mode 100644 index eb090652611..00000000000 --- a/src/main/java/gregtech/common/items/flinttools/FlintPickaxe.java +++ /dev/null @@ -1,12 +0,0 @@ -package gregtech.common.items.flinttools; - -import net.minecraft.item.ItemPickaxe; - -public class FlintPickaxe extends ItemPickaxe { - - public FlintPickaxe() { - super(FlintTools.FLINT_MATERIAL); - this.setUnlocalizedName("flintPickaxe"); - this.setTextureName("gregtech:tools/flintPickaxe"); - } -} diff --git a/src/main/java/gregtech/common/items/flinttools/FlintShovel.java b/src/main/java/gregtech/common/items/flinttools/FlintShovel.java deleted file mode 100644 index 708b055f017..00000000000 --- a/src/main/java/gregtech/common/items/flinttools/FlintShovel.java +++ /dev/null @@ -1,12 +0,0 @@ -package gregtech.common.items.flinttools; - -import net.minecraft.item.ItemSpade; - -public class FlintShovel extends ItemSpade { - - public FlintShovel() { - super(FlintTools.FLINT_MATERIAL); - this.setUnlocalizedName("flintShovel"); - this.setTextureName("gregtech:tools/flintShovel"); - } -} diff --git a/src/main/java/gregtech/common/items/flinttools/FlintSword.java b/src/main/java/gregtech/common/items/flinttools/FlintSword.java deleted file mode 100644 index 0dc482cf556..00000000000 --- a/src/main/java/gregtech/common/items/flinttools/FlintSword.java +++ /dev/null @@ -1,30 +0,0 @@ -package gregtech.common.items.flinttools; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; - -public class FlintSword extends ItemSword { - - public FlintSword() { - super(FlintTools.FLINT_MATERIAL); - this.setUnlocalizedName("flintSword"); - this.setTextureName("gregtech:tools/flintSword"); - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List subItems) { - // Create the default sword item - ItemStack flintTool = new ItemStack(this); - - // Enchant the sword with Fire Aspect I - flintTool.addEnchantment(Enchantment.fireAspect, 1); - - // Add the enchanted sword to the creative tab and NEI - subItems.add(flintTool); - } -} diff --git a/src/main/java/gregtech/common/items/flinttools/FlintTools.java b/src/main/java/gregtech/common/items/flinttools/FlintTools.java deleted file mode 100644 index f883ef05a84..00000000000 --- a/src/main/java/gregtech/common/items/flinttools/FlintTools.java +++ /dev/null @@ -1,181 +0,0 @@ -package gregtech.common.items.flinttools; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.init.Items; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.oredict.ShapedOreRecipe; - -import org.jetbrains.annotations.NotNull; - -import com.gtnewhorizons.postea.api.ItemStackReplacementManager; - -import cpw.mods.fml.common.registry.GameRegistry; - -public class FlintTools { - - public static Item.ToolMaterial FLINT_MATERIAL = EnumHelper.addToolMaterial("FLINT", 1, 128, 4.0F, 1.0F, 5); - - public static Item AXE; - public static Item SWORD; - public static Item PICKAXE; - public static Item SHOVEL; - public static Item HOE; - - public static void registerTools() { - // Create items. - AXE = new FlintAxe(); - SWORD = new FlintSword(); - PICKAXE = new FlintPickaxe(); - SHOVEL = new FlintShovel(); - HOE = new FlintHoe(); - - // Register them with minecraft. - GameRegistry.registerItem(AXE, "flintAxe"); - GameRegistry.registerItem(SWORD, "flintSword"); - GameRegistry.registerItem(PICKAXE, "flintPickaxe"); - GameRegistry.registerItem(SHOVEL, "flintShovel"); - GameRegistry.registerItem(HOE, "flintHoe"); - } - - public static void registerRecipes() { - // Flint Sword Recipe, with - GameRegistry.addRecipe( - new EnchantedRecipe( - new ItemStack(FlintTools.SWORD), - " F ", - " F ", - " S ", - 'F', - Items.flint, - 'S', - Items.stick)); - - // Flint Pickaxe Recipe - GameRegistry - .addRecipe(new ItemStack(FlintTools.PICKAXE), "FFF", " S ", " S ", 'F', Items.flint, 'S', Items.stick); - - // Flint Axe Recipe with Fire Aspect I - GameRegistry.addRecipe( - new EnchantedRecipe( - new ItemStack(FlintTools.AXE), - "FF ", - "FS ", - " S ", - 'F', - Items.flint, - 'S', - Items.stick)); - - GameRegistry.addRecipe( - new EnchantedRecipe( - new ItemStack(FlintTools.AXE), - " FF", - " SF", - " S ", - 'F', - Items.flint, - 'S', - Items.stick)); - - // Flint Shovel Recipe - GameRegistry - .addRecipe(new ItemStack(FlintTools.SHOVEL), " F ", " S ", " S ", 'F', Items.flint, 'S', Items.stick); - - // Flint Hoe Recipe - GameRegistry.addRecipe(new ItemStack(FlintTools.HOE), "FF ", " S ", " S ", 'F', Items.flint, 'S', Items.stick); - - GameRegistry.addRecipe(new ItemStack(FlintTools.HOE), " FF", " S ", " S ", 'F', Items.flint, 'S', Items.stick); - } - - public static NBTTagCompound transformFlintTool(NBTTagCompound tagCompound) { - int oldId = tagCompound.getShort("Damage"); - int id; - boolean fireAspect = false; - - switch (oldId) { - case 0: - id = Item.getIdFromItem(FlintTools.SWORD); - fireAspect = true; - break; - case 2: - id = Item.getIdFromItem(FlintTools.PICKAXE); - break; - case 4: - id = Item.getIdFromItem(FlintTools.SHOVEL); - break; - case 6: - id = Item.getIdFromItem(FlintTools.AXE); - fireAspect = true; - break; - case 8: - id = Item.getIdFromItem(FlintTools.HOE); - break; - case 40: // Sense tool - id = 0; - break; - default: - return tagCompound; // No transform needed. - } - - tagCompound.setShort("id", (short) id); - tagCompound.setShort("Damage", (short) 0); - tagCompound.setTag("tag", new NBTTagCompound()); // Erase old GT data. - - // Apply Fire Aspect enchantment if fireAspect is true - if (fireAspect) { - NBTTagCompound enchantTag = getEnchantedTagCompound(); - - // Attach the new tag containing the enchantments to the tool - tagCompound.setTag("tag", enchantTag); - } - - return tagCompound; - } - - @NotNull - private static NBTTagCompound getEnchantedTagCompound() { - NBTTagCompound enchantTag = new NBTTagCompound(); - NBTTagList enchantments = new NBTTagList(); - - // Add Fire Aspect enchantment - NBTTagCompound fireAspectTag = new NBTTagCompound(); - fireAspectTag.setShort("id", (short) Enchantment.fireAspect.effectId); // Fire Aspect ID - fireAspectTag.setShort("lvl", (short) 1); // Level 1 - enchantments.appendTag(fireAspectTag); - - // Attach enchantments list to the "tag" NBTTagCompound - enchantTag.setTag("ench", enchantments); - return enchantTag; - } - - public static void registerPosteaTransformations() { - ItemStackReplacementManager.addItemReplacement("gregtech:gt.metatool.01", FlintTools::transformFlintTool); - } - - private static class EnchantedRecipe extends ShapedOreRecipe { - - private final ItemStack result; - - public EnchantedRecipe(ItemStack result, Object... recipe) { - super(result, recipe); - this.result = result; - } - - @Override - public ItemStack getCraftingResult(InventoryCrafting inventory) { - ItemStack craftedItem = result.copy(); - craftedItem.addEnchantment(Enchantment.fireAspect, 1); // Add Fire Aspect I - return craftedItem; - } - - @Override - public ItemStack getRecipeOutput() { - return result; - } - } -} diff --git a/src/main/java/gregtech/common/render/MultiTileBasicRender.java b/src/main/java/gregtech/common/render/MultiTileBasicRender.java deleted file mode 100644 index be41739401a..00000000000 --- a/src/main/java/gregtech/common/render/MultiTileBasicRender.java +++ /dev/null @@ -1,10 +0,0 @@ -package gregtech.common.render; - -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.interfaces.ITexture; - -public interface MultiTileBasicRender { - - ITexture getTexture(ForgeDirection side); -} diff --git a/src/main/java/gregtech/common/render/MultiTileRenderer.java b/src/main/java/gregtech/common/render/MultiTileRenderer.java deleted file mode 100644 index 8dca8c3c332..00000000000 --- a/src/main/java/gregtech/common/render/MultiTileRenderer.java +++ /dev/null @@ -1,179 +0,0 @@ -package gregtech.common.render; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.util.ForgeDirection; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import gregtech.GTMod; -import gregtech.api.interfaces.ITexture; -import gregtech.api.logic.ModelRenderLogic; -import gregtech.api.logic.interfaces.ModelRenderLogicHost; -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.MultiTileEntityClassContainer; -import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; - -public class MultiTileRenderer implements ISimpleBlockRenderingHandler { - - private final int renderID; - public static MultiTileRenderer INSTANCE; - - public MultiTileRenderer() { - this.renderID = RenderingRegistry.getNextAvailableRenderId(); - INSTANCE = this; - RenderingRegistry.registerBlockHandler(this); - } - - @Override - public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { - if (!(block instanceof MultiTileEntityBlock muteBlock)) { - return; - } - - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - - final MultiTileEntityRegistry registry = muteBlock.getRegistry(); - if (registry == null) return; - final MultiTileEntityClassContainer classContainer = registry.getClassContainer(metadata); - if (classContainer == null) return; - renderer.setRenderBoundsFromBlock(muteBlock); - - for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - final ITexture texture = classContainer.getReferenceTileEntity() - .getTexture(side); - if (texture == null) continue; - switch (side) { - case DOWN -> renderYNegative(null, renderer, 0, 0, 0, block, texture, side); - case UP -> renderYPositive(null, renderer, 0, 0, 0, block, texture, side); - case WEST -> renderXNegative(null, renderer, 0, 0, 0, block, texture, side); - case EAST -> renderXPositive(null, renderer, 0, 0, 0, block, texture, side); - case NORTH -> renderZNegative(null, renderer, 0, 0, 0, block, texture, side); - case SOUTH -> renderZPositive(null, renderer, 0, 0, 0, block, texture, side); - default -> { - // Do nothing - } - } - } - - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - - @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, - RenderBlocks renderer) { - final TileEntity entity = world.getTileEntity(x, y, z); - if (entity == null) { - return false; - } - - renderer.enableAO = Minecraft.isAmbientOcclusionEnabled() && GTMod.gregtechproxy.mRenderTileAmbientOcclusion; - renderer.useInventoryTint = false; - - if (entity instanceof ModelRenderLogicHost modelEntity && modelEntity.shouldRenderModel()) { - ModelRenderLogic renderLogic = modelEntity.getRenderLogic(); - return true; - } - - if (!(entity instanceof MultiTileBasicRender renderedEntity)) { - return false; - } - - if (entity instanceof MultiBlockPart) { - final IMultiBlockController controller = ((MultiBlockPart) entity).getTarget(false); - if (controller instanceof ModelRenderLogicHost && ((ModelRenderLogicHost) controller).shouldRenderModel()) { - return false; - } - } - - for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - final ITexture texture = renderedEntity.getTexture(side); - if (texture == null) continue; - switch (side) { - case DOWN -> renderYNegative(world, renderer, x, y, z, block, texture, side); - case UP -> renderYPositive(world, renderer, x, y, z, block, texture, side); - case WEST -> renderXNegative(world, renderer, x, y, z, block, texture, side); - case EAST -> renderXPositive(world, renderer, x, y, z, block, texture, side); - case NORTH -> renderZNegative(world, renderer, x, y, z, block, texture, side); - case SOUTH -> renderZPositive(world, renderer, x, y, z, block, texture, side); - default -> { - // Do nothing - } - } - } - return true; - } - - @Override - public boolean shouldRender3DInInventory(int modelId) { - return true; - } - - @Override - public int getRenderId() { - return renderID; - } - - private static void renderYNegative(IBlockAccess world, RenderBlocks renderer, int x, int y, int z, Block block, - ITexture texture, ForgeDirection side) { - if (world != null) { - if (!block.shouldSideBeRendered(world, x, y - 1, z, side.ordinal())) return; - Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x, y - 1, z)); - } - texture.renderYNeg(renderer, block, x, y, z); - } - - private static void renderZNegative(IBlockAccess world, RenderBlocks renderer, int x, int y, int z, Block block, - ITexture texture, ForgeDirection side) { - if (world != null) { - if (!block.shouldSideBeRendered(world, x, y, z - 1, side.ordinal())) return; - Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z - 1)); - } - texture.renderZNeg(renderer, block, x, y, z); - } - - private static void renderXNegative(IBlockAccess world, RenderBlocks renderer, int x, int y, int z, Block block, - ITexture texture, ForgeDirection side) { - if (world != null) { - if (!block.shouldSideBeRendered(world, x - 1, y, z, side.ordinal())) return; - Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x - 1, y, z)); - } - texture.renderXNeg(renderer, block, x, y, z); - } - - private static void renderYPositive(IBlockAccess world, RenderBlocks renderer, int x, int y, int z, Block block, - ITexture texture, ForgeDirection side) { - if (world != null) { - if (!block.shouldSideBeRendered(world, x, y + 1, z, side.ordinal())) return; - Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x, y + 1, z)); - } - texture.renderYPos(renderer, block, x, y, z); - } - - private static void renderXPositive(IBlockAccess world, RenderBlocks renderer, int x, int y, int z, Block block, - ITexture texture, ForgeDirection side) { - if (world != null) { - if (!block.shouldSideBeRendered(world, x + 1, y, z, side.ordinal())) return; - Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x + 1, y, z)); - } - texture.renderXPos(renderer, block, x, y, z); - } - - private static void renderZPositive(IBlockAccess world, RenderBlocks renderer, int x, int y, int z, Block block, - ITexture texture, ForgeDirection side) { - if (world != null) { - if (!block.shouldSideBeRendered(world, x, y, z + 1, side.ordinal())) return; - Tessellator.instance.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z + 1)); - } - texture.renderZPos(renderer, block, x, y, z); - } -} diff --git a/src/main/java/gregtech/common/tileentities/automation/MTERecipeFilter.java b/src/main/java/gregtech/common/tileentities/automation/MTERecipeFilter.java index 24b57153af5..86380fdadf3 100644 --- a/src/main/java/gregtech/common/tileentities/automation/MTERecipeFilter.java +++ b/src/main/java/gregtech/common/tileentities/automation/MTERecipeFilter.java @@ -14,7 +14,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.PacketBuffer; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.Constants; @@ -35,12 +34,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.RecipeMapWorkable; import gregtech.api.metatileentity.implementations.MTESpecialFilter; -import gregtech.api.multitileentity.MultiTileEntityItem; import gregtech.api.recipe.RecipeMap; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.common.blocks.ItemMachines; -import gregtech.loaders.preload.GT_Loader_MultiTileEntities; public class MTERecipeFilter extends MTESpecialFilter { @@ -74,8 +71,6 @@ private static RecipeMap getItemStackMachineRecipeMap(ItemStack stack) { IMetaTileEntity metaTileEntity = ItemMachines.getMetaTileEntity(stack); if (metaTileEntity != null) { return getMetaTileEntityRecipeMap(metaTileEntity); - } else if (stack.getItem() instanceof MultiTileEntityItem) { - return getMuTeRecipeMap(stack); } } return null; @@ -88,14 +83,6 @@ private static RecipeMap getMetaTileEntityRecipeMap(IMetaTileEntity metaTileE return null; } - private static RecipeMap getMuTeRecipeMap(@NotNull ItemStack stack) { - final TileEntity tileEntity = GT_Loader_MultiTileEntities.MACHINE_REGISTRY.getReferenceTileEntity(stack); - if (tileEntity instanceof RecipeMapWorkable recipeMapWorkable) { - return recipeMapWorkable.getRecipeMap(); - } - return null; - } - private static List getFilteredMachines(RecipeMap recipeMap) { return RecipeCatalysts.getRecipeCatalysts( recipeMap.getFrontend() diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/Conveyor.java b/src/main/java/gregtech/common/tileentities/casings/functional/Conveyor.java deleted file mode 100644 index 31dea4cf386..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/Conveyor.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class Conveyor extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.conveyor"; - } - - @Override - public float getPartModifier() { - return 1.1f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/Emitter.java b/src/main/java/gregtech/common/tileentities/casings/functional/Emitter.java deleted file mode 100644 index cce660ace47..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/Emitter.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class Emitter extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.emitter"; - } - - @Override - public float getPartModifier() { - return 1.3f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/FieldGenerator.java b/src/main/java/gregtech/common/tileentities/casings/functional/FieldGenerator.java deleted file mode 100644 index 3787d45af8d..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/FieldGenerator.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class FieldGenerator extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.field.generator"; - } - - @Override - public float getPartModifier() { - return 2f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/Motor.java b/src/main/java/gregtech/common/tileentities/casings/functional/Motor.java deleted file mode 100644 index cddb293cc2f..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/Motor.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class Motor extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.motor"; - } - - @Override - public float getPartModifier() { - return 1; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/Piston.java b/src/main/java/gregtech/common/tileentities/casings/functional/Piston.java deleted file mode 100644 index 2255fbf8a26..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/Piston.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class Piston extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.piston"; - } - - @Override - public float getPartModifier() { - return 1.1f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/Pump.java b/src/main/java/gregtech/common/tileentities/casings/functional/Pump.java deleted file mode 100644 index 3acddbe9dc2..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/Pump.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class Pump extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.pump"; - } - - @Override - public float getPartModifier() { - return 1.1f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/RobotArm.java b/src/main/java/gregtech/common/tileentities/casings/functional/RobotArm.java deleted file mode 100644 index 2273705397a..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/RobotArm.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class RobotArm extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.robot.arm"; - } - - @Override - public float getPartModifier() { - return 1.5f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/functional/Sensor.java b/src/main/java/gregtech/common/tileentities/casings/functional/Sensor.java deleted file mode 100644 index e88060e9028..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/functional/Sensor.java +++ /dev/null @@ -1,16 +0,0 @@ -package gregtech.common.tileentities.casings.functional; - -import gregtech.api.multitileentity.multiblock.casing.FunctionalCasing; - -public class Sensor extends FunctionalCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.sensor"; - } - - @Override - public float getPartModifier() { - return 1.3f; - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Ampere.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Ampere.java deleted file mode 100644 index 9d05d1cd6f5..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Ampere.java +++ /dev/null @@ -1,47 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.GTValues; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; -import gregtech.api.util.GTUtility; - -public class Ampere extends UpgradeCasing { - - private long amperage; - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.amperage"; - } - - @Override - public void readMultiTileNBT(NBTTagCompound aNBT) { - super.readMultiTileNBT(aNBT); - amperage = aNBT.getInteger(GTValues.NBT.UPGRADE_AMPERAGE); - } - - @Override - protected void customWork(IMultiBlockController target) { - target.setMaxAmperage(amperage); - } - - @Override - public boolean onBlockBroken() { - final IMultiBlockController controller = getTarget(false); - if (controller != null) { - controller.setMaxAmperage(2); - } - return super.onBlockBroken(); - } - - @Override - public void addToolTips(List list, ItemStack stack, boolean f3_h) { - super.addToolTips(list, stack, f3_h); - list.add("Increases allowed amperage to " + GTUtility.formatNumbers(amperage)); - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Cleanroom.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Cleanroom.java deleted file mode 100644 index 224b74a993b..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Cleanroom.java +++ /dev/null @@ -1,26 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; - -public class Cleanroom extends UpgradeCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.cleanroom"; - } - - @Override - protected void customWork(IMultiBlockController target) { - target.setCleanroom(true); - } - - @Override - public boolean onBlockBroken() { - final IMultiBlockController controller = getTarget(false); - if (controller != null) { - controller.setCleanroom(false); - } - return super.onBlockBroken(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Heater.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Heater.java deleted file mode 100644 index 6d8bd81d0fc..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Heater.java +++ /dev/null @@ -1,21 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.interfaces.UpgradableModularMuTE; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; -import gregtech.api.util.GT_StructureUtilityMuTE.UpgradeCasings; - -public class Heater extends UpgradeCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.modular.heater"; - } - - @Override - protected void customWork(IMultiBlockController target) { - if (target instanceof UpgradableModularMuTE upgradable) { - upgradable.increaseMucCount(UpgradeCasings.Heater, this.tier); - } - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Insulator.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Insulator.java deleted file mode 100644 index 6cb0b630d69..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Insulator.java +++ /dev/null @@ -1,22 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.interfaces.UpgradableModularMuTE; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; -import gregtech.api.util.GT_StructureUtilityMuTE.UpgradeCasings; - -public class Insulator extends UpgradeCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.modular.insulator"; - } - - @Override - protected void customWork(IMultiBlockController target) { - if (target instanceof UpgradableModularMuTE upgradable) { - upgradable.increaseMucCount(UpgradeCasings.Insulator, this.tier); - } - } - -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Inventory.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Inventory.java deleted file mode 100644 index 26f26604bfb..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Inventory.java +++ /dev/null @@ -1,123 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import java.util.List; -import java.util.UUID; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; - -import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; -import com.gtnewhorizons.modularui.api.screen.UIBuildContext; -import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; - -import gregtech.api.enums.GTValues.NBT; -import gregtech.api.enums.InventoryType; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; - -public class Inventory extends UpgradeCasing { - - public UUID inventoryID; - - private String inventoryName = "inventory"; - private int inventorySize; - private final InventoryType type = InventoryType.Both; - - public String getCustomInventoryName() { - return inventoryName; - } - - public String getInventoryID() { - return inventoryID != null ? inventoryID.toString() : ""; - } - - public void setInventoryName(String aInventoryName) { - inventoryName = aInventoryName; - } - - public InventoryType getType() { - return type; - } - - @Override - protected void customWork(IMultiBlockController target) { - int invSize = inventorySize; - if (type == InventoryType.Both) { - invSize /= 2; - } - target.registerItemInventory(invSize, tier, type, true); - if (isServerSide()) { - issueClientUpdate(); - } - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.inventory"; - } - - @Override - public void readMultiTileNBT(NBTTagCompound nbt) { - super.readMultiTileNBT(nbt); - if (nbt.hasKey(NBT.UPGRADE_INVENTORY_NAME)) { - inventoryName = nbt.getString(NBT.UPGRADE_INVENTORY_NAME); - } else { - inventoryName = "inventory"; - } - inventorySize = nbt.getInteger(NBT.UPGRADE_INVENTORY_SIZE); - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - super.writeMultiTileNBT(nbt); - if (inventoryID != null) nbt.setString(NBT.UPGRADE_INVENTORY_UUID, inventoryID.toString()); - if (inventoryName != null) nbt.setString(NBT.UPGRADE_INVENTORY_NAME, inventoryName); - } - - @Override - public boolean onBlockBroken() { - final IMultiBlockController controller = getTarget(false); - if (controller != null && inventoryID != null) { - controller.unregisterItemInventory(inventoryID, type); - } - return super.onBlockBroken(); - } - - @Override - public boolean hasGui(ForgeDirection side) { - return true; - } - - @Override - public void addUIWidgets(Builder builder, UIBuildContext buildContext) { - builder.widget( - new TextFieldWidget().setGetter(() -> inventoryName) - .setSetter((val) -> { - inventoryName = val; - final IMultiBlockController controller = getTarget(false); - if (controller != null && inventoryID != null) { - controller.changeItemInventoryDisplayName(inventoryID, inventoryName, type); - } - }) - .setSize(100, 25) - .setPos(50, 30)); - } - - @Override - protected boolean canOpenControllerGui() { - return false; - } - - @Override - public void addToolTips(List list, ItemStack stack, boolean f3_h) { - super.addToolTips(list, stack, f3_h); - list.add("Adds another item inventory"); - list.add("Inventory size: " + inventorySize); - list.add("Inventory Type: " + type); - } - - public void setInventoryId(String inventoryID) { - this.inventoryID = UUID.fromString(inventoryID); - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Laser.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Laser.java deleted file mode 100644 index b3ac8100667..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Laser.java +++ /dev/null @@ -1,26 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; - -public class Laser extends UpgradeCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.laser"; - } - - @Override - protected void customWork(IMultiBlockController target) { - target.setLaserSupport(true); - } - - @Override - public boolean onBlockBroken() { - final IMultiBlockController controller = getTarget(false); - if (controller != null) { - controller.setLaserSupport(false); - } - return super.onBlockBroken(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Tank.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Tank.java deleted file mode 100644 index b373d79ab51..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Tank.java +++ /dev/null @@ -1,61 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import java.util.List; -import java.util.UUID; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.GTValues; -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; -import gregtech.api.util.GTUtility; - -public class Tank extends UpgradeCasing { - - private int tankCount; - private int tankCapacity; - public UUID tankID; - public static final int INPUT = 0; - public static final int OUTPUT = 1; - public static final int BOTH = 2; - private final String tankName = "tank"; - private final int type = BOTH; - - @Override - protected void customWork(IMultiBlockController aTarget) { - - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.tank"; - } - - public String getCustomTankName() { - return tankName; - } - - public String getTankID() { - return tankID.toString(); - } - - public int getType() { - return type; - } - - @Override - public void readMultiTileNBT(NBTTagCompound aNBT) { - super.readMultiTileNBT(aNBT); - tankCount = aNBT.getInteger(GTValues.NBT.UPGRADE_TANK_COUNT); - tankCapacity = aNBT.getInteger(GTValues.NBT.UPGRADE_TANK_CAPACITY); - } - - @Override - public void addToolTips(List list, ItemStack stack, boolean f3_h) { - super.addToolTips(list, stack, f3_h); - list.add("Adds another tank inventory"); - list.add("Number of tanks: " + tankCount); - list.add("Tank capacity: " + GTUtility.formatNumbers(tankCapacity) + " L"); - } -} diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/Wireless.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/Wireless.java deleted file mode 100644 index 5603f0f8e8c..00000000000 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/Wireless.java +++ /dev/null @@ -1,26 +0,0 @@ -package gregtech.common.tileentities.casings.upgrade; - -import gregtech.api.multitileentity.interfaces.IMultiBlockController; -import gregtech.api.multitileentity.multiblock.casing.UpgradeCasing; - -public class Wireless extends UpgradeCasing { - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.functional.wireless"; - } - - @Override - protected void customWork(IMultiBlockController target) { - target.setWirelessSupport(true); - } - - @Override - public boolean onBlockBroken() { - final IMultiBlockController controller = getTarget(false); - if (controller != null) { - controller.setWirelessSupport(false); - } - return super.onBlockBroken(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java index a60b939bbb1..6fa17fdd759 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java @@ -14,6 +14,7 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; +import static gregtech.api.util.GTStructureUtility.chainAllGlasses; import static gregtech.api.util.GTStructureUtility.ofHatchAdder; import static gregtech.api.util.GTUtility.validMTEList; @@ -48,7 +49,6 @@ import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchDataAccess; -import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; @@ -83,7 +83,7 @@ public class MTEAssemblyLine extends MTEExtendedPowerMultiBlockBase .addElement('E', ofFrame(Materials.DamascusSteel)) .addElement('C', ofBlock(GregTechAPI.sBlockCasings8, 11)) .addElement('D', ofBlock(GregTechAPI.sBlockReinforced, 2)) - .addElement('A', Glasses.chainAllGlasses()) + .addElement('A', chainAllGlasses()) .addElement('B', ofBlock(GregTechAPI.sBlockCasings3, 10)) .addElement('F', ofFrame(Materials.VibrantAlloy)) .addElement( diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java index c582cd80232..c1f3cef93eb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java @@ -11,6 +11,7 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_COMPRESSOR_COOLING_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_COMPRESSOR_GLOW; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; +import static gregtech.api.util.GTStructureUtility.chainAllGlasses; import static gregtech.api.util.GTStructureUtility.ofCoil; import java.util.ArrayList; @@ -43,7 +44,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; -import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; @@ -81,7 +81,7 @@ public class MTEHIPCompressor extends MTEExtendedPowerMultiBlockBase { - - private static IStructureDefinition STRUCTURE_DEFINITION = null; - protected static final String STRUCTURE_PIECE_T1 = "T1"; - protected static final String STRUCTURE_PIECE_T2 = "T2"; - protected static final String STRUCTURE_PIECE_T3 = "T3"; - protected static final String STRUCTURE_PIECE_T4 = "T4"; - protected static final String STRUCTURE_PIECE_T5_6 = "T5_6"; - protected static final String STRUCTURE_PIECE_T7_8 = "T7_8"; - protected static final Vec3Impl STRUCTURE_OFFSET_T1 = new Vec3Impl(3, 1, 0); - protected static final Vec3Impl STRUCTURE_OFFSET_T2 = new Vec3Impl(1, 4, -3); - protected static final Vec3Impl STRUCTURE_OFFSET_T3 = new Vec3Impl(8, 0, 5); - protected static final Vec3Impl STRUCTURE_OFFSET_T4 = new Vec3Impl(-14, 0, 0); - protected static final Vec3Impl STRUCTURE_OFFSET_T5 = new Vec3Impl(14, 0, -6); - protected static final Vec3Impl STRUCTURE_OFFSET_T6 = new Vec3Impl(-16, 0, 0); - protected static final Vec3Impl STRUCTURE_OFFSET_T7 = new Vec3Impl(16, 0, 15); - protected static final Vec3Impl STRUCTURE_OFFSET_T8 = new Vec3Impl(-16, 0, 0); - protected static final int PROCESS_WINDOW_BASE_ID = 100; - protected static final int ITEM_WHITELIST_SLOTS = 8; - protected static final int FLUID_WHITELIST_SLOTS = 8; - protected static final int MAX_PROCESSES = 8; - protected HeatingCoilLevel coilTier; - protected final ArrayList> processWhitelists = new ArrayList<>(MAX_PROCESSES); - protected final ArrayList processWhitelistInventoryHandlers = new ArrayList<>(MAX_PROCESSES); - protected final ArrayList> processFluidWhiteLists = new ArrayList<>(MAX_PROCESSES); - protected boolean wasWhitelistOpened = false; - - public AdvChemicalProcessor() { - super(); - for (int i = 0; i < MAX_PROCESSES; i++) { - processWhitelists.add(null); - processWhitelistInventoryHandlers.add(new ItemStackHandler(ITEM_WHITELIST_SLOTS)); - ArrayList processFluidTanks = new ArrayList<>(FLUID_WHITELIST_SLOTS); - for (int j = 0; j < FLUID_WHITELIST_SLOTS; j++) { - processFluidTanks.add(new GTFluidTank()); - } - processFluidWhiteLists.add(processFluidTanks); - } - setMaxComplexParallels(1, false); - } - - @Override - public void readMultiTileNBT(NBTTagCompound nbt) { - super.readMultiTileNBT(nbt); - setMaxComplexParallels(nbt.getInteger("processors"), false); - final NBTTagCompound processWhiteLists = nbt.getCompoundTag("whiteLists"); - long capacity = 1000; - if (nbt.hasKey(GTValues.NBT.TANK_CAPACITY)) { - capacity = saturatedCast(nbt.getLong(GTValues.NBT.TANK_CAPACITY)); - } - for (int i = 0; i < MAX_PROCESSES; i++) { - - if (processWhiteLists == null) { - continue; - } - - final NBTTagCompound itemList = processWhiteLists.getCompoundTag("items" + i); - if (itemList != null) { - processWhitelistInventoryHandlers.get(i) - .deserializeNBT(itemList); - } - final NBTTagList fluidList = processWhiteLists.getTagList("fluids" + i, Constants.NBT.TAG_COMPOUND); - - if (fluidList == null) { - continue; - } - - for (int j = 0; j < fluidList.tagCount(); j++) { - final NBTTagCompound fluid = fluidList.getCompoundTagAt(j); - - if (fluid == null) { - continue; - } - - short index = fluid.getShort("s"); - FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(fluid); - if (fluidStack != null) { - processFluidWhiteLists.get(i) - .get(index) - .fill(fluidStack, true); - } - } - } - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - super.writeMultiTileNBT(nbt); - nbt.setInteger("processors", maxComplexParallels); - final NBTTagCompound processWhiteLists = new NBTTagCompound(); - for (int i = 0; i < MAX_PROCESSES; i++) { - processWhiteLists.setTag( - "items" + i, - processWhitelistInventoryHandlers.get(i) - .serializeNBT()); - final NBTTagList fluidList = new NBTTagList(); - for (int j = 0; j < FLUID_WHITELIST_SLOTS; j++) { - final FluidStack fluidStack = processFluidWhiteLists.get(i) - .get(j) - .getFluid(); - if (fluidStack != null) { - final NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("s", (byte) j); - fluidStack.writeToNBT(tag); - fluidList.appendTag(tag); - } - } - processWhiteLists.setTag("fluids" + i, fluidList); - } - nbt.setTag("whiteLists", processWhiteLists); - } - - @Override - public short getCasingRegistryID() { - return GT_MultiTileCasing.Chemical.getRegistryId(); - } - - @Override - public int getCasingMeta() { - return GT_MultiTileCasing.Chemical.getId(); - } - - @Override - public MultiblockTooltipBuilder createTooltip() { - final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Chemical Reactor") - .addInfo("Does not lose efficiency when overclocked") - .addInfo("Accepts fluids instead of fluid cells") - .addInfo("Can do multiple different recipes at once") - .addInfo("By using the whitelist filter a recipe can push its output") - .addInfo("to a different recipes input to chain them") - .addInfo("Disclaimer: Still WIP - Use at your own risk") - .beginStructureBlock(5, 3, 3, false) - .addController("Front center") - .addCasingInfoExactly("PTFE Pipe Machine Casing", 8, false) - .addCasingInfoExactly("Heating Coils", 3, true) - .addCasingInfoExactly("EV+ Glass", 3, true) - .addCasingInfoExactly("Motor Casing", 3, true) - .addCasingInfoExactly("Chemical Casing", 27, false) - .toolTipFinisher(GTValues.Authorminecraft7771); - return tt; - } - - @Override - public Vec3Impl getStartingStructureOffset() { - return STRUCTURE_OFFSET_T1; - } - - @Override - public boolean checkMachine() { - setCoilTier(HeatingCoilLevel.None); - buildState.startBuilding(getStartingStructureOffset()); - if (!checkPiece(STRUCTURE_PIECE_T1, buildState.getCurrentOffset())) return buildState.failBuilding(); - if (maxComplexParallels > 1) { - buildState.addOffset(STRUCTURE_OFFSET_T2); - if (!checkPiece(STRUCTURE_PIECE_T2, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 2) { - buildState.addOffset(STRUCTURE_OFFSET_T3); - if (!checkPiece(STRUCTURE_PIECE_T3, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 3) { - buildState.addOffset(STRUCTURE_OFFSET_T4); - if (!checkPiece(STRUCTURE_PIECE_T4, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 4) { - buildState.addOffset(STRUCTURE_OFFSET_T5); - if (!checkPiece(STRUCTURE_PIECE_T5_6, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 5) { - buildState.addOffset(STRUCTURE_OFFSET_T6); - if (!checkPiece(STRUCTURE_PIECE_T5_6, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 6) { - buildState.addOffset(STRUCTURE_OFFSET_T7); - if (!checkPiece(STRUCTURE_PIECE_T7_8, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 7) { - buildState.addOffset(STRUCTURE_OFFSET_T8); - if (!checkPiece(STRUCTURE_PIECE_T7_8, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - buildState.stopBuilding(); - return super.checkMachine(); - } - - @Override - public void construct(ItemStack trigger, boolean hintsOnly) { - buildState.startBuilding(getStartingStructureOffset()); - buildPiece(STRUCTURE_PIECE_T1, trigger, hintsOnly, buildState.getCurrentOffset()); - if (maxComplexParallels > 1) { - buildState.addOffset(STRUCTURE_OFFSET_T2); - buildPiece(STRUCTURE_PIECE_T2, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 2) { - buildState.addOffset(STRUCTURE_OFFSET_T3); - buildPiece(STRUCTURE_PIECE_T3, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 3) { - buildState.addOffset(STRUCTURE_OFFSET_T4); - buildPiece(STRUCTURE_PIECE_T4, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 4) { - buildState.addOffset(STRUCTURE_OFFSET_T5); - buildPiece(STRUCTURE_PIECE_T5_6, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 5) { - buildState.addOffset(STRUCTURE_OFFSET_T6); - buildPiece(STRUCTURE_PIECE_T5_6, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 6) { - buildState.addOffset(STRUCTURE_OFFSET_T7); - buildPiece(STRUCTURE_PIECE_T7_8, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 7) { - buildState.addOffset(STRUCTURE_OFFSET_T8); - buildPiece(STRUCTURE_PIECE_T7_8, trigger, hintsOnly, buildState.getCurrentOffset()); - } - - buildState.stopBuilding(); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape( - STRUCTURE_PIECE_T1, - transpose( - new String[][] { { "CPCPC", "CCCCC", "CPCPC" }, { "CGC~C", "GWWWU", "CGCCC" }, - { "CPCPC", "CTTTC", "CPCPC" } })) - .addShape( - STRUCTURE_PIECE_T2, - new String[][] { { " ", " ", " ", " ", " ", " F F ", " B B " }, - { " ", " ", " ", " ", " ", " F F ", " B B " }, - { " ", " ", " ", " ", " ", " F F ", " BBB " }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C C ", "BCPPPCB" }, - { " CBBBC ", " G W G ", " G W G ", " G W G ", " G W G ", " G W G ", "BCPCPCB" }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C C ", "BCPPPCB" }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " ", " ", " ", " ", " ", " ", " BBB " } }) - .addShape( - STRUCTURE_PIECE_T3, - new String[][] { - { " ", " ", " ", " ", " ", " ", " BBB " }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C CFFF", "BCPPPCBBB" }, - { " CBBBC ", " G W G ", " G W G ", " G W G ", " G W G ", " G W G ", "BCPCPCB " }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C CFFF", "BCPPPCBBB" }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " ", " ", " ", " ", " ", " ", " BBB " } }) - .addShape( - STRUCTURE_PIECE_T4, - new String[][] { - { " ", " ", " ", " ", " ", " ", " BBB " }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", "FFFC C ", "BBBCPPPCB" }, - { " CBBBC ", " G W G ", " G W G ", " G W G ", " G W G ", " G W G ", " BCPCPCB" }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", "FFFC C ", "BBBCPPPCB" }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " ", " ", " ", " ", " ", " ", " BBB " } }) - .addShape( - STRUCTURE_PIECE_T5_6, - new String[][] { { " ", " ", " ", " ", " ", " F F ", " " }, - { " ", " ", " ", " ", " ", " F F ", " B B " }, - { " ", " ", " ", " ", " ", " F F ", " B B " }, - { " ", " ", " ", " ", " ", " F F ", " BBB " }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C C ", "BCPPPCB" }, - { " CBBBC ", " G W G ", " G W G ", " G W G ", " G W G ", " G W G ", "BCPCPCB" }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C C ", "BCPPPCB" }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " ", " ", " ", " ", " ", " ", " BBB " } }) - .addShape( - STRUCTURE_PIECE_T7_8, - new String[][] { { " ", " ", " ", " ", " ", " ", " BBB " }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C C ", "BCPPPCB" }, - { " CBBBC ", " G W G ", " G W G ", " G W G ", " G W G ", " G W G ", "BCPCPCB" }, - { " BBB ", " C C ", " C C ", " C C ", " C C ", " C C ", "BCPPPCB" }, - { " C ", " CGC ", " CGC ", " CGC ", " CGC ", " CGC ", " BCCCB " }, - { " ", " ", " ", " ", " ", " F F ", " BBB " }, - { " ", " ", " ", " ", " ", " F F ", " B B " }, - { " ", " ", " ", " ", " ", " F F ", " B B " }, - { " ", " ", " ", " ", " ", " F F ", " " } }) - .addElement( - 'C', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.Chemical.getCasing())) - .addElement('P', ofBlock(GregTechAPI.sBlockCasings8, 1)) - .addElement('T', ofMuTECasings(NOTHING, MOTOR_CASINGS)) - .addElement( - 'W', - GTStructureUtility.ofCoil(AdvChemicalProcessor::setCoilTier, AdvChemicalProcessor::getCoilTier)) - .addElement('G', Glasses.chainAllGlasses()) - .addElement('B', ofBlock(GregTechAPI.sBlockCasings4, 1)) - .addElement('F', GTStructureUtility.ofFrame(Materials.Steel)) - .addElement( - 'U', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.Chemical.getCasing(), - GT_StructureUtilityMuTE.INVENTORY_CASINGS)) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - protected void setMaxComplexParallels(int parallel, boolean stopMachine) { - super.setMaxComplexParallels(parallel, stopMachine); - onStructureChange(); - } - - protected MultiChildWidget createMainPage(IWidgetBuilder builder) { - MultiChildWidget child = new MultiChildWidget(); - for (int i = 0; i < MAX_PROCESSES; i++) { - final int processIndex = i; - child.addChild( - new ButtonWidget().setPlayClickSound(true) - .setOnClick( - (clickData, widget) -> { - if (!widget.isClient()) widget.getContext() - .openSyncedWindow(PROCESS_WINDOW_BASE_ID + processIndex); - }) - .setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_WHITELIST) - .setSize(18, 18) - .setEnabled((widget -> processIndex < maxComplexParallels)) - .setPos(20 * (i % 4) + 18, 18 + (i / 4) * 20)); - } - child.addChild( - new NumericWidget().setGetter(() -> maxComplexParallels) - .setSetter(parallel -> setMaxComplexParallels((int) parallel, true)) - .setBounds(1, MAX_PROCESSES) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("Tier") - .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD) - .setSize(18, 18) - .setPos(130, 85)); - return child; - } - - @Override - public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - super.addUIWidgets(builder, buildContext); - for (int i = 0; i < MAX_PROCESSES; i++) { - final int processIndex = i; - buildContext.addSyncedWindow( - PROCESS_WINDOW_BASE_ID + i, - (player) -> createProcessConfigWindow(player, processIndex)); - } - buildContext.addCloseListener(() -> { - // Reset HashSet, we will let it re-generate on next item output - if (wasWhitelistOpened) { - for (int i = 0; i < MAX_PROCESSES; i++) { - processWhitelists.set(i, null); - } - wasWhitelistOpened = false; - } - }); - } - - protected ModularWindow createProcessConfigWindow(final EntityPlayer player, final int processIndex) { - wasWhitelistOpened = true; - ModularWindow.Builder builder = ModularWindow.builder(86, 100); - builder.widget( - new TextWidget("Process " + processIndex).setTextAlignment(Alignment.Center) - .setPos(13, 7)); - builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); - builder.widget( - SlotGroup.ofItemHandler(processWhitelistInventoryHandlers.get(processIndex), 4) - .startFromSlot(0) - .endAtSlot(ITEM_WHITELIST_SLOTS - 1) - .phantom(true) - .background(getGUITextureSet().getItemSlot()) - .build() - .setPos(7, 19)); - builder.widget( - SlotGroup.ofFluidTanks(processFluidWhiteLists.get(processIndex), 4) - .startFromSlot(0) - .endAtSlot(FLUID_WHITELIST_SLOTS - 1) - .phantom(true) - .build() - .setPos(7, 55)); - return builder.build(); - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.advchemicalprocessor"; - } - - @Override - public String getLocalName() { - return "Advanced Chemical Processor"; - } - - public void setCoilTier(HeatingCoilLevel coilTier) { - this.coilTier = coilTier; - } - - public HeatingCoilLevel getCoilTier() { - return coilTier; - } - - @Override - protected boolean hasPerfectOverclock() { - return true; - } - - protected void generateWhitelist(int processIndex) { - HashSet whitelist = new HashSet<>(); - for (ItemStack itemStack : processWhitelistInventoryHandlers.get(processIndex) - .getStacks()) { - if (itemStack != null) { - whitelist.add(getWhitelistString(itemStack)); - } - } - for (IFluidTank tank : processFluidWhiteLists.get(processIndex)) { - if (tank.getFluid() != null) { - whitelist.add(getWhitelistString(tank.getFluid())); - } - } - processWhitelists.set(processIndex, whitelist); - } - - protected String getWhitelistString(ItemStack itemStack) { - if (itemStack != null) { - return itemStack.getUnlocalizedName(); - } - return null; - } - - protected String getWhitelistString(FluidStack fluidStack) { - if (fluidStack != null) { - return fluidStack.getUnlocalizedName(); - } - return null; - } - - @Override - @Nonnull - protected AdvChemicalProcessorProcessingLogic createProcessingLogic() { - return new AdvChemicalProcessorProcessingLogic(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java deleted file mode 100644 index b208e27fe35..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java +++ /dev/null @@ -1,157 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock; - -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_OUT; -import static gregtech.api.util.GT_StructureUtilityMuTE.ofMuTECasings; - -import java.util.List; - -import javax.annotation.Nonnull; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.util.Vec3Impl; -import com.gtnewhorizons.modularui.api.math.Alignment; -import com.gtnewhorizons.modularui.api.screen.ModularWindow; -import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; -import com.gtnewhorizons.modularui.common.widget.DrawableWidget; -import com.gtnewhorizons.modularui.common.widget.TextWidget; - -import gregtech.GTMod; -import gregtech.api.enums.GTValues; -import gregtech.api.multitileentity.enums.GT_MultiTileCasing; -import gregtech.api.multitileentity.multiblock.base.Controller; -import gregtech.api.task.tasks.PollutionTask; -import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.tileentities.machines.multiblock.logic.CokeOvenProcessingLogic; - -public class CokeOven extends Controller { - - private static IStructureDefinition STRUCTURE_DEFINITION = null; - private static final Vec3Impl OFFSET = new Vec3Impl(1, 1, 0); - private static final String MAIN = "Main"; - private static final int POLLUTION_AMOUNT = 10; - - public CokeOven() { - super(); - setElectric(false); - new PollutionTask<>(this).setPollutionPerSecond(POLLUTION_AMOUNT); - } - - @Override - public void construct(ItemStack trigger, boolean hintsOnly) { - buildState.startBuilding(getStartingStructureOffset()); - buildPiece(MAIN, trigger, hintsOnly, buildState.stopBuilding()); - } - - @Override - public boolean checkMachine() { - buildState.startBuilding(getStartingStructureOffset()); - return checkPiece(MAIN, buildState.stopBuilding()); - } - - @Override - public int survivalConstruct(ItemStack trigger, int elementBudget, ISurvivalBuildEnvironment env) { - buildState.startBuilding(getStartingStructureOffset()); - return survivalBuildPiece(MAIN, trigger, buildState.stopBuilding(), elementBudget, env, false); - } - - @Override - public short getCasingRegistryID() { - return 0; - } - - @Override - public int getCasingMeta() { - return GT_MultiTileCasing.CokeOven.getId(); - } - - @Override - protected MultiblockTooltipBuilder createTooltip() { - final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Coke Oven") - .addInfo("Used for charcoal") - .beginStructureBlock(3, 3, 3, true) - .addCasingInfoExactly("Coke Oven Bricks", 25, false) - .addPollutionAmount(POLLUTION_AMOUNT) - .toolTipFinisher(GTValues.AuthorBlueWeabo); - return tt; - } - - @Override - public Vec3Impl getStartingStructureOffset() { - return OFFSET; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape( - MAIN, - new String[][] { { "AAA", "A~A", "AAA" }, { "AAA", "A-A", "AAA" }, { "AAA", "AAA", "AAA" } }) - .addElement('A', ofMuTECasings(ITEM_IN | ITEM_OUT, GT_MultiTileCasing.CokeOven.getCasing())) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public boolean hasFluidInput() { - return false; - } - - @Override - protected void addTitleTextStyle(ModularWindow.Builder builder, String title) { - final int TAB_PADDING = 3; - final int TITLE_PADDING = 2; - int titleWidth = 0, titleHeight = 0; - if (NetworkUtils.isClient()) { - final FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; - final List titleLines = fontRenderer - .listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2); - titleWidth = titleLines.size() > 1 ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2 - : fontRenderer.getStringWidth(title); - titleHeight = titleLines.size() * fontRenderer.FONT_HEIGHT + (titleLines.size() - 1); - } - - final DrawableWidget tab = new DrawableWidget(); - final TextWidget text = new TextWidget(title).setDefaultColor(getTitleColor()) - .setTextAlignment(Alignment.CenterLeft) - .setMaxWidth(titleWidth); - if (GTMod.gregtechproxy.mTitleTabStyle == 1) { - tab.setDrawable(getGUITextureSet().getTitleTabAngular()) - .setPos(0, -(titleHeight + TAB_PADDING) + 1) - .setSize(getGUIWidth(), titleHeight + TAB_PADDING * 2); - text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight + TAB_PADDING); - } else { - tab.setDrawable(getGUITextureSet().getTitleTabDark()) - .setPos(0, -(titleHeight + TAB_PADDING * 2) + 1) - .setSize(titleWidth + (TAB_PADDING + TITLE_PADDING) * 2, titleHeight + TAB_PADDING * 2 - 1); - text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight); - } - builder.widget(tab) - .widget(text); - } - - @Override - public String getLocalName() { - return StatCollector.translateToLocal(getTileEntityName()); - } - - public String getTileEntityName() { - return "gt.multitileentity.multiblock.cokeOven"; - } - - @Override - @Nonnull - protected CokeOvenProcessingLogic createProcessingLogic() { - return new CokeOvenProcessingLogic(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/DistillationTower.java deleted file mode 100644 index 438ab34533b..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/DistillationTower.java +++ /dev/null @@ -1,173 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.*; -import static gregtech.api.util.GT_StructureUtilityMuTE.MOTOR_CASINGS; -import static gregtech.api.util.GT_StructureUtilityMuTE.ofMuTECasings; - -import javax.annotation.Nonnull; - -import net.minecraft.util.StatCollector; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.util.Vec3Impl; - -import gregtech.api.GregTechAPI; -import gregtech.api.enums.GTValues; -import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.enums.Materials; -import gregtech.api.multitileentity.enums.GT_MultiTileCasing; -import gregtech.api.multitileentity.multiblock.base.StackableController; -import gregtech.api.util.GTStructureUtility; -import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.tileentities.machines.multiblock.logic.DistillationTowerProcessingLogic; - -public class DistillationTower extends StackableController { - - private static IStructureDefinition STRUCTURE_DEFINITION_MEGA = null; - private static final Vec3Impl STRUCTURE_OFFSET_MEGA = new Vec3Impl(8, 3, 0); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_START = new Vec3Impl(0, 3, 0); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_STOP = new Vec3Impl(0, 5, 0); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_STACK = new Vec3Impl(0, 3, 0); - private static final String STACKABLE_MIDDLE_1 = "STACKABLE_MIDDLE_1"; - private static final String STACKABLE_MIDDLE_2 = "STACKABLE_MIDDLE_2"; - private final boolean isMega = true; - - @Override - public short getCasingRegistryID() { - return 0; - } - - @Override - public int getCasingMeta() { - return GT_MultiTileCasing.Distillation.getId(); - } - - @Override - public MultiblockTooltipBuilder createTooltip() { - final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Distillation Tower") - .addInfo("Can be specialised to be a mega structure") - .beginStructureBlock(5, 3, 3, false) - .addController("Front center") - .toolTipFinisher(GTValues.Authorminecraft7771); - return tt; - } - - @Override - public Vec3Impl getStartingStructureOffset() { - return STRUCTURE_OFFSET_MEGA; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION_MEGA == null) { - STRUCTURE_DEFINITION_MEGA = StructureDefinition.builder() - .addShape( - STACKABLE_START, - transpose( - // spotless:off - new String[][]{ - {" "," "," "," "," "," ECCCCCE "," CCCCCCC "," C C "," EC CE "," CC CC "," CC CC ABA "," CC CC B B "," CC CC ABA "," CC CC "," EC CE "," C C "," CCCCCCC "," ECCCCCE "," "}, - {" "," EEE "," E "," E "," E "," E E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" CCCCC "," CCCCC "," CCCCC "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" CXC~C "," BDDDB "," CBCBC "," B B "," B B "," E B B E "," CCCCCCC "," C C "," EC CE "," C C "," C C AAA "," C C A A "," C C AAA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" CCCCC "," CCCCC "," CCCCC "," "," CCCCCCCCCCC "," CAAAAAAAAAC ","CCCACCCCCCCACCC ","CAACAAAAAAACAAC ","CACAADDDDDAACAC ","CACADDDDDDDACACCCCC","CACADDAAADDACACCCCC","CACADDAAADDACACCCCC","CACADDAAADDACACCCCC","CACADDDDDDDACACCCCC","CACAADDDDDAACAC ","CAACAAAAAAACAAC ","CCCACCCCCCCACCC "," CAAAAAAAAAC "," CCCCCCCCCCC "} - })) - .addShape( - STACKABLE_STOP, - transpose( - new String[][]{ - {" "," "," "," "," "," "," "," "," "," "," CCC "," CCC "," CCC "," "," "," "," "," "," "}, - {" "," "," "," "," "," E E "," E E "," E E "," EEEEAAAAAEEEE "," AAAAAAA "," AA AA "," AA AA "," AA AA "," AAAAAAA "," EEEEAAAAAEEEE "," E E "," E E "," E E "," "}, - {" "," "," "," "," "," ECCCCCE "," CCCCCCCCC "," CCCCCCCCCCC "," ECCC CCCE "," CCC CCC "," CCC CCC "," CCC CCC "," CCC CCC "," CCC CCC "," ECCC CCCE "," CCCCCCCCCCC "," CCCCCCCCC "," ECCCCCE "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C "," C C "," C C "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C CAAAAA "," C CABBBA "," C CAAAAA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" "," "," "," "," "," ECCCCCE "," CCCCCCC "," C C "," EC CE "," CC CC "," CC CABBBA "," CC C B "," CC CABBBA "," CC CC "," EC CE "," C C "," CCCCCCC "," ECCCCCE "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C CAAABA "," C CAAA B "," C CAAABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C A B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - })) - .addShape( - STACKABLE_MIDDLE_1, - transpose( - new String[][]{ - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - })) - .addShape( - STACKABLE_MIDDLE_2, - transpose( - new String[][]{ - {" "," "," "," "," "," ECCCCCE "," CCCCCCC "," C C "," EC CE "," CC CC "," CC CC ABA "," CC CC B B "," CC CC ABA "," CC CC "," EC CE "," C C "," CCCCCCC "," ECCCCCE "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - {" "," "," "," "," "," E E "," CCCCCCC "," C C "," EC CE "," C C "," C C ABA "," C C B B "," C C ABA "," C C "," EC CE "," C C "," CCCCCCC "," E E "," "}, - })) - // spotless:on - .addElement( - 'C', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.Distillation.getCasing())) - .addElement('E', GTStructureUtility.ofFrame(Materials.StainlessSteel)) - .addElement('A', ofBlock(GregTechAPI.sBlockCasings2, 0)) - .addElement('B', ofBlock(GregTechAPI.sBlockCasings2, 13)) - .addElement('X', ofMuTECasings(NOTHING, MOTOR_CASINGS)) - .addElement('D', GTStructureUtility.ofCoil((tile, meta) -> {}, (tile) -> HeatingCoilLevel.None)) - .build(); - } - return STRUCTURE_DEFINITION_MEGA; - } - - @Override - public int getFluidOutputCount() { - return 12; - } - - @Override - public int getMinStacks() { - return 0; - } - - @Override - public int getMaxStacks() { - return 9; - } - - @Override - public Vec3Impl getStartingStackOffset() { - return STRUCTURE_OFFSET_MEGA_START; - } - - @Override - public Vec3Impl getPerStackOffset() { - return STRUCTURE_OFFSET_MEGA_STACK; - } - - @Override - public Vec3Impl getAfterLastStackOffset() { - return STRUCTURE_OFFSET_MEGA_STOP; - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.distillationtower"; - } - - @Override - public String getLocalName() { - return StatCollector.translateToLocal(getTileEntityName()); - } - - @Override - protected String getStackableMiddle(int stackIndex) { - return stackIndex % 2 == 0 ? STACKABLE_MIDDLE_1 : STACKABLE_MIDDLE_2; - } - - @Override - @Nonnull - protected DistillationTowerProcessingLogic createProcessingLogic() { - return new DistillationTowerProcessingLogic(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/LaserEngraver.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/LaserEngraver.java deleted file mode 100644 index 39be3a10de7..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/LaserEngraver.java +++ /dev/null @@ -1,304 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; -import static gregtech.api.enums.Mods.*; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.*; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ENERGY_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_OUT; -import static gregtech.api.util.GT_StructureUtilityMuTE.*; - -import java.util.UUID; - -import javax.annotation.Nonnull; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.util.Vec3Impl; -import com.gtnewhorizons.modularui.api.math.Alignment; -import com.gtnewhorizons.modularui.api.math.Color; -import com.gtnewhorizons.modularui.api.widget.IWidgetBuilder; -import com.gtnewhorizons.modularui.common.widget.ButtonWidget; -import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; -import com.gtnewhorizons.modularui.common.widget.textfield.NumericWidget; - -import gregtech.api.GregTechAPI; -import gregtech.api.enums.GTValues; -import gregtech.api.enums.Materials; -import gregtech.api.gui.modularui.GTUITextures; -import gregtech.api.multitileentity.enums.GT_MultiTileCasing; -import gregtech.api.multitileentity.multiblock.base.ComplexParallelController; -import gregtech.api.recipe.RecipeMap; -import gregtech.api.util.GTStructureUtility; -import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.tileentities.machines.multiblock.logic.LaserEngraverProcessingLogic; - -public class LaserEngraver extends ComplexParallelController { - - private static IStructureDefinition STRUCTURE_DEFINITION = null; - protected static final String STRUCTURE_MAIN = "Main"; - protected static final String STRUCTURE_PIECE_T1 = "T1"; - protected static final String STRUCTURE_PIECE_T2 = "T2"; - protected static final String STRUCTURE_PIECE_T3 = "T3"; - protected static final String STRUCTURE_PIECE_T4 = "T4"; - protected static final String STRUCTURE_PIECE_T5 = "T5"; - protected static final String STRUCTURE_PIECE_T6 = "T6"; - protected static final int PROCESS_WINDOW_BASE_ID = 100; - protected static final Vec3Impl STRUCTURE_OFFSET_T1 = new Vec3Impl(3, 1, 0); - protected static final Vec3Impl STRUCTURE_OFFSET_T2 = new Vec3Impl(1, 3, 0); - protected static final Vec3Impl STRUCTURE_OFFSET_T3 = new Vec3Impl(-6, 0, -5); - protected static final Vec3Impl STRUCTURE_OFFSET_T4 = new Vec3Impl(18, 0, 0); - protected static final Vec3Impl STRUCTURE_OFFSET_T5 = new Vec3Impl(-18, 0, 9); - protected static final Vec3Impl STRUCTURE_OFFSET_T6 = new Vec3Impl(18, 0, 0); - protected static final int MAX_PROCESSES = 6; - protected RecipeMap recipeMap; - private UUID LaserEngraver; - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.laserengraver"; - } - - @Override - public Vec3Impl getStartingStructureOffset() { - return STRUCTURE_OFFSET_T1; - } - - @Override - public boolean checkMachine() { - buildState.startBuilding(getStartingStructureOffset()); - if (!checkPiece(STRUCTURE_PIECE_T1, buildState.getCurrentOffset())) return buildState.failBuilding(); - if (maxComplexParallels > 1) { - buildState.addOffset(STRUCTURE_OFFSET_T2); - if (!checkPiece(STRUCTURE_PIECE_T2, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 2) { - buildState.addOffset(STRUCTURE_OFFSET_T3); - if (!checkPiece(STRUCTURE_PIECE_T3, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 3) { - buildState.addOffset(STRUCTURE_OFFSET_T4); - if (!checkPiece(STRUCTURE_PIECE_T4, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 4) { - buildState.addOffset(STRUCTURE_OFFSET_T5); - if (!checkPiece(STRUCTURE_PIECE_T5, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - if (maxComplexParallels > 5) { - buildState.addOffset(STRUCTURE_OFFSET_T6); - if (!checkPiece(STRUCTURE_PIECE_T6, buildState.getCurrentOffset())) return buildState.failBuilding(); - } - buildState.stopBuilding(); - return super.checkMachine(); - } - - @Override - public void construct(ItemStack trigger, boolean hintsOnly) { - buildState.startBuilding(getStartingStructureOffset()); - buildPiece(STRUCTURE_PIECE_T1, trigger, hintsOnly, buildState.getCurrentOffset()); - if (maxComplexParallels > 1) { - buildState.addOffset(STRUCTURE_OFFSET_T2); - buildPiece(STRUCTURE_PIECE_T2, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 2) { - buildState.addOffset(STRUCTURE_OFFSET_T3); - buildPiece(STRUCTURE_PIECE_T3, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 3) { - buildState.addOffset(STRUCTURE_OFFSET_T4); - buildPiece(STRUCTURE_PIECE_T4, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 4) { - buildState.addOffset(STRUCTURE_OFFSET_T5); - buildPiece(STRUCTURE_PIECE_T5, trigger, hintsOnly, buildState.getCurrentOffset()); - } - if (maxComplexParallels > 5) { - buildState.addOffset(STRUCTURE_OFFSET_T6); - buildPiece(STRUCTURE_PIECE_T6, trigger, hintsOnly, buildState.getCurrentOffset()); - } - buildState.stopBuilding(); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape( - STRUCTURE_PIECE_T1, - transpose( - // spotless:off - new String[][]{{"ACADA", "AAAAA", "AAAAA"}, {"GGA~A", "H I", "GGAAA"}, - {"AAAAA", "ABBBA", "AAAAA"}})) - .addShape( - STRUCTURE_PIECE_T2, - new String[][]{{" ", " ", " ", " ", " ", " "}, - {" K ", " K ", " K ", " ", " ", " "}, - {" K ", " ", " ", " ", " ", " "}, - {" K ", " ", " ", " ", " ", " "}, - {" K ", " ", " ", " ", " ", " "}, - {" K ", "FBF FBF", " G G ", " G G ", " G G ", "FBF FBF"}, - {" KKKKK ", "BIB BIB", "G G G G", "G G G G", "G G G G", "BHB BHB"}, - {" K K ", "FBF FBF", " G G ", " G G ", " G G ", "FBF FBF"}, - {" K K ", " ", " ", " ", " ", " "}, - {" K K ", "FBF FBF", " G G ", " G G ", " G G ", "FBF FBF"}, - {" KKKKK ", "BIB BIB", "G G G G", "G G G G", "G G G G", "BHB BHB"}, - {" ", "FBF FBF", " G G ", " G G ", " G G ", "FBF FBF",}}) - .addShape( - STRUCTURE_PIECE_T3, - new String[][]{ - {" ", " BBBBB FBF ", " BGGGB G ", " BGGGB G ", " BMLMB G ", " BBBBB FBF "}, - {" KKKKKKK ", " BBAAABB BIB ", " B B G G ", " B B G G ", " B B G G ", " BBBBBBB BHB "}, - {" K ", " BABBBAB FBF ", " G G G ", " G G G ", " M HHH M G ", " BBBBBBB FBF "}, - {"KKKKKK ", " BABIBAB ", " G G ", " G G ", " L HHH L ", " BBBBBBB "}, - {" K ", " BABBBAB FBF ", " G G G ", " G G G ", " M HHH M G ", " BBBBBBB FBF "}, - {" KKKKKKK ", " BBAAABB BIB ", " B B G G ", " B B G G ", " B B G G ", " BBBBBBB BHB "}, - {" ", " BBBBB FBF ", " BGGGB G ", " BGGGB G ", " BMLMB G ", " BBBBB FBF "}}) - .addShape( - STRUCTURE_PIECE_T4, - new String[][]{ - {" ", "FBF BBBBB ", " G BGGGB ", " G BGGGB ", " G BNLNB ", "FBF BBBBB "}, - {" KKKKKKK ", "BIB BBAAABB ", "G G B B ", "G G B B ", "G G B B ", "BHB BBBBBBB "}, - {" K ", "FBF BABBBAB ", " G G G ", " G G G ", " G N HHH N ", "FBF BBBBBBB "}, - {" KKKKKK", " BABIBAB ", " G G ", " G G ", " L HHH L ", " BBBBBBB "}, - {" K ", "FBF BABBBAB ", " G G G ", " G G G ", " G N HHH N ", "FBF BBBBBBB "}, - {" KKKKKKK ", "BIB BBAAABB ", "G G B B ", "G G B B ", "G G B B ", "BHB BBBBBBB "}, - {" ", "FBF BBBBB ", " G BGGGB ", " G BGGGB ", " G BNLNB ", "FBF BBBBB "}}) - .addShape( - STRUCTURE_PIECE_T5, - new String[][]{ - {" ", " BBBBB FBF ", " BGGGB G ", " BGGGB G ", " BOLOB G ", " BBBBB FBF "}, - {" KKKKKKK ", " BBAAABB BIB ", " B B G G ", " B B G G ", " B B G G ", " BBBBBBB BHB "}, - {" K ", " BABBBAB FBF ", " G G G ", " G G G ", " O HHH O G ", " BBBBBBB FBF "}, - {" K ", " BABIBAB ", " G G ", " G G ", " L HHH L ", " BBBBBBB "}, - {" K ", " BABBBAB FBF ", " G G G ", " G G G ", " O HHH O G ", " BBBBBBB FBF "}, - {" KKKKKKK ", " BBAAABB BIB ", " B B G G ", " B B G G ", " B B G G ", " BBBBBBB BHB "}, - {" K ", " BBBBB FBF ", " BGGGB G ", " BGGGB G ", " BOLOB G ", " BBBBB FBF "}, - {" K ", " ", " ", " ", " "}, - {" K ", " ", " ", " ", " "}, - {" K ", " ", " ", " ", " "}}) - .addShape( - STRUCTURE_PIECE_T6, - new String[][]{ - {" ", "FBF BBBBB ", " G BGGGB ", " G BGGGB ", " G BPLPB ", "FBF BBBBB "}, - {" KKKKKKK ", "BIB BBAAABB ", "G G B B ", "G G B B ", "G G B B ", "BHB BBBBBBB "}, - {" K ", "FBF BABBBAB ", " G G G ", " G G G ", " G P HHH P ", "FBF BBBBBBB "}, - {" K ", " BABIBAB ", " G G ", " G G ", " L HHH L ", " BBBBBBB "}, - {" K ", "FBF BABBBAB ", " G G G ", " G G G ", " G P HHH P ", "FBF BBBBBBB "}, - {" KKKKKKK ", "BIB BBAAABB ", "G G B B ", "G G B B ", "G G B B ", "BHB BBBBBBB "}, - {" K ", "FBF BBBBB ", " G BGGGB ", " G BGGGB ", " G BPLPB ", "FBF BBBBB "}, - {" K ", " ", " ", " ", " "}, - {" K ", " ", " ", " ", " "}, - {" K ", " ", " ", " ", " "}}) - // spotless:on - .addElement( - 'A', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.LaserEngraver.getCasing())) - .addElement( - 'B', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.BlackLaserEngraverCasing.getCasing())) - .addElement( - 'C', - ofMuTECasings(NOTHING, CLEANROOM_CASINGS, GT_MultiTileCasing.LaserEngraver.getCasing())) - .addElement('D', ofMuTECasings(NOTHING, WIRELESS_CASINGS, GT_MultiTileCasing.LaserEngraver.getCasing())) - .addElement('E', ofMuTECasings(NOTHING, MOTOR_CASINGS)) - .addElement('F', GTStructureUtility.ofFrame(Materials.Naquadah) - - ) - .addElement('H', ofMuTECasings(NOTHING, GT_MultiTileCasing.Mirror.getCasing())) - - .addElement( - 'G', - ofChain( - ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false))) - .addElement('I', ofMuTECasings(NOTHING, EMITTER_CASINGS)) - .addElement('K', ofBlock(GregTechAPI.sBlockCasings3, 11)) - .addElement('L', ofMuTECasings(NOTHING, ROBOT_ARM_CASINGS)) - .addElement('M', ofMuTECasings(NOTHING, GT_MultiTileCasing.LaserEngraverUpgrade1.getCasing())) - .addElement('N', ofMuTECasings(NOTHING, GT_MultiTileCasing.LaserEngraverUpgrade2.getCasing())) - .addElement('O', ofMuTECasings(NOTHING, GT_MultiTileCasing.LaserEngraverUpgrade3.getCasing())) - .addElement('P', ofMuTECasings(NOTHING, GT_MultiTileCasing.LaserEngraverUpgrade4.getCasing())) - .build(); - buildState.stopBuilding(); - } - return STRUCTURE_DEFINITION; - } - - protected MultiChildWidget createMainPage(IWidgetBuilder builder) { - MultiChildWidget child = new MultiChildWidget(); - for (int i = 0; i < MAX_PROCESSES; i++) { - final int processIndex = i; - child.addChild( - new ButtonWidget().setPlayClickSound(true) - .setOnClick( - (clickData, widget) -> { - if (!widget.isClient()) widget.getContext() - .openSyncedWindow(PROCESS_WINDOW_BASE_ID + processIndex); - }) - .setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_WHITELIST) - .setSize(18, 18) - .setEnabled((widget -> processIndex < maxComplexParallels)) - .setPos(20 * (i % 4) + 18, 18 + (i / 4) * 20)); - } - child.addChild( - new NumericWidget().setGetter(() -> maxComplexParallels) - .setSetter(parallel -> setMaxComplexParallels((int) parallel, true)) - .setBounds(1, MAX_PROCESSES) - .setTextColor(Color.WHITE.normal) - .setTextAlignment(Alignment.Center) - .addTooltip("Tier") - .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD) - .setSize(18, 18) - .setPos(130, 85)); - return child; - } - - @Override - public short getCasingRegistryID() { - return 0; - } - - @Override - public void readMultiTileNBT(NBTTagCompound nbt) { - super.readMultiTileNBT(nbt); - setMaxComplexParallels(nbt.getInteger("processors"), false); - } - - @Override - public void writeMultiTileNBT(NBTTagCompound nbt) { - super.writeMultiTileNBT(nbt); - nbt.setInteger("processors", maxComplexParallels); - } - - @Override - public int getCasingMeta() { - return GT_MultiTileCasing.LaserEngraver.getId(); - } - - @Override - protected MultiblockTooltipBuilder createTooltip() { - final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Laser Engraver") - .addInfo("Used for Engraving") - .beginStructureBlock(3, 3, 5, true) - .addController("Front right center") - .toolTipFinisher(GTValues.AuthorTheEpicGamer274); - return tt; - } - - @Override - @Nonnull - protected LaserEngraverProcessingLogic createProcessingLogic() { - return new LaserEngraverProcessingLogic(); - } - -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/LayeredCokeBattery.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/LayeredCokeBattery.java deleted file mode 100644 index 8590c803e4e..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/LayeredCokeBattery.java +++ /dev/null @@ -1,298 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.Mods.BartWorks; -import static gregtech.api.enums.Mods.IndustrialCraft2; -import static gregtech.api.enums.Mods.Thaumcraft; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ENERGY_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_OUT; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_OUT; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.NOTHING; -import static gregtech.api.util.GT_StructureUtilityMuTE.AMPERAGE_CASINGS; -import static gregtech.api.util.GT_StructureUtilityMuTE.HEATER_CASINGS; -import static gregtech.api.util.GT_StructureUtilityMuTE.INSULATOR_CASINGS; -import static gregtech.api.util.GT_StructureUtilityMuTE.MOTOR_CASINGS; -import static gregtech.api.util.GT_StructureUtilityMuTE.ofMuTECasings; - -import java.util.Arrays; -import java.util.Map; - -import javax.annotation.Nonnull; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.util.Vec3Impl; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTechAPI; -import gregtech.api.enums.Materials; -import gregtech.api.enums.SoundResource; -import gregtech.api.multitileentity.enums.GT_MultiTileCasing; -import gregtech.api.multitileentity.multiblock.base.StackableModularController; -import gregtech.api.util.GTStructureUtility; -import gregtech.api.util.GT_StructureUtilityMuTE.UpgradeCasings; -import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.tileentities.machines.multiblock.logic.LayeredCokeBatteryProcessingLogic; - -public class LayeredCokeBattery - extends StackableModularController { - - private static IStructureDefinition STRUCTURE_DEFINITION_MEGA = null; - protected static final String STRUCTURE_PIECE_BASE = "T1"; - private static final Vec3Impl STRUCTURE_OFFSET_BASE = new Vec3Impl(2, 2, 0); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_POSITION = new Vec3Impl(4, 7, -4); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_START = new Vec3Impl(0, 0, -3); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_STACK = new Vec3Impl(0, 0, -2); - private static final Vec3Impl STRUCTURE_OFFSET_MEGA_STOP = new Vec3Impl(0, 0, -1); - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.layeredcokebattery"; - } - - @Override - public String getLocalName() { - return "Layered Coke Battery"; - } - - @Override - public Vec3Impl getStartingStructureOffset() { - return STRUCTURE_OFFSET_BASE; - } - - public UpgradeCasings getBaseMucType() { - return UpgradeCasings.Heater; - } - - public int getParallelFactor() { - return 2; - } - - @Override - public void construct(ItemStack trigger, boolean hintsOnly) { - final int blueprintCount = (trigger.stackSize - 1) + getMinStacks(); - final int stackCount = Math.min(blueprintCount, getMaxStacks()); - - buildState.startBuilding(getStartingStructureOffset()); - buildPiece(STRUCTURE_PIECE_BASE, trigger, hintsOnly, buildState.getCurrentOffset()); - buildState.addOffset(getMegaPositionOffset()); - - if (stackCount >= 1) { - buildPiece(STACKABLE_START, trigger, hintsOnly, buildState.getCurrentOffset()); - buildState.addOffset(getStartingStackOffset()); - - for (int i = 0; i < stackCount; i++) { - buildPiece(STACKABLE_MIDDLE, trigger, hintsOnly, buildState.getCurrentOffset()); - buildState.addOffset(getPerStackOffset()); - } - if (hasTop()) { - buildPiece(STACKABLE_STOP, trigger, hintsOnly, buildState.getCurrentOffset()); - } - } - - buildState.stopBuilding(); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION_MEGA == null) { - STRUCTURE_DEFINITION_MEGA = StructureDefinition.builder() - .addShape( - STRUCTURE_PIECE_BASE, - transpose( - new String[][] { { " AAA ", "AAAAA", "AEEEP", "AAAAA" }, { " AAA ", "A A", "A A", "AAAAA" }, - { " A~A ", "A A", "A A", "AAAAA" }, { " AAA ", "A A", "A A", "AAAAA" }, - { " AAA ", "AAAAA", "AAAAA", "AAAAA" } })) - .addShape( - STACKABLE_STOP, - transpose( - new String[][] { { "AHFFFFAFFFFHA", "AAAAAAAAAAAAA" }, { " B B B B B B ", "AFAFAFAFAFAFA" }, - { "HB B B B B BH", "AFAFAFAFAFAFA" }, { " B B B B B B ", "AFAFAFAFAFAFA" }, - { " B B B B B B ", "AFAFAFAFAFAFA" }, { " B B B B B B ", "AFAFAFAFAFAFA" }, - { " B B B B B B ", "AFAFAFAFAFAFA" }, { " B B B B B B ", "AFAFAFAFAFAFA" }, - { " B B B B B B ", "AFAFAFAFAFAFA" }, { "HB B B B B BH", "AFAFAFAFAFAFA" }, - { " B B B B B B ", "AFAFAFAFAFAFA" }, { "AAAAAAAAAAAAA", "AAAAAAAAAAAAA" } })) - .addShape( - STACKABLE_MIDDLE, - transpose( - new String[][] { { "AHFFFFAFFFFHA", "AAAAAAAAAAAAA" }, { " B A B ", "AAAAAAAAAAAAA" }, - { "HB A BH", "AAAAAAAAAAAAA" }, { " B A B ", "AAAAAAAAAAAAA" }, - { " B A B ", "AAAAAAAAAAAAA" }, { " B A B ", "AAAAAAAAAAAAA" }, - { " B A B ", "AAAAAAAAAAAAA" }, { " B A B ", "AAAAAAAAAAAAA" }, - { " B A B ", "AAAAAAAAAAAAA" }, { "HB A BH", "AAAAAAAAAAAAA" }, - { " B A B ", "AAAAAAAAAAAAA" }, { "AAAAAAAAAAAAA", "AAAAAAAAAAAAA" } })) - .addShape( - STACKABLE_START, - transpose( - new String[][] { { "AAAAAAAAAAAAA", "AHFFFFAFFFFHA", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", "HB B B B B BH", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", "HB B B B B BH", "AAAAAAAAAAAAA" }, - { "AFAFAFAFAFAFA", " B B B B B B ", "AAAAAAAAAAAAA" }, - { "AAAAAAAAAAAAA", "AAAAAAAAAAAAA", "AAAAAAAAAAAAA" } })) - .addElement( - 'A', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.Chemical.getCasing())) - .addElement( - 'B', - ofMuTECasings( - FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT | ENERGY_IN, - GT_MultiTileCasing.Distillation.getCasing())) - .addElement('C', ofBlock(GregTechAPI.sBlockCasings4, 1)) - .addElement('D', GTStructureUtility.ofFrame(Materials.Steel)) - .addElement('E', ofMuTECasings(NOTHING, MOTOR_CASINGS)) - .addElement( - 'F', - ofChain( - ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false))) - .addElement('H', ofMuTECasings(NOTHING, HEATER_CASINGS, INSULATOR_CASINGS)) - .addElement('P', ofMuTECasings(NOTHING, AMPERAGE_CASINGS)) - .build(); - } - return STRUCTURE_DEFINITION_MEGA; - } - - public boolean checkMachine() { - stackCount = 0; - resetMucCount(); - - buildState.startBuilding(getStartingStructureOffset()); - if (!checkPiece(STRUCTURE_PIECE_BASE, buildState.getCurrentOffset())) return buildState.failBuilding(); - - buildState.addOffset(getMegaPositionOffset()); - if (!checkPiece(STACKABLE_START, buildState.getCurrentOffset())) { - return buildState.failBuilding(); - } - - buildState.addOffset(getStartingStackOffset()); - for (int i = 0; i < getMaxStacks(); i++) { - if (!checkPiece(getStackableMiddle(i), buildState.getCurrentOffset())) { - break; - } - - buildState.addOffset(getPerStackOffset()); - stackCount++; - } - if (stackCount < getMinStacks()) return buildState.failBuilding(); - - if (!checkPiece(getStackableStop(), buildState.stopBuilding())) { - return buildState.failBuilding(); - } - - calculateTier(); - if (!calculateMucMultipliers()) { - return false; - } - calculateParallels(); - updatePowerLogic(); - return tier > 0; - } - - protected boolean calculateMucMultipliers() { - Map mucMap = getMucMap(); - int[] heaterList = mucMap.get(UpgradeCasings.Heater); - int[] insulatorList = mucMap.get(UpgradeCasings.Insulator); - int totalHeaterCount = Arrays.stream(heaterList) - .sum(); - int totalInsulatorCount = Arrays.stream(insulatorList) - .sum(); - if (totalHeaterCount + totalInsulatorCount < stackCount || totalInsulatorCount > totalHeaterCount) { - return false; - } - if (totalInsulatorCount > 0) { - // To be improved later, when more MUCs are added - // durationMultiplier = 1.0 / totalHeaterCount; - euTickMultiplier = 1.0 / totalInsulatorCount; - } - return true; - } - - @Override - public short getCasingRegistryID() { - return 0; - } - - @Override - public int getCasingMeta() { - return GT_MultiTileCasing.Distillation.getId(); - } - - @Override - protected MultiblockTooltipBuilder createTooltip() { - final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Coke Oven") - .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true) - .addController("Bottom Front Center") - .addCasingInfoExactly("Test Casing", 60, false) - .addEnergyHatch("Any bottom layer casing") - .addInputHatch("Any non-optional external facing casing on the stacks") - .addInputBus("Any non-optional external facing casing on the stacks") - .addOutputHatch("Any non-optional external facing casing on the stacks") - .addOutputBus("Any non-optional external facing casing on the stacks") - .addStructureInfo( - String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks())) - .toolTipFinisher(); - return tt; - } - - @Override - public int getMinStacks() { - return 0; - } - - @Override - public int getMaxStacks() { - return 20; - } - - public Vec3Impl getMegaPositionOffset() { - return STRUCTURE_OFFSET_MEGA_POSITION; - } - - @Override - public Vec3Impl getStartingStackOffset() { - return STRUCTURE_OFFSET_MEGA_START; - } - - @Override - public Vec3Impl getPerStackOffset() { - return STRUCTURE_OFFSET_MEGA_STACK; - } - - @Override - public Vec3Impl getAfterLastStackOffset() { - return STRUCTURE_OFFSET_MEGA_STOP; - } - - @SideOnly(Side.CLIENT) - @Override - protected ResourceLocation getActivitySoundLoop() { - return SoundResource.IC2_MACHINES_MACERATOR_OP.resourceLocation; - } - - @Override - @Nonnull - protected LayeredCokeBatteryProcessingLogic createProcessingLogic() { - return new LayeredCokeBatteryProcessingLogic(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/Macerator.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/Macerator.java deleted file mode 100644 index e7791efb7f1..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/Macerator.java +++ /dev/null @@ -1,130 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ENERGY_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_OUT; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_IN; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_OUT; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.NOTHING; -import static gregtech.api.util.GT_StructureUtilityMuTE.*; - -import javax.annotation.Nonnull; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.util.Vec3Impl; - -import gregtech.api.multitileentity.enums.GT_MultiTileCasing; -import gregtech.api.multitileentity.multiblock.base.StackableController; -import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.tileentities.machines.multiblock.logic.MaceratorProcessingLogic; - -public class Macerator extends StackableController { - - private static IStructureDefinition STRUCTURE_DEFINITION = null; - - public Macerator() { - super(); - } - - @Override - public String getTileEntityName() { - return "gt.multitileentity.multiblock.macerator"; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape( - STACKABLE_STOP, - transpose(new String[][] { { " CCC ", "CCCCC", "CCCCC", "CCCCC", " CCC " }, })) - .addShape( - STACKABLE_MIDDLE, - transpose(new String[][] { { " BBB ", " B---B ", "DC---CD", " B---B ", " BBB " }, })) - .addShape( - STACKABLE_START, - transpose(new String[][] { { " G~F ", "AAAAA", "AAAAA", "AAAAA", " AAA " }, })) - .addElement('A', ofMuTECasings(ENERGY_IN, GT_MultiTileCasing.Macerator.getCasing())) - .addElement( - 'B', - ofMuTECasings(FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT, GT_MultiTileCasing.Macerator.getCasing())) - .addElement('C', ofMuTECasings(NOTHING, GT_MultiTileCasing.Macerator.getCasing())) - .addElement('D', ofMuTECasings(NOTHING, GT_MultiTileCasing.Macerator.getCasing())) - .addElement('F', ofMuTECasings(NOTHING, MOTOR_CASINGS)) - .addElement('G', ofMuTECasings(NOTHING, INVENTORY_CASINGS)) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public short getCasingRegistryID() { - return 0; - } - - @Override - public int getCasingMeta() { - return 18000; - } - - @Override - public boolean hasTop() { - return true; - } - - @Override - protected MultiblockTooltipBuilder createTooltip() { - final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Macerator") - .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true) - .addController("Bottom Front Center") - .addCasingInfoExactly("Test Casing", 60, false) - .addEnergyHatch("Any bottom layer casing") - .addInputHatch("Any non-optional external facing casing on the stacks") - .addInputBus("Any non-optional external facing casing on the stacks") - .addOutputHatch("Any non-optional external facing casing on the stacks") - .addOutputBus("Any non-optional external facing casing on the stacks") - .addStructureInfo( - String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks())) - .toolTipFinisher(); - return tt; - } - - @Override - public int getMinStacks() { - return 1; - } - - @Override - public int getMaxStacks() { - return 10; - } - - @Override - public Vec3Impl getStartingStructureOffset() { - return new Vec3Impl(2, 0, 0); - } - - @Override - public Vec3Impl getStartingStackOffset() { - return new Vec3Impl(1, 1, 0); - } - - @Override - public Vec3Impl getPerStackOffset() { - return new Vec3Impl(0, 1, 0); - } - - @Override - public Vec3Impl getAfterLastStackOffset() { - return new Vec3Impl(-1, 0, 0); - } - - @Override - @Nonnull - protected MaceratorProcessingLogic createProcessingLogic() { - return new MaceratorProcessingLogic(); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/AdvChemicalProcessorProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/AdvChemicalProcessorProcessingLogic.java deleted file mode 100644 index 59879e30c74..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/AdvChemicalProcessorProcessingLogic.java +++ /dev/null @@ -1,12 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock.logic; - -import gregtech.api.logic.ComplexParallelProcessingLogic; -import gregtech.api.recipe.RecipeMaps; - -public class AdvChemicalProcessorProcessingLogic - extends ComplexParallelProcessingLogic { - - public AdvChemicalProcessorProcessingLogic() { - setRecipeMap(RecipeMaps.multiblockChemicalReactorRecipes); - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java deleted file mode 100644 index 46e5cab9f06..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java +++ /dev/null @@ -1,69 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock.logic; - -import static gregtech.api.enums.Mods.Railcraft; -import static net.minecraftforge.oredict.OreDictionary.getOreID; -import static net.minecraftforge.oredict.OreDictionary.getOreIDs; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import gregtech.api.logic.FluidInventoryLogic; -import gregtech.api.logic.ItemInventoryLogic; -import gregtech.api.logic.MuTEProcessingLogic; -import gregtech.api.recipe.RecipeMap; -import gregtech.api.util.GTModHandler; -import gregtech.api.util.GTOreDictUnificator; - -public class CokeOvenProcessingLogic extends MuTEProcessingLogic { - - private static final int NORMAL_RECIPE_TIME = 1800; - private static final int WOOD_ORE_ID = getOreID("logWood"); - private static final int COAL_ORE_ID = getOreID("coal"); - private static final int COAL_BLOCK_ORE_ID = getOreID("blockCoal"); - private static final int SUGARCANE_ORE_ID = getOreID("sugarcane"); - private static final int CACTUS_ORE_ID = getOreID("blockCactus"); - private static final int CACTUS_CHARCOAL_ORE_ID = getOreID("itemCharcoalCactus"); - private static final int SUGAR_CHARCOAL_ORE_ID = getOreID("itemCharcoalSugar"); - private int timeMultiplier = 1; - - @Nonnull - @Override - protected Object findRecipe(@Nullable RecipeMap map, @Nonnull ItemInventoryLogic itemInput, - @Nonnull FluidInventoryLogic fluidInput) { - for (ItemStack item : itemInput.getStoredItems()) { - ItemStack output = findRecipe(item); - if (output != null) { - ItemStack input = item.copy(); - input.stackSize = 1; - return null; - } - } - return null; - } - - @Nullable - private ItemStack findRecipe(@Nonnull ItemStack input) { - for (int oreId : getOreIDs(input)) { - if (oreId == COAL_ORE_ID) { - return GTOreDictUnificator.get("fuelCoke", null, 1); - } else if (oreId == COAL_BLOCK_ORE_ID) { - timeMultiplier = 9; - return GTModHandler.getModItem(Railcraft.ID, "cube", 1, 0); - } else if (oreId == WOOD_ORE_ID) { - return new ItemStack(Items.coal, 1, 1); - } else if (oreId == SUGARCANE_ORE_ID) { - return GTOreDictUnificator.get("itemCharcoalSugar", null, 1); - } else if (oreId == SUGAR_CHARCOAL_ORE_ID) { - return GTOreDictUnificator.get("itemCokeSugar", null, 1); - } else if (oreId == CACTUS_ORE_ID) { - return GTOreDictUnificator.get("itemCharcoalCactus", null, 1); - } else if (oreId == CACTUS_CHARCOAL_ORE_ID) { - return GTOreDictUnificator.get("itemCokeCactus", null, 1); - } - } - return null; - } -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/DistillationTowerProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/DistillationTowerProcessingLogic.java deleted file mode 100644 index 6f27c9a0e64..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/DistillationTowerProcessingLogic.java +++ /dev/null @@ -1,7 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock.logic; - -import gregtech.api.logic.ComplexParallelProcessingLogic; - -public class DistillationTowerProcessingLogic extends ComplexParallelProcessingLogic { - -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/LaserEngraverProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/LaserEngraverProcessingLogic.java deleted file mode 100644 index 3f4a6bfe70b..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/LaserEngraverProcessingLogic.java +++ /dev/null @@ -1,7 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock.logic; - -import gregtech.api.logic.ComplexParallelProcessingLogic; - -public class LaserEngraverProcessingLogic extends ComplexParallelProcessingLogic { - -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/LayeredCokeBatteryProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/LayeredCokeBatteryProcessingLogic.java deleted file mode 100644 index b2e43b6fa9c..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/LayeredCokeBatteryProcessingLogic.java +++ /dev/null @@ -1,7 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock.logic; - -import gregtech.api.logic.MuTEProcessingLogic; - -public class LayeredCokeBatteryProcessingLogic extends MuTEProcessingLogic { - -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/MaceratorProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/MaceratorProcessingLogic.java deleted file mode 100644 index 3f7d8a25f7b..00000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/MaceratorProcessingLogic.java +++ /dev/null @@ -1,7 +0,0 @@ -package gregtech.common.tileentities.machines.multiblock.logic; - -import gregtech.api.logic.MuTEProcessingLogic; - -public class MaceratorProcessingLogic extends MuTEProcessingLogic { - -} diff --git a/src/main/java/gregtech/crossmod/waila/Waila.java b/src/main/java/gregtech/crossmod/waila/Waila.java index 50b2b5cb576..9a938d14f4d 100644 --- a/src/main/java/gregtech/crossmod/waila/Waila.java +++ b/src/main/java/gregtech/crossmod/waila/Waila.java @@ -4,7 +4,6 @@ import gregtech.api.enums.Mods; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.multitileentity.base.MultiTileEntity; import mcp.mobius.waila.api.IWailaDataProvider; import mcp.mobius.waila.api.IWailaRegistrar; @@ -15,15 +14,12 @@ public static void callbackRegister(IWailaRegistrar register) { register.registerBodyProvider(multiBlockProvider, BaseMetaTileEntity.class); register.registerBodyProvider(multiBlockProvider, BaseMetaPipeEntity.class); - register.registerBodyProvider(multiBlockProvider, MultiTileEntity.class); register.registerNBTProvider(multiBlockProvider, BaseMetaTileEntity.class); register.registerNBTProvider(multiBlockProvider, BaseMetaPipeEntity.class); - register.registerNBTProvider(multiBlockProvider, MultiTileEntity.class); register.registerTailProvider(multiBlockProvider, BaseMetaTileEntity.class); register.registerTailProvider(multiBlockProvider, BaseMetaPipeEntity.class); - register.registerTailProvider(multiBlockProvider, MultiTileEntity.class); } public static void init() { diff --git a/src/main/java/gregtech/loaders/postload/GTPostLoad.java b/src/main/java/gregtech/loaders/postload/GTPostLoad.java index d30ed643f29..15dc2530af1 100644 --- a/src/main/java/gregtech/loaders/postload/GTPostLoad.java +++ b/src/main/java/gregtech/loaders/postload/GTPostLoad.java @@ -362,42 +362,17 @@ public static void addFakeRecipes() { .addTo(rockBreakerFakeRecipes); } - public static void nerfVanillaTools() { - if (!GTMod.gregtechproxy.mNerfedVanillaTools) { + public static void changeWoodenVanillaTools() { + if (!GTMod.gregtechproxy.mChangeWoodenVanillaTools) { return; } - GTLog.out.println("GTMod: Nerfing Vanilla Tool Durability"); - Items.wooden_sword.setMaxDamage(12); - Items.wooden_pickaxe.setMaxDamage(12); - Items.wooden_shovel.setMaxDamage(12); - Items.wooden_axe.setMaxDamage(12); - Items.wooden_hoe.setMaxDamage(12); - - Items.stone_sword.setMaxDamage(48); - Items.stone_pickaxe.setMaxDamage(48); - Items.stone_shovel.setMaxDamage(48); - Items.stone_axe.setMaxDamage(48); - Items.stone_hoe.setMaxDamage(48); - - Items.iron_sword.setMaxDamage(256); - Items.iron_pickaxe.setMaxDamage(256); - Items.iron_shovel.setMaxDamage(256); - Items.iron_axe.setMaxDamage(256); - Items.iron_hoe.setMaxDamage(256); - - Items.golden_sword.setMaxDamage(24); - Items.golden_pickaxe.setMaxDamage(24); - Items.golden_shovel.setMaxDamage(24); - Items.golden_axe.setMaxDamage(24); - Items.golden_hoe.setMaxDamage(24); - - Items.diamond_sword.setMaxDamage(768); - Items.diamond_pickaxe.setMaxDamage(768); - Items.diamond_shovel.setMaxDamage(768); - Items.diamond_axe.setMaxDamage(768); - Items.diamond_hoe.setMaxDamage(768); - + GTLog.out.println("GTMod: Updating Vanilla Wooden Tools"); + Items.wooden_sword.setMaxDamage(64); + Items.wooden_pickaxe.setMaxDamage(64); + Items.wooden_shovel.setMaxDamage(64); + Items.wooden_axe.setMaxDamage(64); + Items.wooden_hoe.setMaxDamage(64); } public static void replaceVanillaMaterials() { diff --git a/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java index 06ac7f0692b..fb11527d449 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java @@ -7,7 +7,6 @@ import static gregtech.api.enums.Mods.Forestry; import static gregtech.api.enums.Mods.GalacticraftCore; import static gregtech.api.enums.Mods.GalacticraftMars; -import static gregtech.api.enums.Mods.GalaxySpace; import static gregtech.api.enums.Mods.IC2NuclearControl; import static gregtech.api.enums.Mods.IronChests; import static gregtech.api.enums.Mods.IronTanks; @@ -32,10 +31,9 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import bartworks.common.loaders.ItemRegistry; +import bartworks.system.material.WerkstoffLoader; import gregtech.GTMod; import gregtech.api.enums.Dyes; import gregtech.api.enums.GTValues; @@ -60,7 +58,6 @@ public void run() { this.withBartWorks(); this.withGalacticraftMars(); this.withRailcraft(); - this.withGalaxySpace(); this.withGTNHLanthAndGTPP(); this.loadInputBusesRecipes(); this.loadInputHatchesRecipes(); @@ -1908,6 +1905,117 @@ public void run() { .eut(TierEU.RECIPE_UHV) .addTo(assemblerRecipes); + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 2), + ItemList.Electric_Pump_MV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 3)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(2000)) + .duration(16 * SECONDS) + .eut(TierEU.RECIPE_MV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titaniumonabariumdecacoppereikosaoxid, 6), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Titanium, 4), + ItemList.Electric_Pump_HV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 6)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(4000)) + .duration(16 * SECONDS) + .eut(TierEU.RECIPE_HV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Uraniumtriplatinid, 9), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.TungstenSteel, 6), + ItemList.Electric_Pump_EV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 9)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(6000)) + .duration(16 * SECONDS) + .eut(TierEU.RECIPE_EV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Vanadiumtriindinid, 12), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 8), + ItemList.Electric_Pump_IV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 12)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(8000)) + .duration(32 * SECONDS) + .eut(TierEU.RECIPE_IV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get( + OrePrefixes.wireGt01, + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 15), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Enderium, 10), + ItemList.Electric_Pump_LuV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 15)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(12000)) + .duration(32 * SECONDS) + .eut(TierEU.RECIPE_LuV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 18), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Naquadah, 12), + ItemList.Electric_Pump_ZPM.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 18)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(16000)) + .duration(1 * MINUTES + 4 * SECONDS) + .eut(TierEU.RECIPE_ZPM) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuvwire, 21), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Neutronium, 14), + ItemList.Electric_Pump_UV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 21)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(20000)) + .duration(1 * MINUTES + 4 * SECONDS) + .eut(TierEU.RECIPE_UV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuhvwire, 24), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Bedrockium, 16), + ItemList.Electric_Pump_UHV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 24)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(24000)) + .duration(2 * MINUTES + 8 * SECONDS) + .eut(TierEU.RECIPE_UHV) + .addTo(assemblerRecipes); + + GTValues.RA.stdBuilder() + .itemInputs( + GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEVBase, 27), + GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Infinity, 18), + ItemList.Electric_Pump_UEV.get(1), + GTUtility.getIntegratedCircuit(9)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEV, 27)) + .fluidInputs(WerkstoffLoader.LiquidHelium.getFluidOrGas(28000)) + .duration(2 * MINUTES + 40 * SECONDS) + .eut(TierEU.RECIPE_UEV) + .addTo(assemblerRecipes); + GTValues.RA.stdBuilder() .itemInputs( GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3), @@ -6815,123 +6923,6 @@ public void withGalacticraftMars() { .addTo(assemblerRecipes); } - public void withGalaxySpace() { - if (!GalaxySpace.isModLoaded()) { - return; - } - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 2), - ItemList.Electric_Pump_MV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 3)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 2000)) - .duration(16 * SECONDS) - .eut(TierEU.RECIPE_MV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titaniumonabariumdecacoppereikosaoxid, 6), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Titanium, 4), - ItemList.Electric_Pump_HV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 6)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 4000)) - .duration(16 * SECONDS) - .eut(TierEU.RECIPE_HV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Uraniumtriplatinid, 9), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.TungstenSteel, 6), - ItemList.Electric_Pump_EV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 9)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 6000)) - .duration(16 * SECONDS) - .eut(TierEU.RECIPE_EV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Vanadiumtriindinid, 12), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 8), - ItemList.Electric_Pump_IV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 12)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 8000)) - .duration(32 * SECONDS) - .eut(TierEU.RECIPE_IV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get( - OrePrefixes.wireGt01, - Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, - 15), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Enderium, 10), - ItemList.Electric_Pump_LuV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 15)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 12000)) - .duration(32 * SECONDS) - .eut(TierEU.RECIPE_LuV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 18), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Naquadah, 12), - ItemList.Electric_Pump_ZPM.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 18)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 16000)) - .duration(1 * MINUTES + 4 * SECONDS) - .eut(TierEU.RECIPE_ZPM) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuvwire, 21), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Neutronium, 14), - ItemList.Electric_Pump_UV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 21)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 20000)) - .duration(1 * MINUTES + 4 * SECONDS) - .eut(TierEU.RECIPE_UV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuhvwire, 24), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Bedrockium, 16), - ItemList.Electric_Pump_UHV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 24)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 24000)) - .duration(2 * MINUTES + 8 * SECONDS) - .eut(TierEU.RECIPE_UHV) - .addTo(assemblerRecipes); - - GTValues.RA.stdBuilder() - .itemInputs( - GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEVBase, 27), - GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Infinity, 18), - ItemList.Electric_Pump_UEV.get(1), - GTUtility.getIntegratedCircuit(9)) - .itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEV, 27)) - .fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 28000)) - .duration(2 * MINUTES + 40 * SECONDS) - .eut(TierEU.RECIPE_UEV) - .addTo(assemblerRecipes); - } - public void withGTNHLanthAndGTPP() { GTValues.RA.stdBuilder() diff --git a/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java index 0dd99356ec3..80a35f1da03 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ImplosionCompressorRecipes.java @@ -13,7 +13,6 @@ import gregtech.api.enums.TierEU; import gregtech.api.util.GTOreDictUnificator; import gregtech.api.util.GTRecipeConstants; -import gtnhlanth.common.register.WerkstoffMaterialPool; public class ImplosionCompressorRecipes implements Runnable { @@ -39,16 +38,6 @@ public void run() { .eut(TierEU.RECIPE_LV) .addTo(implosionRecipes); - GTValues.RA.stdBuilder() - .itemInputs(WerkstoffMaterialPool.LanthanumHexaboride.get(OrePrefixes.dust, 4)) - .itemOutputs( - WerkstoffMaterialPool.LanthanumHexaboride.get(OrePrefixes.gem, 3), - GTOreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 12L)) - .metadata(GTRecipeConstants.ADDITIVE_AMOUNT, 4) - .duration(1 * SECONDS) - .eut(TierEU.RECIPE_LV) - .addTo(implosionRecipes); - if (GalacticraftMars.isModLoaded()) { GTValues.RA.stdBuilder() diff --git a/src/main/java/gregtech/loaders/preload/GTPreLoad.java b/src/main/java/gregtech/loaders/preload/GTPreLoad.java index 929660c0b71..f884ddcfecc 100644 --- a/src/main/java/gregtech/loaders/preload/GTPreLoad.java +++ b/src/main/java/gregtech/loaders/preload/GTPreLoad.java @@ -378,7 +378,7 @@ public static void loadConfig() { GTMod.gregtechproxy.mGTBees = Gregtech.general.GTBees; GTMod.gregtechproxy.mCraftingUnification = Gregtech.general.craftingUnification; GTMod.gregtechproxy.mNerfedWoodPlank = Gregtech.general.nerfedWoodPlank; - GTMod.gregtechproxy.mNerfedVanillaTools = Gregtech.general.nerfedVanillaTools; + GTMod.gregtechproxy.mChangeWoodenVanillaTools = Gregtech.general.changedWoodenVanillaTools; GTMod.gregtechproxy.mAchievements = Gregtech.general.achievements; GTMod.gregtechproxy.mHideUnusedOres = Gregtech.general.hideUnusedOres; GTMod.gregtechproxy.mEnableAllMaterials = Gregtech.general.enableAllMaterials; @@ -416,8 +416,6 @@ public static void loadConfig() { GTValues.alwaysReloadChunkloaders = Gregtech.machines.alwaysReloadChunkloaders; GTValues.debugChunkloaders = Gregtech.debug.debugChunkloaders; GTValues.disableDigitalChestsExternalAccess = Gregtech.machines.disableDigitalChestsExternalAccess; - GTValues.enableMultiTileEntities = Gregtech.machines.enableMultiTileEntities - || (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); GregTechAPI.sMachineExplosions = Gregtech.machines.machineExplosions; GregTechAPI.sMachineFlammable = Gregtech.machines.machineFlammable; GregTechAPI.sMachineNonWrenchExplosions = Gregtech.machines.machineNonWrenchExplosions; diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java deleted file mode 100644 index 9b89ce9176a..00000000000 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java +++ /dev/null @@ -1,1277 +0,0 @@ -package gregtech.loaders.preload; - -import static gregtech.GTMod.GT_FML_LOGGER; -import static gregtech.api.multitileentity.enums.GT_MultiTileCasing.*; -import static gregtech.api.multitileentity.enums.GT_MultiTileComponentCasing.*; -import static gregtech.api.multitileentity.enums.GT_MultiTileUpgradeCasing.*; -import static gregtech.api.multitileentity.enums.GT_MultiTileUpgradeCasing.Insulator_OmegaType; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -import gregtech.api.enums.Materials; -import gregtech.api.multitileentity.MultiTileEntityBlock; -import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.multiblock.base.WallShareablePart; -import gregtech.api.multitileentity.multiblock.casing.BasicCasing; -import gregtech.common.tileentities.casings.functional.Conveyor; -import gregtech.common.tileentities.casings.functional.Emitter; -import gregtech.common.tileentities.casings.functional.FieldGenerator; -import gregtech.common.tileentities.casings.functional.Motor; -import gregtech.common.tileentities.casings.functional.Piston; -import gregtech.common.tileentities.casings.functional.Pump; -import gregtech.common.tileentities.casings.functional.RobotArm; -import gregtech.common.tileentities.casings.functional.Sensor; -import gregtech.common.tileentities.casings.upgrade.Ampere; -import gregtech.common.tileentities.casings.upgrade.Cleanroom; -import gregtech.common.tileentities.casings.upgrade.Heater; -import gregtech.common.tileentities.casings.upgrade.Insulator; -import gregtech.common.tileentities.casings.upgrade.Inventory; -import gregtech.common.tileentities.casings.upgrade.Laser; -import gregtech.common.tileentities.casings.upgrade.Tank; -import gregtech.common.tileentities.casings.upgrade.Wireless; -import gregtech.common.tileentities.machines.multiblock.AdvChemicalProcessor; -import gregtech.common.tileentities.machines.multiblock.CokeOven; -import gregtech.common.tileentities.machines.multiblock.DistillationTower; -import gregtech.common.tileentities.machines.multiblock.LaserEngraver; -import gregtech.common.tileentities.machines.multiblock.LayeredCokeBattery; -import gregtech.common.tileentities.machines.multiblock.Macerator; - -public class GT_Loader_MultiTileEntities implements Runnable { - - // MuTE Registry Names - public static final String COMPONENT_CASING_REGISTRY_NAME = "gt.multitileentity.component.casings"; - public static final String UPGRADE_CASING_REGISTRY_NAME = "gt.multitileentity.upgrade.casings"; - public static final String CASING_REGISTRY_NAME = "gt.multitileentity.casings"; - public static final String MACHINE_REGISTRY_NAME = "gt.multitileentity.controllers"; - - // MuTE Registries - public static final MultiTileEntityRegistry MACHINE_REGISTRY = new MultiTileEntityRegistry( - MACHINE_REGISTRY_NAME, - new MultiTileEntityBlock(Material.iron).modID("gregtech") - .materialName("machine") - .tool("wrench") - .sound(Block.soundTypeMetal) - .opaque(true) - .normalCube(true) - .register()); - public static final MultiTileEntityRegistry CASING_REGISTRY = new MultiTileEntityRegistry( - CASING_REGISTRY_NAME, - new MultiTileEntityBlock(Material.iron).modID("gregtech") - .materialName("casing") - .tool("wrench") - .sound(Block.soundTypeMetal) - .opaque(true) - .normalCube(true) - .register()); - public static final MultiTileEntityRegistry COMPONENT_CASING_REGISTRY = new MultiTileEntityRegistry( - COMPONENT_CASING_REGISTRY_NAME, - new MultiTileEntityBlock(Material.iron).modID("gregtech") - .materialName("componentCasing") - .tool("wrench") - .sound(Block.soundTypeMetal) - .opaque(true) - .normalCube(true) - .register()); - public static final MultiTileEntityRegistry UPGRADE_CASING_REGISTRY = new MultiTileEntityRegistry( - UPGRADE_CASING_REGISTRY_NAME, - new MultiTileEntityBlock(Material.iron).modID("gregtech") - .materialName("upgradeCasing") - .tool("wrench") - .sound(Block.soundTypeMetal) - .opaque(true) - .normalCube(true) - .register()); - - @Override - public void run() { - GT_FML_LOGGER.info("GTMod: Registering MultiTileEntities"); - registerMachines(); - registerCasings(); - registerComponentCasings(); - } - - private static void registerMachines() { - // Disable for now - MACHINE_REGISTRY.create(1000, Macerator.class) - .name("Large Macerator") - .category("Multiblock Controller") - .material(Materials.Iron) - .textureFolder("macerator") - .tankCapacity(128000L) - .inputInventorySize(16) - .outputInventorySize(16) - .register(); - MACHINE_REGISTRY.create(0, CokeOven.class) - .name("Coke Oven") - .category("MultiblockController") - .textureFolder("cokeOven") - .inputInventorySize(1) - .outputInventorySize(1) - .register(); - MACHINE_REGISTRY.create(1, AdvChemicalProcessor.class) - .name("Advanced Chemical Processor") - .category("MultiblockController") - // TODO: Texture - .textureFolder("advChemicalProcessor") - .inputInventorySize(16) - .outputInventorySize(16) - .tankCapacity(128000L) - .register(); - MACHINE_REGISTRY.create(2, DistillationTower.class) - .name("Distillation Tower") - .category("MultiblockController") - .textureFolder("distillationTower") - .inputInventorySize(16) - .outputInventorySize(16) - .tankCapacity(128000L) - .register(); - MACHINE_REGISTRY.create(3, LayeredCokeBattery.class) - .name("Layered Coke Battery") - .category("Multiblock Controller") - .material(Materials.Iron) - .textureFolder("macerator") - .tankCapacity(128000L) - .inputInventorySize(16) - .outputInventorySize(16) - .register(); - MACHINE_REGISTRY.create(4, LaserEngraver.class) - .name("Big Laser Engraver") - .category("Multiblock Controller") - .textureFolder("BigLaserEngraver") - .inputInventorySize(16) - .outputInventorySize(16) - .tankCapacity(128000L) - .register(); - } - - private static void registerCasings() { - - CASING_REGISTRY.create(CokeOven.getId(), WallShareablePart.class) - .name("Coke Oven Bricks") - .category("MultiBlock Casing") - .textureFolder("cokeOven") - .register(); - CASING_REGISTRY.create(Chemical.getId(), BasicCasing.class) - .name("Chemical Casing") - .category("MultiBlock Casing") - .textureFolder("advChemicalProcessor") - .register(); - CASING_REGISTRY.create(Distillation.getId(), BasicCasing.class) - .name("Distillation Casing") - .category("MultiBlock Casing") - .textureFolder("distillationTower") - .register(); - CASING_REGISTRY.create(18000, BasicCasing.class) - .name("Test Casing") - .category("Multiblock Casing") - .material(Materials.Cobalt) - .textureFolder("macerator") - .register(); - CASING_REGISTRY.create(LaserEngraver.getId(), BasicCasing.class) - .name("Laser Engraver Casing") - .category("MultiBlock Casing") - .textureFolder("BigLaserEngraver") - .register(); - CASING_REGISTRY.create(Mirror.getId(), BasicCasing.class) - .name("Mirror") - .category("MultiBlock Casing") - .textureFolder("Laserblock") - .register(); - CASING_REGISTRY.create(BlackLaserEngraverCasing.getId(), BasicCasing.class) - .name("Black Laser Engraver Casing") - .category("MultiBlock Casing") - .textureFolder("BlackLaserEngraver") - .register(); - CASING_REGISTRY.create(LaserEngraverUpgrade1.getId(), BasicCasing.class) - .name("Crude Laser Engraving Casing") - .category("MultiBlock Casing") - .textureFolder("laserengraverupgrade1") - .register(); - CASING_REGISTRY.create(LaserEngraverUpgrade2.getId(), BasicCasing.class) - .name("Advanced Laser Engraving Casing") - .category("MultiBlock Casing") - .textureFolder("laserengraverupgrade2") - .register(); - CASING_REGISTRY.create(LaserEngraverUpgrade3.getId(), BasicCasing.class) - .name("Ultimate Laser Engraving Casing") - .category("MultiBlock Casing") - .textureFolder("laserengraverupgrade3") - .register(); - CASING_REGISTRY.create(LaserEngraverUpgrade4.getId(), BasicCasing.class) - .name("Superb Laser Engraving Casing") - .category("MultiBlock Casing") - .textureFolder("laserengraverupgrade4") - .register(); - - } - - private static void registerComponentCasings() { - - registerMotorCasings(); - registerPumpCasings(); - registerPistonCasings(); - registerRobotArmCasings(); - registerConveyorCasings(); - registerEmitterCasings(); - registerSensorCasings(); - registerFieldGeneratorCasings(); - - UPGRADE_CASING_REGISTRY.create(ULV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade ULV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(1) - .tier(0) - .register(); - UPGRADE_CASING_REGISTRY.create(LV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade LV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(4) - .tier(1) - .register(); - UPGRADE_CASING_REGISTRY.create(MV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade MV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(8) - .tier(2) - .register(); - UPGRADE_CASING_REGISTRY.create(HV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade HV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(16) - .tier(3) - .register(); - UPGRADE_CASING_REGISTRY.create(EV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade EV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(32) - .tier(4) - .register(); - UPGRADE_CASING_REGISTRY.create(IV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade IV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(64) - .tier(5) - .register(); - UPGRADE_CASING_REGISTRY.create(LuV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade LuV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(128) - .tier(6) - .register(); - UPGRADE_CASING_REGISTRY.create(ZPM_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade ZPM") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(7) - .register(); - UPGRADE_CASING_REGISTRY.create(UV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade UV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(8) - .register(); - UPGRADE_CASING_REGISTRY.create(UHV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade UHV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(9) - .register(); - UPGRADE_CASING_REGISTRY.create(UEV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade UEV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(10) - .register(); - UPGRADE_CASING_REGISTRY.create(UIV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade UIV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(11) - .register(); - UPGRADE_CASING_REGISTRY.create(UMV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade UMV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(12) - .register(); - UPGRADE_CASING_REGISTRY.create(UXV_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade UXV") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(13) - .register(); - UPGRADE_CASING_REGISTRY.create(MAX_Inventory.getId(), Inventory.class) - .name("Inventory Upgrade MAX") - .category("MultiBlock Upgrade Casing") - .textureFolder("inventory") - .upgradeInventorySize(256) - .tier(14) - .register(); - - UPGRADE_CASING_REGISTRY.create(ULV_Tank.getId(), Tank.class) - .name("Tank Upgrade ULV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(8_000L) - .upgradeTankCount(1) - .tier(0) - .register(); - UPGRADE_CASING_REGISTRY.create(LV_Tank.getId(), Tank.class) - .name("Tank Upgrade LV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(16_000L) - .upgradeTankCount(2) - .tier(1) - .register(); - UPGRADE_CASING_REGISTRY.create(MV_Tank.getId(), Tank.class) - .name("Tank Upgrade MV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(32_000L) - .upgradeTankCount(4) - .tier(2) - .register(); - UPGRADE_CASING_REGISTRY.create(HV_Tank.getId(), Tank.class) - .name("Tank Upgrade HV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(64_000L) - .upgradeTankCount(6) - .tier(3) - .register(); - UPGRADE_CASING_REGISTRY.create(EV_Tank.getId(), Tank.class) - .name("Tank Upgrade EV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(128_000L) - .upgradeTankCount(8) - .tier(4) - .register(); - UPGRADE_CASING_REGISTRY.create(IV_Tank.getId(), Tank.class) - .name("Tank Upgrade IV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(256_000L) - .upgradeTankCount(10) - .tier(5) - .register(); - UPGRADE_CASING_REGISTRY.create(LuV_Tank.getId(), Tank.class) - .name("Tank Upgrade LuV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(512_000L) - .upgradeTankCount(12) - .tier(6) - .register(); - UPGRADE_CASING_REGISTRY.create(ZPM_Tank.getId(), Tank.class) - .name("Tank Upgrade ZPM") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(1_024_000L) - .upgradeTankCount(14) - .tier(7) - .register(); - UPGRADE_CASING_REGISTRY.create(UV_Tank.getId(), Tank.class) - .name("Tank Upgrade UV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(2_048_000L) - .upgradeTankCount(16) - .tier(8) - .register(); - UPGRADE_CASING_REGISTRY.create(UHV_Tank.getId(), Tank.class) - .name("Tank Upgrade UHV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(4_096_000L) - .upgradeTankCount(16) - .tier(9) - .register(); - UPGRADE_CASING_REGISTRY.create(UEV_Tank.getId(), Tank.class) - .name("Tank Upgrade UEV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(8_192_000L) - .upgradeTankCount(16) - .tier(10) - .register(); - UPGRADE_CASING_REGISTRY.create(UIV_Tank.getId(), Tank.class) - .name("Tank Upgrade UIV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(16_384_000L) - .upgradeTankCount(16) - .tier(11) - .register(); - UPGRADE_CASING_REGISTRY.create(UMV_Tank.getId(), Tank.class) - .name("Tank Upgrade UMV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(32_768_000L) - .upgradeTankCount(16) - .tier(12) - .register(); - UPGRADE_CASING_REGISTRY.create(UXV_Tank.getId(), Tank.class) - .name("Tank Upgrade UXV") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(65_536_000L) - .upgradeTankCount(16) - .tier(13) - .register(); - UPGRADE_CASING_REGISTRY.create(MAX_Tank.getId(), Tank.class) - .name("Tank Upgrade MAX") - .category("MultiBlock Upgrade Casing") - .textureFolder("tank") - .upgradeTankCapacity(131_072_000L) - .upgradeTankCount(16) - .tier(14) - .register(); - - UPGRADE_CASING_REGISTRY.create(Amp_4.getId(), Ampere.class) - .name("Amperage Upgrade (4 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(4) - .tier(1) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_16.getId(), Ampere.class) - .name("Amperage Upgrade (16 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(16) - .tier(2) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_64.getId(), Ampere.class) - .name("Amperage Upgrade (64 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(64) - .tier(3) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_256.getId(), Ampere.class) - .name("Amperage Upgrade (256 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(256) - .tier(4) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_1_024.getId(), Ampere.class) - .name("Amperage Upgrade (1,024 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(1_024) - .tier(5) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_4_096.getId(), Ampere.class) - .name("Amperage Upgrade (4,096 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(4_096) - .tier(6) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_16_384.getId(), Ampere.class) - .name("Amperage Upgrade (16,384 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(16_384) - .tier(7) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_65_536.getId(), Ampere.class) - .name("Amperage Upgrade (65,536 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(65_536) - .tier(8) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_262_144.getId(), Ampere.class) - .name("Amperage Upgrade (262,144 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(262_144) - .tier(9) - .register(); - UPGRADE_CASING_REGISTRY.create(Amp_1_048_576.getId(), Ampere.class) - .name("Amperage Upgrade (1,048,576 A)") - .category("MultiBlock Upgrade Casing") - .textureFolder("amperage") - .upgradeAmperage(1_048_576) - .tier(10) - .register(); - - UPGRADE_CASING_REGISTRY.create(Cleanroom.getId(), Cleanroom.class) - .name("Cleanroom Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("cleanroom") - .tier(1) - .register(); - UPGRADE_CASING_REGISTRY.create(Laser.getId(), Laser.class) - .name("Laser Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("laser") - .tier(8) - .register(); - UPGRADE_CASING_REGISTRY.create(Wireless.getId(), Wireless.class) - .name("Wireless Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("wireless") - .tier(11) - .register(); - - UPGRADE_CASING_REGISTRY.create(Heater_Prototype.getId(), Heater.class) - .name("Prototype Heater Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("heater") - .tier(1) - .register(); - UPGRADE_CASING_REGISTRY.create(Heater_IndustrialGrade.getId(), Heater.class) - .name("Industrial-Grade Heater Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("heater") - .tier(4) - .register(); - UPGRADE_CASING_REGISTRY.create(Heater_NextGen.getId(), Heater.class) - .name("Next-Gen Heater Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("heater") - .tier(7) - .register(); - UPGRADE_CASING_REGISTRY.create(Heater_Omnipotent.getId(), Heater.class) - .name("Omnipotent Heater Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("heater") - .tier(10) - .register(); - UPGRADE_CASING_REGISTRY.create(Heater_OmegaType.getId(), Heater.class) - .name("OMEGA-Type Heater Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("heater") - .tier(12) - .register(); - - UPGRADE_CASING_REGISTRY.create(Insulator_Prototype.getId(), Insulator.class) - .name("Prototype Insulator Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("insulator") - .tier(1) - .register(); - UPGRADE_CASING_REGISTRY.create(Insulator_IndustrialGrade.getId(), Insulator.class) - .name("Industrial-Grade Insulator Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("insulator") - .tier(4) - .register(); - UPGRADE_CASING_REGISTRY.create(Insulator_NextGen.getId(), Insulator.class) - .name("Next-Gen Insulator Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("insulator") - .tier(7) - .register(); - UPGRADE_CASING_REGISTRY.create(Insulator_Omnipotent.getId(), Insulator.class) - .name("Omnipotent Insulator Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("insulator") - .tier(10) - .register(); - UPGRADE_CASING_REGISTRY.create(Insulator_OmegaType.getId(), Insulator.class) - .name("OMEGA-Type Insulator Upgrade") - .category("MultiBlock Upgrade Casing") - .textureFolder("insulator") - .tier(12) - .register(); - } - - private static void registerMotorCasings() { - COMPONENT_CASING_REGISTRY.create(LV_Motor.getId(), Motor.class) - .name("Motor Casing LV") - .tier(1) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_Motor.getId(), Motor.class) - .name("Motor Casing MV") - .tier(2) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_Motor.getId(), Motor.class) - .name("Motor Casing HV") - .tier(3) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_Motor.getId(), Motor.class) - .name("Motor Casing EV") - .tier(4) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_Motor.getId(), Motor.class) - .name("Motor Casing IV") - .tier(5) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_Motor.getId(), Motor.class) - .name("Motor Casing LuV") - .tier(6) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_Motor.getId(), Motor.class) - .name("Motor Casing ZPM") - .tier(7) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_Motor.getId(), Motor.class) - .name("Motor Casing UV") - .tier(8) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_Motor.getId(), Motor.class) - .name("Motor Casing UHV") - .tier(9) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_Motor.getId(), Motor.class) - .name("Motor Casing UEV") - .tier(10) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_Motor.getId(), Motor.class) - .name("Motor Casing UIV") - .tier(11) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_Motor.getId(), Motor.class) - .name("Motor Casing UMV") - .tier(12) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_Motor.getId(), Motor.class) - .name("Motor Casing UXV") - .tier(13) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_Motor.getId(), Motor.class) - .name("Motor Casing MAX") - .tier(14) - .category("MultiBlock Functional Casing") - .textureFolder("motor") - .register(); - } - - private static void registerPumpCasings() { - COMPONENT_CASING_REGISTRY.create(LV_Pump.getId(), Pump.class) - .name("Pump Casing LV") - .tier(1) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_Pump.getId(), Pump.class) - .name("Pump Casing MV") - .tier(2) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_Pump.getId(), Pump.class) - .name("Pump Casing HV") - .tier(3) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_Pump.getId(), Pump.class) - .name("Pump Casing EV") - .tier(4) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_Pump.getId(), Pump.class) - .name("Pump Casing IV") - .tier(5) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_Pump.getId(), Pump.class) - .name("Pump Casing LuV") - .tier(6) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_Pump.getId(), Pump.class) - .name("Pump Casing ZPM") - .tier(7) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_Pump.getId(), Pump.class) - .name("Pump Casing UV") - .tier(8) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_Pump.getId(), Pump.class) - .name("Pump Casing UHV") - .tier(9) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_Pump.getId(), Pump.class) - .name("Pump Casing UEV") - .tier(10) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_Pump.getId(), Pump.class) - .name("Pump Casing UIV") - .tier(11) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_Pump.getId(), Pump.class) - .name("Pump Casing UMV") - .tier(12) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_Pump.getId(), Pump.class) - .name("Pump Casing UXV") - .tier(13) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_Pump.getId(), Pump.class) - .name("Pump Casing MAX") - .tier(14) - .category("MultiBlock Functional Casing") - .textureFolder("pump") - .register(); - } - - private static void registerPistonCasings() { - COMPONENT_CASING_REGISTRY.create(LV_Piston.getId(), Piston.class) - .name("Piston Casing LV") - .tier(1) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_Piston.getId(), Piston.class) - .name("Piston Casing MV") - .tier(2) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_Piston.getId(), Piston.class) - .name("Piston Casing HV") - .tier(3) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_Piston.getId(), Piston.class) - .name("Piston Casing EV") - .tier(4) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_Piston.getId(), Piston.class) - .name("Piston Casing IV") - .tier(5) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_Piston.getId(), Piston.class) - .name("Piston Casing LuV") - .tier(6) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_Piston.getId(), Piston.class) - .name("Piston Casing ZPM") - .tier(7) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_Piston.getId(), Piston.class) - .name("Piston Casing UV") - .tier(8) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_Piston.getId(), Piston.class) - .name("Piston Casing UHV") - .tier(9) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_Piston.getId(), Piston.class) - .name("Piston Casing UEV") - .tier(10) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_Piston.getId(), Piston.class) - .name("Piston Casing UIV") - .tier(11) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_Piston.getId(), Piston.class) - .name("Piston Casing UMV") - .tier(12) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_Piston.getId(), Piston.class) - .name("Piston Casing UXV") - .tier(13) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_Piston.getId(), Piston.class) - .name("Piston Casing MAX") - .tier(14) - .category("MultiBlock Functional Casing") - .textureFolder("piston") - .register(); - } - - private static void registerConveyorCasings() { - COMPONENT_CASING_REGISTRY.create(LV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing LV") - .tier(1) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing MV") - .tier(2) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing HV") - .tier(3) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing EV") - .tier(4) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing IV") - .tier(5) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing LuV") - .tier(6) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing ZPM") - .tier(7) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing UV") - .tier(8) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing UHV") - .tier(9) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing UEV") - .tier(10) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_Conveyor.getId(), Conveyor.class) - .name("Conveyor Casing UIV") - .tier(11) - .category("MultiBlock Structural Casing") - .textureFolder("conveyor") - .register(); - } - - private static void registerRobotArmCasings() { - COMPONENT_CASING_REGISTRY.create(LV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing LV") - .tier(1) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing MV") - .tier(2) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing HV") - .tier(3) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing EV") - .tier(4) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing IV") - .tier(5) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing LuV") - .tier(6) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing ZPM") - .tier(7) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing UV") - .tier(8) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing UHV") - .tier(9) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing UEV") - .tier(10) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing UIV") - .tier(11) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing UMV") - .tier(12) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing UXV") - .tier(13) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_RobotArm.getId(), RobotArm.class) - .name("Robot Arm Casing MAX") - .tier(14) - .category("MultiBlock Functional Casing") - .textureFolder("robotArm") - .register(); - } - - private static void registerSensorCasings() { - COMPONENT_CASING_REGISTRY.create(LV_Sensor.getId(), Sensor.class) - .name("Sensor Casing LV") - .tier(1) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_Sensor.getId(), Sensor.class) - .name("Sensor Casing MV") - .tier(2) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_Sensor.getId(), Sensor.class) - .name("Sensor Casing HV") - .tier(3) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_Sensor.getId(), Sensor.class) - .name("Sensor Casing EV") - .tier(4) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_Sensor.getId(), Sensor.class) - .name("Sensor Casing IV") - .tier(5) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_Sensor.getId(), Sensor.class) - .name("Sensor Casing LuV") - .tier(6) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_Sensor.getId(), Sensor.class) - .name("Sensor Casing ZPM") - .tier(7) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_Sensor.getId(), Sensor.class) - .name("Sensor Casing UV") - .tier(8) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_Sensor.getId(), Sensor.class) - .name("Sensor Casing UHV") - .tier(9) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_Sensor.getId(), Sensor.class) - .name("Sensor Casing UEV") - .tier(10) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_Sensor.getId(), Sensor.class) - .name("Sensor Casing UIV") - .tier(11) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_Sensor.getId(), Sensor.class) - .name("Sensor Casing UMV") - .tier(12) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_Sensor.getId(), Sensor.class) - .name("Sensor Casing UXV") - .tier(13) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_Sensor.getId(), Sensor.class) - .name("Sensor Casing MAX") - .tier(14) - .category("MultiBlock Functional Casing") - .textureFolder("sensor") - .register(); - } - - private static void registerEmitterCasings() { - COMPONENT_CASING_REGISTRY.create(LV_Emitter.getId(), Emitter.class) - .name("Emitter Casing LV") - .tier(1) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_Emitter.getId(), Emitter.class) - .name("Emitter Casing MV") - .tier(2) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_Emitter.getId(), Emitter.class) - .name("Emitter Casing HV") - .tier(3) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_Emitter.getId(), Emitter.class) - .name("Emitter Casing EV") - .tier(4) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_Emitter.getId(), Emitter.class) - .name("Emitter Casing IV") - .tier(5) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_Emitter.getId(), Emitter.class) - .name("Emitter Casing LuV") - .tier(6) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_Emitter.getId(), Emitter.class) - .name("Emitter Casing ZPM") - .tier(7) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_Emitter.getId(), Emitter.class) - .name("Emitter Casing UV") - .tier(8) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_Emitter.getId(), Emitter.class) - .name("Emitter Casing UHV") - .tier(9) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_Emitter.getId(), Emitter.class) - .name("Emitter Casing UEV") - .tier(10) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_Emitter.getId(), Emitter.class) - .name("Emitter Casing UIV") - .tier(11) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_Emitter.getId(), Emitter.class) - .name("Emitter Casing UMV") - .tier(12) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_Emitter.getId(), Emitter.class) - .name("Emitter Casing UXV") - .tier(13) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_Emitter.getId(), Emitter.class) - .name("Emitter Casing MAX") - .tier(14) - .category("MultiBlock Functional Casing") - .textureFolder("emitter") - .register(); - } - - private static void registerFieldGeneratorCasings() { - COMPONENT_CASING_REGISTRY.create(LV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator LV") - .tier(1) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(MV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator MV") - .tier(2) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(HV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator HV") - .tier(3) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(EV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator EV") - .tier(4) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(IV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator IV") - .tier(5) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(LuV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator LuV") - .tier(6) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(ZPM_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator ZPM") - .tier(7) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(UV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator UV") - .tier(8) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(UHV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator UHV") - .tier(9) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(UEV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator UEV") - .tier(10) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(UIV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator UIV") - .tier(11) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(UMV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator UMV") - .tier(12) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(UXV_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator UXV") - .tier(13) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - COMPONENT_CASING_REGISTRY.create(MAX_FieldGenerator.getId(), FieldGenerator.class) - .name("Field Generator MAX") - .tier(14) - .category("Multiblock Energy Field") - .textureFolder("fieldGenerator") - .register(); - } -} diff --git a/src/main/java/gregtech/mixin/Mixin.java b/src/main/java/gregtech/mixin/Mixin.java index 9d1a0164b3c..ecd7a7e076f 100644 --- a/src/main/java/gregtech/mixin/Mixin.java +++ b/src/main/java/gregtech/mixin/Mixin.java @@ -14,6 +14,7 @@ import bartworks.common.configs.Configuration; import cpw.mods.fml.relauncher.FMLLaunchHandler; +import gregtech.common.config.Gregtech; import gregtech.common.pollution.PollutionConfig; public enum Mixin { @@ -60,6 +61,14 @@ public enum Mixin { .setApplyIf(() -> true) .setPhase(Phase.EARLY) .setSide(Side.BOTH)), + + VanillaToolChanges( + new Builder("Changes wooden tools to be a little faster").addMixinClasses("minecraft.ItemToolMaterialMixin") + .addTargetedMod(VANILLA) + .setApplyIf(() -> Gregtech.general.changedWoodenVanillaTools) + .setPhase(Phase.EARLY) + .setSide(Side.BOTH)), + IC2_MACHINE_WRENCHING(new Builder("Changes the behavior of the wrenching mechanic for IC2 machines") .addMixinClasses("ic2.MixinDamageDropped", "ic2.MixinHarvestTool", "ic2.MixinItemDropped") .addTargetedMod(TargetedMod.IC2) diff --git a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java index 56966eb8efc..064d59af879 100644 --- a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java +++ b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java @@ -28,8 +28,8 @@ public class GTPPRecipeMaps { public static final RecipeMap cokeOvenRecipes = RecipeMapBuilder.of("gtpp.recipe.cokeoven") - .maxIO(2, 9, 1, 1) - .minInputs(1, 0) + .maxIO(2, 9, 2, 1) + .minInputs(0, 0) .progressBar(GTUITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN) .build(); public static final RecipeMap multiblockMassFabricatorRecipes = RecipeMapBuilder diff --git a/src/main/java/gtPlusPlus/core/recipe/RecipesGregTech.java b/src/main/java/gtPlusPlus/core/recipe/RecipesGregTech.java index d00e8c7e8c0..9705b68da92 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RecipesGregTech.java +++ b/src/main/java/gtPlusPlus/core/recipe/RecipesGregTech.java @@ -883,11 +883,12 @@ private static void blastSmelterRecipes() { GTUtility.getIntegratedCircuit(21), MaterialMisc.STRONTIUM_OXIDE.getDust(8), MaterialsElements.getInstance().ALUMINIUM.getDust(8)) - .itemOutputs( - MaterialsElements.getInstance().ALUMINIUM.getIngot(8), - MaterialsElements.getInstance().STRONTIUM.getIngot(8)) - .fluidOutputs(MaterialsElements.getInstance().OXYGEN.getFluidStack(8000)) + .fluidOutputs( + MaterialsElements.getInstance().OXYGEN.getFluidStack(8000), + MaterialsElements.getInstance().ALUMINIUM.getFluidStack(144 * 8), + MaterialsElements.getInstance().STRONTIUM.getFluidStack(144 * 8)) .eut(TierEU.RECIPE_EV) + .noOptimize() .duration(2 * MINUTES) .addTo(alloyBlastSmelterRecipes); diff --git a/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java b/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java index 2124f9979d1..775b5b80a30 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java @@ -1576,7 +1576,7 @@ private static void runModRecipes() { CI.getTieredMachineHull(1, 1), CI.getElectricMotor(1, 2), CI.getElectricPiston(1, 2), - GTOreDictUnificator.get(OrePrefixes.cableGt01, Materials.Cobalt, 1L), + GTOreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), GTOreDictUnificator.get(OrePrefixes.circuit, Materials.LV, 1L), CI.getGear(1, 2)) .itemOutputs(GregtechItemList.Generator_SemiFluid_LV.get(1)) @@ -1650,7 +1650,7 @@ private static void runModRecipes() { CI.bits, new Object[] { "PCP", "EME", "GWG", 'M', ItemList.Hull_LV, 'P', ItemList.Electric_Piston_LV, 'E', ItemList.Electric_Motor_LV, 'C', OrePrefixes.circuit.get(Materials.LV), 'W', - OrePrefixes.cableGt01.get(Materials.Cobalt), 'G', MaterialsAlloy.TUMBAGA.getGear(2) }); + OrePrefixes.cableGt01.get(Materials.Tin), 'G', MaterialsAlloy.TUMBAGA.getGear(2) }); GTModHandler.addCraftingRecipe( GregtechItemList.Generator_SemiFluid_MV.get(1L), CI.bits, diff --git a/src/main/java/gtPlusPlus/core/recipe/RecipesSeleniumProcessing.java b/src/main/java/gtPlusPlus/core/recipe/RecipesSeleniumProcessing.java index 68f38dc5c28..c78f7431d7b 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RecipesSeleniumProcessing.java +++ b/src/main/java/gtPlusPlus/core/recipe/RecipesSeleniumProcessing.java @@ -1,10 +1,8 @@ package gtPlusPlus.core.recipe; -import static gregtech.api.recipe.RecipeMaps.pyrolyseRecipes; import static gregtech.api.util.GTRecipeBuilder.MINUTES; import static gregtech.api.util.GTRecipeBuilder.SECONDS; -import static gtPlusPlus.api.recipe.GTPPRecipeMaps.alloyBlastSmelterRecipes; -import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalDehydratorRecipes; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.*; import gregtech.api.enums.GTValues; import gregtech.api.enums.Materials; @@ -13,7 +11,6 @@ import gregtech.api.util.GTUtility; import gtPlusPlus.core.material.MaterialMisc; import gtPlusPlus.core.material.MaterialsElements; -import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; @@ -30,33 +27,31 @@ public static void init() { // Liquify the Dried Dioxide GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(13), MaterialMisc.SELENIUM_DIOXIDE.getDust(1)) + .itemInputs(MaterialMisc.SELENIUM_DIOXIDE.getDust(1)) .fluidInputs(FluidUtils.getSteam(500)) .fluidOutputs(MaterialMisc.SELENIUM_DIOXIDE.getFluidStack(1000)) .duration(24 * SECONDS) .eut(1024) - .addTo(pyrolyseRecipes); + .addTo(cokeOvenRecipes); // Produce Selenious Acid GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(14), MaterialMisc.SELENIUM_DIOXIDE.getCell(1)) - .itemOutputs(CI.emptyCells(1)) - .fluidInputs(FluidUtils.getHotWater(4000)) + .fluidInputs(FluidUtils.getHotWater(4000), MaterialMisc.SELENIUM_DIOXIDE.getFluidStack(1000)) .fluidOutputs(MaterialMisc.SELENIOUS_ACID.getFluidStack(1000)) .duration(24 * SECONDS) + .noOptimize() .eut(TierEU.RECIPE_EV) - .addTo(pyrolyseRecipes); + .addTo(cokeOvenRecipes); // Make Selenium GTValues.RA.stdBuilder() .itemInputs(GTUtility.getIntegratedCircuit(14), MaterialsElements.getInstance().CARBON.getDust(16)) - .itemOutputs( - MaterialsElements.getInstance().SELENIUM.getIngot(1), - MaterialsElements.getInstance().SELENIUM.getIngot(1)) - .outputChances(100_00, 20_00) .fluidInputs(MaterialMisc.SELENIOUS_ACID.getFluidStack(750), Materials.SulfuricAcid.getFluid(8000)) - .fluidOutputs(MaterialsElements.getInstance().SELENIUM.getFluidStack(144 * 1)) + .fluidOutputs( + MaterialsElements.getInstance().SELENIUM.getFluidStack(144 * 2 + 36), + Materials.DilutedSulfuricAcid.getFluid(12000)) .eut(TierEU.RECIPE_IV) + .noOptimize() .duration(5 * MINUTES) .addTo(alloyBlastSmelterRecipes); } @@ -65,20 +60,11 @@ public static void processCopperRecipes() { // Copper GTValues.RA.stdBuilder() - .itemInputs( - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Copper, 1)) + .itemInputs(ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Copper, 1)) .itemOutputs( ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Copper, 1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1)) - .outputChances(100_00, 1_00, 1_00, 5_00, 5_00, 5_00, 10_00, 10_00, 10_00) + MaterialMisc.SELENIUM_DIOXIDE.getDust(1)) + .outputChances(100_00, 3_00) .fluidInputs(FluidUtils.getHotWater(1000)) .fluidOutputs(MaterialMisc.SELENIUM_DIOXIDE.getFluidStack(20)) .eut(1024) @@ -87,20 +73,11 @@ public static void processCopperRecipes() { // Tetra GTValues.RA.stdBuilder() - .itemInputs( - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Tetrahedrite, 1)) + .itemInputs(ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Tetrahedrite, 1)) .itemOutputs( ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Tetrahedrite, 1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1)) - .outputChances(100_00, 1_00, 1_00, 3_00, 3_00, 3_00, 8_00, 8_00, 8_00) + MaterialMisc.SELENIUM_DIOXIDE.getDust(1)) + .outputChances(100_00, 2_50) .fluidInputs(FluidUtils.getHotWater(1000)) .fluidOutputs(MaterialMisc.SELENIUM_DIOXIDE.getFluidStack(10)) .eut(1024) @@ -109,20 +86,11 @@ public static void processCopperRecipes() { // Chalco GTValues.RA.stdBuilder() - .itemInputs( - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1)) + .itemInputs(ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1)) .itemOutputs( ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Chalcopyrite, 1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1)) - .outputChances(100_00, 1_00, 1_00, 3_00, 3_00, 3_00, 8_00, 8_00, 8_00) + MaterialMisc.SELENIUM_DIOXIDE.getDust(1)) + .outputChances(100_00, 2_50) .fluidInputs(FluidUtils.getHotWater(1000)) .fluidOutputs(MaterialMisc.SELENIUM_DIOXIDE.getFluidStack(10)) .eut(1024) @@ -131,20 +99,11 @@ public static void processCopperRecipes() { // Malachite GTValues.RA.stdBuilder() - .itemInputs( - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Malachite, 1)) + .itemInputs(ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Malachite, 1)) .itemOutputs( ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Malachite, 1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getSmallDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1), - MaterialMisc.SELENIUM_DIOXIDE.getTinyDust(1)) - .outputChances(100_00, 1_00, 1_00, 3_00, 3_00, 3_00, 8_00, 8_00, 8_00) + MaterialMisc.SELENIUM_DIOXIDE.getDust(1)) + .outputChances(100_00, 2_50) .fluidInputs(FluidUtils.getHotWater(1000)) .fluidOutputs(MaterialMisc.SELENIUM_DIOXIDE.getFluidStack(10)) .eut(1024) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java index dab8f739a19..08ee64597c9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java @@ -1119,27 +1119,56 @@ public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, Ite @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int aColorIndex, boolean aActive, boolean aRedstone) { - if (side == facing) { - if (aActive) return new ITexture[] { getCasingTexture(), TextureFactory.builder() - .addIcon(getActiveOverlay()) + ITexture casingTexture = getCasingTexture(); + if (side != facing) { + return new ITexture[] { casingTexture }; + } + + int textures = 1; + IIconContainer container = aActive ? getActiveOverlay() : getInactiveOverlay(); + ITexture overlay = null; + if (container != null) { + textures++; + overlay = TextureFactory.builder() + .addIcon(container) .extFacing() - .build() }; - return new ITexture[] { getCasingTexture(), TextureFactory.builder() - .addIcon(getInactiveOverlay()) + .build(); + } + + IIconContainer glowContainer = aActive ? getActiveGlowOverlay() : getInactiveGlowOverlay(); + ITexture glowOverlay = null; + if (glowContainer != null) { + textures++; + glowOverlay = TextureFactory.builder() + .addIcon(glowContainer) .extFacing() - .build() }; + .glow() + .build(); } - return new ITexture[] { getCasingTexture() }; + + ITexture[] retVal = new ITexture[textures]; + retVal[0] = getCasingTexture(); + if (overlay != null) retVal[1] = overlay; + if (glowOverlay != null) retVal[2] = glowOverlay; + return retVal; } protected IIconContainer getActiveOverlay() { return null; } + protected IIconContainer getActiveGlowOverlay() { + return null; + } + protected IIconContainer getInactiveOverlay() { return null; } + protected IIconContainer getInactiveGlowOverlay() { + return null; + } + protected ITexture getCasingTexture() { return Textures.BlockIcons.getCasingTextureForId(getCasingTextureId()); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 36d0addad8a..07ee0afe540 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -2,8 +2,6 @@ import static gregtech.api.enums.Mods.GTPlusPlus; -import java.util.ArrayList; - import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; @@ -11,14 +9,13 @@ import gregtech.api.GregTechAPI; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.config.Configuration; public class TexturesGtBlock { private static final boolean mAnimated = Configuration.visual.enableAnimatedTextures; - private static final ArrayList mCustomiconMap = new ArrayList<>(); /* * Handles Custom Textures. @@ -37,7 +34,6 @@ public CustomIcon(final String aIconName) { public CustomIcon(final String aModID, final String aIconName) { this.mIconName = aIconName; this.mModID = aModID; - mCustomiconMap.add(this); Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); GregTechAPI.sGTBlockIconload.add(this); } @@ -317,64 +313,115 @@ public ResourceLocation getTextureFile() { public static final CustomIcon oMCDIndustrialWireMill = new CustomIcon( "iconsets/controllerFaces/industrialWiremill"); + public static final CustomIcon oMCDIndustrialWireMillGlow = new CustomIcon( + "iconsets/controllerFaces/industrialWiremillGlow"); public static final CustomIcon oMCDIndustrialWireMillActive = new CustomIcon( "iconsets/controllerFaces/industrialWiremillActive"); + public static final CustomIcon oMCDIndustrialWireMillActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialWiremillActiveGlow"); public static final CustomIcon oMCDIndustrialSifter = new CustomIcon("iconsets/controllerFaces/industrialSifter"); + public static final CustomIcon oMCDIndustrialSifterGlow = new CustomIcon( + "iconsets/controllerFaces/industrialSifterGlow"); public static final CustomIcon oMCDIndustrialSifterActive = new CustomIcon( "iconsets/controllerFaces/industrialSifterActive"); + public static final CustomIcon oMCDIndustrialSifterActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialSifterActiveGlow"); public static final CustomIcon oMCDAlgaePondBase = new CustomIcon("iconsets/controllerFaces/algaePondBase"); + public static final CustomIcon oMCDAlgaePondBaseGlow = new CustomIcon("iconsets/controllerFaces/algaePondBaseGlow"); public static final CustomIcon oMCDAlgaePondBaseActive = new CustomIcon( "iconsets/controllerFaces/algaePondBaseActive"); + public static final CustomIcon oMCDAlgaePondBaseActiveGlow = new CustomIcon( + "iconsets/controllerFaces/algaePondBaseActiveGlow"); public static final CustomIcon oMCDIndustrialMixer = new CustomIcon("iconsets/controllerFaces/industrialMixer"); + public static final CustomIcon oMCDIndustrialMixerGlow = new CustomIcon( + "iconsets/controllerFaces/industrialMixerGlow"); public static final CustomIcon oMCDIndustrialMixerActive = new CustomIcon( "iconsets/controllerFaces/industrialMixerActive"); + public static final CustomIcon oMCDIndustrialMixerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialMixerActiveGlow"); public static final CustomIcon oMCDIndustrialThermalCentrifuge = new CustomIcon( "iconsets/controllerFaces/industrialThermalCentrifuge"); + public static final CustomIcon oMCDIndustrialThermalCentrifugeGlow = new CustomIcon( + "iconsets/controllerFaces/industrialThermalCentrifugeGlow"); public static final CustomIcon oMCDIndustrialThermalCentrifugeActive = new CustomIcon( "iconsets/controllerFaces/industrialThermalCentrifugeActive"); + public static final CustomIcon oMCDIndustrialThermalCentrifugeActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow"); public static final CustomIcon oMCDIndustrialExtruder = new CustomIcon( "iconsets/controllerFaces/industrialExtruder"); + public static final CustomIcon oMCDIndustrialExtruderGlow = new CustomIcon( + "iconsets/controllerFaces/industrialExtruderGlow"); public static final CustomIcon oMCDIndustrialExtruderActive = new CustomIcon( "iconsets/controllerFaces/industrialExtruderActive"); + public static final CustomIcon oMCDIndustrialExtruderActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialExtruderActiveGlow"); public static final CustomIcon oMCDIndustrialWashPlant = new CustomIcon( "iconsets/controllerFaces/industrialWashPlant"); + public static final CustomIcon oMCDIndustrialWashPlantGlow = new CustomIcon( + "iconsets/controllerFaces/industrialWashPlantGlow"); public static final CustomIcon oMCDIndustrialWashPlantActive = new CustomIcon( "iconsets/controllerFaces/industrialWashPlantActive"); + public static final CustomIcon oMCDIndustrialWashPlantActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialWashPlantActiveGlow"); public static final CustomIcon oMCDAlloyBlastSmelter = new CustomIcon("iconsets/controllerFaces/alloyBlastSmelter"); + public static final CustomIcon oMCDAlloyBlastSmelterGlow = new CustomIcon( + "iconsets/controllerFaces/alloyBlastSmelterGlow"); public static final CustomIcon oMCDAlloyBlastSmelterActive = new CustomIcon( "iconsets/controllerFaces/alloyBlastSmelterActive"); + public static final CustomIcon oMCDAlloyBlastSmelterActiveGlow = new CustomIcon( + "iconsets/controllerFaces/alloyBlastSmelterActiveGlow"); public static final CustomIcon oMCDIndustrialArcFurnace = new CustomIcon( "iconsets/controllerFaces/industrialArcFurnace"); + public static final CustomIcon oMCDIndustrialArcFurnaceGlow = new CustomIcon( + "iconsets/controllerFaces/industrialArcFurnaceGlow"); public static final CustomIcon oMCDIndustrialArcFurnaceActive = new CustomIcon( "iconsets/controllerFaces/industrialArcFurnaceActive"); + public static final CustomIcon oMCDIndustrialArcFurnaceActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialArcFurnaceActiveGlow"); public static final CustomIcon oMCDIndustrialCuttingMachine = new CustomIcon( "iconsets/controllerFaces/industrialCuttingMachine"); + public static final CustomIcon oMCDIndustrialCuttingMachineGlow = new CustomIcon( + "iconsets/controllerFaces/industrialCuttingMachineGlow"); public static final CustomIcon oMCDIndustrialCuttingMachineActive = new CustomIcon( "iconsets/controllerFaces/industrialCuttingMachineActive"); + public static final CustomIcon oMCDIndustrialCuttingMachineActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialCuttingMachineActiveGlow"); public static final CustomIcon oMCDIndustrialPlatePress = new CustomIcon( "iconsets/controllerFaces/industrialPlatePress"); + public static final CustomIcon oMCDIndustrialPlatePressGlow = new CustomIcon( + "iconsets/controllerFaces/industrialPlatePressGlow"); public static final CustomIcon oMCDIndustrialPlatePressActive = new CustomIcon( "iconsets/controllerFaces/industrialPlatePressActive"); + public static final CustomIcon oMCDIndustrialPlatePressActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialPlatePressActiveGlow"); public static final CustomIcon oMCDIndustrialElectrolyzer = new CustomIcon( "iconsets/controllerFaces/industrialElectrolyzer"); + public static final CustomIcon oMCDIndustrialElectrolyzerGlow = new CustomIcon( + "iconsets/controllerFaces/industrialElectrolyzerGlow"); public static final CustomIcon oMCDIndustrialElectrolyzerActive = new CustomIcon( "iconsets/controllerFaces/industrialElectrolyzerActive"); + public static final CustomIcon oMCDIndustrialElectrolyzerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialElectrolyzerActiveGlow"); public static final CustomIcon oMCDFrothFlotationCell = new CustomIcon( "iconsets/controllerFaces/frothFlotationCell"); + public static final CustomIcon oMCDFrothFlotationCellGlow = new CustomIcon( + "iconsets/controllerFaces/frothFlotationCellGlow"); public static final CustomIcon oMCDFrothFlotationCellActive = new CustomIcon( "iconsets/controllerFaces/frothFlotationCellActive"); + public static final CustomIcon oMCDFrothFlotationCellActiveGlow = new CustomIcon( + "iconsets/controllerFaces/frothFlotationCellActiveGlow"); public static final CustomIcon Overlay_Machine_Controller_Advanced = new CustomIcon( "iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED"); @@ -383,83 +430,148 @@ public ResourceLocation getTextureFile() { // oMCA = Overlay_Machine_Controller_Advanced public static final CustomIcon oMCACokeOven = new CustomIcon("iconsets/controllerFaces/cokeOven"); + public static final CustomIcon oMCACokeOvenGlow = new CustomIcon("iconsets/controllerFaces/cokeOvenGlow"); public static final CustomIcon oMCACokeOvenActive = new CustomIcon("iconsets/controllerFaces/cokeOvenActive"); + public static final CustomIcon oMCACokeOvenActiveGlow = new CustomIcon( + "iconsets/controllerFaces/cokeOvenActiveGlow"); public static final CustomIcon oMCAChemicalPlant = new CustomIcon("iconsets/controllerFaces/chemicalPlant"); + public static final CustomIcon oMCAChemicalPlantGlow = new CustomIcon("iconsets/controllerFaces/chemicalPlantGlow"); public static final CustomIcon oMCAChemicalPlantActive = new CustomIcon( "iconsets/controllerFaces/chemicalPlantActive"); + public static final CustomIcon oMCAChemicalPlantActiveGlow = new CustomIcon( + "iconsets/controllerFaces/chemicalPlantActiveGlow"); public static final CustomIcon oMCAMegaAlloyBlastSmelter = new CustomIcon( "iconsets/controllerFaces/megaAlloyBlastSmelter"); + public static final CustomIcon oMCAMegaAlloyBlastSmelterGlow = new CustomIcon( + "iconsets/controllerFaces/megaAlloyBlastSmelterGlow"); public static final CustomIcon oMCAMegaAlloyBlastSmelterActive = new CustomIcon( "iconsets/controllerFaces/megaAlloyBlastSmelterActive"); + public static final CustomIcon oMCAMegaAlloyBlastSmelterActiveGlow = new CustomIcon( + "iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow"); public static final CustomIcon oMCATreeFarm = new CustomIcon("iconsets/controllerFaces/treeFarm"); public static final CustomIcon oMCATreeFarmActive = new CustomIcon("iconsets/controllerFaces/treeFarmActive"); public static final CustomIcon oMCAIndustrialRockBreaker = new CustomIcon( "iconsets/controllerFaces/industrialRockBreaker"); + public static final CustomIcon oMCAIndustrialRockBreakerGlow = new CustomIcon( + "iconsets/controllerFaces/industrialRockBreakerGlow"); public static final CustomIcon oMCAIndustrialRockBreakerActive = new CustomIcon( "iconsets/controllerFaces/industrialRockBreakerActive"); + public static final CustomIcon oMCAIndustrialRockBreakerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialRockBreakerActiveGlow"); public static final CustomIcon oMCAAdvancedHeatExchanger = new CustomIcon( "iconsets/controllerFaces/advancedHeatExchanger"); + public static final CustomIcon oMCAAdvancedHeatExchangerGlow = new CustomIcon( + "iconsets/controllerFaces/advancedHeatExchangerGlow"); public static final CustomIcon oMCAAdvancedHeatExchangerActive = new CustomIcon( "iconsets/controllerFaces/advancedHeatExchangerActive"); + public static final CustomIcon oMCAAdvancedHeatExchangerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/advancedHeatExchangerActiveGlow"); public static final CustomIcon oMCALargeRocketEngine = new CustomIcon("iconsets/controllerFaces/largeRocketEngine"); + public static final CustomIcon oMCALargeRocketEngineGlow = new CustomIcon( + "iconsets/controllerFaces/largeRocketEngineGlow"); public static final CustomIcon oMCALargeRocketEngineActive = new CustomIcon( "iconsets/controllerFaces/largeRocketEngineActive"); + public static final CustomIcon oMCALargeRocketEngineActiveGlow = new CustomIcon( + "iconsets/controllerFaces/largeRocketEngineActiveGlow"); public static final CustomIcon oMCAIndustrialChisel = new CustomIcon("iconsets/controllerFaces/industrialChisel"); + public static final CustomIcon oMCAIndustrialChiselGlow = new CustomIcon( + "iconsets/controllerFaces/industrialChiselGlow"); public static final CustomIcon oMCAIndustrialChiselActive = new CustomIcon( "iconsets/controllerFaces/industrialChiselActive"); + public static final CustomIcon oMCAIndustrialChiselActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialChiselActiveGlow"); public static final CustomIcon oMCAIndustrialMolecularTransformer = new CustomIcon( "iconsets/controllerFaces/industrialMolecularTransformer"); + public static final CustomIcon oMCAIndustrialMolecularTransformerGlow = new CustomIcon( + "iconsets/controllerFaces/industrialMolecularTransformerGlow"); public static final CustomIcon oMCAIndustrialMolecularTransformerActive = new CustomIcon( "iconsets/controllerFaces/industrialMolecularTransformerActive"); + public static final CustomIcon oMCAIndustrialMolecularTransformerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialMolecularTransformerActiveGlow"); public static final CustomIcon oMCAElementalDuplicator = new CustomIcon( "iconsets/controllerFaces/elementalDuplicator"); + public static final CustomIcon oMCAElementalDuplicatorGlow = new CustomIcon( + "iconsets/controllerFaces/elementalDuplicatorGlow"); public static final CustomIcon oMCAElementalDuplicatorActive = new CustomIcon( "iconsets/controllerFaces/elementalDuplicatorActive"); + public static final CustomIcon oMCAElementalDuplicatorActiveGlow = new CustomIcon( + "iconsets/controllerFaces/elementalDuplicatorActiveGlow"); public static final CustomIcon oMCAFluidHeater = new CustomIcon("iconsets/controllerFaces/fluidHeater"); + public static final CustomIcon oMCAFluidHeaterGlow = new CustomIcon("iconsets/controllerFaces/fluidHeaterGlow"); public static final CustomIcon oMCAFluidHeaterActive = new CustomIcon("iconsets/controllerFaces/fluidHeaterActive"); + public static final CustomIcon oMCAFluidHeaterActiveGlow = new CustomIcon( + "iconsets/controllerFaces/fluidHeaterActiveGlow"); public static final CustomIcon oMCAAmazonPackager = new CustomIcon("iconsets/controllerFaces/amazonPackager"); + public static final CustomIcon oMCAAmazonPackagerGlow = new CustomIcon( + "iconsets/controllerFaces/amazonPackagerGlow"); public static final CustomIcon oMCAAmazonPackagerActive = new CustomIcon( "iconsets/controllerFaces/amazonPackagerActive"); + public static final CustomIcon oMCAAmazonPackagerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/amazonPackagerActiveGlow"); public static final CustomIcon oMCAIndustrialDehydrator = new CustomIcon( "iconsets/controllerFaces/industrialDehydrator"); + public static final CustomIcon oMCAIndustrialDehydratorGlow = new CustomIcon( + "iconsets/controllerFaces/industrialDehydratorGlow"); public static final CustomIcon oMCAIndustrialDehydratorActive = new CustomIcon( "iconsets/controllerFaces/industrialDehydratorActive"); + public static final CustomIcon oMCAIndustrialDehydratorActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialDehydratorActiveGlow"); public static final CustomIcon oMCAIndustrialForgeHammer = new CustomIcon( "iconsets/controllerFaces/industrialForgeHammer"); + public static final CustomIcon oMCAIndustrialForgeHammerGlow = new CustomIcon( + "iconsets/controllerFaces/industrialForgeHammerGlow"); public static final CustomIcon oMCAIndustrialForgeHammerActive = new CustomIcon( "iconsets/controllerFaces/industrialForgeHammerActive"); + public static final CustomIcon oMCAIndustrialForgeHammerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialForgeHammerActiveGlow"); public static final CustomIcon oMCAAdvancedEBF = new CustomIcon("iconsets/controllerFaces/advancedEBF"); + public static final CustomIcon oMCAAdvancedEBFGlow = new CustomIcon("iconsets/controllerFaces/advancedEBFGlow"); public static final CustomIcon oMCAAdvancedEBFActive = new CustomIcon("iconsets/controllerFaces/advancedEBFActive"); + public static final CustomIcon oMCAAdvancedEBFActiveGlow = new CustomIcon( + "iconsets/controllerFaces/advancedEBFActiveGlow"); public static final CustomIcon oMCASpargeTower = new CustomIcon("iconsets/controllerFaces/spargeTower"); + public static final CustomIcon oMCASpargeTowerGlow = new CustomIcon("iconsets/controllerFaces/spargeTowerGlow"); public static final CustomIcon oMCASpargeTowerActive = new CustomIcon("iconsets/controllerFaces/spargeTowerActive"); + public static final CustomIcon oMCASpargeTowerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/spargeTowerActiveGlow"); public static final CustomIcon oMCAIndustrialVacuumFreezer = new CustomIcon( "iconsets/controllerFaces/industrialVacuumFreezer"); + public static final CustomIcon oMCAIndustrialVacuumFreezerGlow = new CustomIcon( + "iconsets/controllerFaces/industrialVacuumFreezerGlow"); public static final CustomIcon oMCAIndustrialVacuumFreezerActive = new CustomIcon( "iconsets/controllerFaces/industrialVacuumFreezerActive"); + public static final CustomIcon oMCAIndustrialVacuumFreezerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/industrialVacuumFreezerActiveGlow"); public static final CustomIcon oMCAThermalBoiler = new CustomIcon("iconsets/controllerFaces/thermalBoiler"); + public static final CustomIcon oMCAThermalBoilerGlow = new CustomIcon("iconsets/controllerFaces/thermalBoilerGlow"); public static final CustomIcon oMCAThermalBoilerActive = new CustomIcon( "iconsets/controllerFaces/thermalBoilerActive"); + public static final CustomIcon oMCAThermalBoilerActiveGlow = new CustomIcon( + "iconsets/controllerFaces/thermalBoilerActiveGlow"); public static final CustomIcon oMCAQFT = new CustomIcon("iconsets/controllerFaces/quantumForceTransformer"); + public static final CustomIcon oMCAQFTGlow = new CustomIcon("iconsets/controllerFaces/quantumForceTransformerGlow"); public static final CustomIcon oMCAQFTActive = new CustomIcon( "iconsets/controllerFaces/quantumForceTransformerActive"); + public static final CustomIcon oMCAQFTActiveGlow = new CustomIcon( + "iconsets/controllerFaces/quantumForceTransformerActiveGlow"); public static final CustomIcon oMCAIndustrialMultiMachine = new CustomIcon( "iconsets/controllerFaces/industrialMultiMachine"); @@ -467,8 +579,12 @@ public ResourceLocation getTextureFile() { "iconsets/controllerFaces/industrialMultiMachineActive"); public static final CustomIcon oMCAAdvancedImplosion = new CustomIcon("iconsets/controllerFaces/advancedImplosion"); + public static final CustomIcon oMCAAdvancedImplosionGlow = new CustomIcon( + "iconsets/controllerFaces/advancedImplosionGlow"); public static final CustomIcon oMCAAdvancedImplosionActive = new CustomIcon( "iconsets/controllerFaces/advancedImplosionActive"); + public static final CustomIcon oMCAAdvancedImplosionActiveGlow = new CustomIcon( + "iconsets/controllerFaces/advancedImplosionActiveGlow"); // Crafting Overlays public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay = new CustomIcon( @@ -496,14 +612,24 @@ public ResourceLocation getTextureFile() { // Dimensional public static final CustomIcon Overlay_Machine_Dimensional_Orange = new CustomIcon( "TileEntities/adv_machine_dimensional_cover_orange"); + // Icons public static final CustomIcon Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab"); + public static final CustomIcon Overlay_MatterFab_Glow = new CustomIcon("TileEntities/adv_machine_matterfab_glow"); public static final CustomIcon Overlay_MatterFab_Active = new CustomIcon( "TileEntities/adv_machine_matterfab_active"); + public static final CustomIcon Overlay_MatterFab_Active_Glow = new CustomIcon( + "TileEntities/adv_machine_matterfab_active_glow"); + public static final CustomIcon Overlay_MatterFab_Animated = new CustomIcon( "TileEntities/adv_machine_matterfab_animated"); + public static final CustomIcon Overlay_MatterFab_Animated_Glow = new CustomIcon( + "TileEntities/adv_machine_matterfab_animated_glow"); public static final CustomIcon Overlay_MatterFab_Active_Animated = new CustomIcon( "TileEntities/adv_machine_matterfab_active_animated"); + public static final CustomIcon Overlay_MatterFab_Active_Animated_Glow = new CustomIcon( + "TileEntities/adv_machine_matterfab_active_animated_glow"); + public static final CustomIcon Overlay_Water = new CustomIcon("TileEntities/adv_machine_water"); public static final CustomIcon Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum"); @@ -535,25 +661,6 @@ public ResourceLocation getTextureFile() { public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A"); public static final CustomIcon TEXTURE_STONE_RED_B = new CustomIcon("metro/TEXTURE_STONE_RED_B"); - public static final CustomIcon OVERLAY_SC_TURBINE1 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL1"); - public static final CustomIcon OVERLAY_SC_TURBINE2 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL2"); - public static final CustomIcon OVERLAY_SC_TURBINE3 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL3"); - public static final CustomIcon OVERLAY_SC_TURBINE4 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL4"); - public static final CustomIcon OVERLAY_SC_TURBINE5 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL5"); - public static final CustomIcon OVERLAY_SC_TURBINE6 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL6"); - public static final CustomIcon OVERLAY_SC_TURBINE7 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL7"); - public static final CustomIcon OVERLAY_SC_TURBINE8 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL8"); - public static final CustomIcon OVERLAY_SC_TURBINE9 = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE_IDEL9"); - - public static final CustomIcon OVERLAY_SC_TURBINE1_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE1"); - public static final CustomIcon OVERLAY_SC_TURBINE2_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE2"); - public static final CustomIcon OVERLAY_SC_TURBINE3_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE3"); - public static final CustomIcon OVERLAY_SC_TURBINE4_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE4"); - public static final CustomIcon OVERLAY_SC_TURBINE5_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE5"); - public static final CustomIcon OVERLAY_SC_TURBINE6_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE6"); - public static final CustomIcon OVERLAY_SC_TURBINE7_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE7"); - public static final CustomIcon OVERLAY_SC_TURBINE8_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE8"); - public static final CustomIcon OVERLAY_SC_TURBINE9_ACTIVE = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE9"); public static final CustomIcon TEXTURE_TECH_A = new CustomIcon("metro/TEXTURE_TECH_A"); public static final CustomIcon TEXTURE_TECH_B = new CustomIcon("metro/TEXTURE_TECH_B"); public static final CustomIcon TEXTURE_TECH_C = new CustomIcon("metro/TEXTURE_TECH_C"); @@ -562,16 +669,16 @@ public ResourceLocation getTextureFile() { public static final CustomIcon TEXTURE_TECH_PANEL_H = new CustomIcon("metro/TEXTURE_TECH_PANEL_H"); public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }) }; + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }) }; public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[] { TEXTURE_CASING_FUSION_COIL_II_1, TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3, TEXTURE_CASING_FUSION_COIL_II_4, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/MTEAmazonPackager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/MTEAmazonPackager.java index 84ff99eb001..1ccda839f03 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/MTEAmazonPackager.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/MTEAmazonPackager.java @@ -125,11 +125,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAAmazonPackagerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAAmazonPackagerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAAmazonPackager; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAAmazonPackagerGlow; + } + @Override protected int getCasingTextureId() { return TAE.getIndexFromPage(2, 9); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialAlloySmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialAlloySmelter.java index fe7f6d4918d..873fa99ecfe 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialAlloySmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialAlloySmelter.java @@ -66,11 +66,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW; + } + @Override protected int getCasingTextureId() { return CASING_TEXTURE_ID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialArcFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialArcFurnace.java index ef7e29f49f4..f163161355f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialArcFurnace.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialArcFurnace.java @@ -216,11 +216,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialArcFurnaceActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialArcFurnaceActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialArcFurnace; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialArcFurnaceGlow; + } + @Override protected int getCasingTextureId() { return mCasingTextureID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCentrifuge.java index af68340722a..365a2595547 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCentrifuge.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCentrifuge.java @@ -41,14 +41,11 @@ import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GTPPMultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; public class MTEIndustrialCentrifuge extends GTPPMultiBlockBase implements ISurvivalConstructable { private boolean mIsAnimated; - private static final CustomIcon frontFaceActive = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); - private static final CustomIcon frontFace = new CustomIcon("iconsets/LARGECENTRIFUGE5"); private int mCasing; private static IStructureDefinition STRUCTURE_DEFINITION = null; // public static double recipesComplete = 0; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialChisel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialChisel.java index f9085bd063c..bffce15245f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialChisel.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialChisel.java @@ -143,11 +143,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAIndustrialChiselActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialChiselActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAIndustrialChisel; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialChiselGlow; + } + @Override protected int getCasingTextureId() { return 90; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCokeOven.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCokeOven.java index 0f1547e35e4..e7aab5d0f72 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCokeOven.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCokeOven.java @@ -158,11 +158,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCACokeOvenActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCACokeOvenActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCACokeOven; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCACokeOvenGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(1); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCuttingMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCuttingMachine.java index 0534de4b67d..907c895770e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCuttingMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialCuttingMachine.java @@ -145,11 +145,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialCuttingMachineActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialCuttingMachineActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialCuttingMachine; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialCuttingMachineGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(29); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialDehydrator.java index 04e9b130cda..7d2eac943de 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialDehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialDehydrator.java @@ -155,11 +155,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAIndustrialDehydratorActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialDehydratorActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAIndustrialDehydrator; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialDehydratorGlow; + } + @Override protected int getCasingTextureId() { return CASING_TEXTURE_ID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialExtruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialExtruder.java index c7440fa9b8b..51a22386112 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialExtruder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialExtruder.java @@ -126,11 +126,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialExtruderActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialExtruderActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialExtruder; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialExtruderGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(33); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialFluidHeater.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialFluidHeater.java index 3d07f38a175..5766a973142 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialFluidHeater.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialFluidHeater.java @@ -138,11 +138,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAFluidHeaterActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAFluidHeaterActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAFluidHeater; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAFluidHeaterGlow; + } + @Override protected int getCasingTextureId() { return TAE.getIndexFromPage(0, 1); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialForgeHammer.java index 5b216dda70d..87a1fff4d24 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialForgeHammer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialForgeHammer.java @@ -193,11 +193,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAIndustrialForgeHammerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialForgeHammerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAIndustrialForgeHammer; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialForgeHammerGlow; + } + @Override protected int getCasingTextureId() { return TAE.getIndexFromPage(1, 11); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMacerator.java index ddb7a4ef8c2..7d9cb0e69f2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMacerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMacerator.java @@ -216,11 +216,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.Overlay_MatterFab_Active; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.Overlay_MatterFab_Active_Glow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.Overlay_MatterFab; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.Overlay_MatterFab_Glow; + } + @Override protected int getCasingTextureId() { if (structureTier == 2) return TAE.GTPP_INDEX(7); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMixer.java index ded54a6a8ef..6285557384e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMixer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMixer.java @@ -152,11 +152,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialMixerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialMixerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialMixer; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialMixerGlow; + } + @Override protected int getCasingTextureId() { return CASING_TEXTURE_ID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java index 1a2196a4eca..bf41b25802f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java @@ -186,11 +186,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAIndustrialMolecularTransformerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialMolecularTransformerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAIndustrialMolecularTransformer; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialMolecularTransformerGlow; + } + @Override protected int getCasingTextureId() { return 44; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialPlatePress.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialPlatePress.java index e509dec41e7..eb265e2c8ce 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialPlatePress.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialPlatePress.java @@ -145,11 +145,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialPlatePressActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialPlatePressActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialPlatePress; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialPlatePressGlow; + } + @Override protected int getCasingTextureId() { return 50; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialSifter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialSifter.java index d57c20adf00..fca1e1d16f1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialSifter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialSifter.java @@ -130,11 +130,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialSifterActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialSifterActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialSifter; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialSifterGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(21); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialThermalCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialThermalCentrifuge.java index b838637d699..5b69b59a50b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialThermalCentrifuge.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialThermalCentrifuge.java @@ -128,11 +128,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialThermalCentrifugeActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialThermalCentrifugeActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialThermalCentrifuge; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialThermalCentrifugeGlow; + } + @Override protected int getCasingTextureId() { return getCasingTextureIndex(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialVacuumFreezer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialVacuumFreezer.java index 4a4ddafbdb1..2088d20fd0a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialVacuumFreezer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialVacuumFreezer.java @@ -179,11 +179,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAIndustrialVacuumFreezerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialVacuumFreezerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAIndustrialVacuumFreezer; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialVacuumFreezerGlow; + } + @Override protected int getCasingTextureId() { return CASING_TEXTURE_ID; 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..8ce813727f2 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 @@ -180,11 +180,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialWashPlantActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialWashPlantActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialWashPlant; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialWashPlantGlow; + } + @Override protected int getCasingTextureId() { return getCasingTextureIndex(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWireMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWireMill.java index d6f4efc4f7f..da6ace66776 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWireMill.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWireMill.java @@ -128,11 +128,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialWireMillActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialWireMillActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialWireMill; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialWireMillGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(6); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTENuclearSaltProcessingPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTENuclearSaltProcessingPlant.java index 1335922a46e..e4ae214060e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTENuclearSaltProcessingPlant.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTENuclearSaltProcessingPlant.java @@ -103,11 +103,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_GLOW; + } + @Override protected int getCasingTextureId() { return TAE.getIndexFromPage(0, 10); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTESpargeTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTESpargeTower.java index cd02c7eac87..f9a4f39e87b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTESpargeTower.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTESpargeTower.java @@ -146,11 +146,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCASpargeTowerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCASpargeTowerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCASpargeTower; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCASpargeTowerGlow; + } + @Override protected int getCasingTextureId() { return getCasingIndex(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEndustrialElectrolyzer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEndustrialElectrolyzer.java index 4e4f23a8e18..912cfb0cad3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEndustrialElectrolyzer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEndustrialElectrolyzer.java @@ -121,11 +121,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDIndustrialElectrolyzerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialElectrolyzerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDIndustrialElectrolyzer; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDIndustrialElectrolyzerGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(5); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java index 6bb1a96d00e..2adf1d1dd72 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java @@ -411,11 +411,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW; + } + @Override protected int getCasingTextureId() { return 49; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvEBF.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvEBF.java index 2ad5976e79c..71f84c4ea29 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvEBF.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvEBF.java @@ -200,11 +200,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAAdvancedEBFActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAAdvancedEBFActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAAdvancedEBF; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAAdvancedEBFGlow; + } + @Override protected int getCasingTextureId() { return CASING_TEXTURE_ID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvHeatExchanger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvHeatExchanger.java index 06314e2f1bc..c5184cac0cd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvHeatExchanger.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvHeatExchanger.java @@ -146,11 +146,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAAdvancedHeatExchangerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAAdvancedHeatExchangerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAAdvancedHeatExchanger; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAAdvancedHeatExchangerGlow; + } + @Override protected int getCasingTextureId() { return CASING_INDEX; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvImplosionCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvImplosionCompressor.java index a2d19200ced..ac00f048fed 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvImplosionCompressor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvImplosionCompressor.java @@ -120,11 +120,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAAdvancedImplosionActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAAdvancedImplosionActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAAdvancedImplosion; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAAdvancedImplosionGlow; + } + @Override protected int getCasingTextureId() { return 48; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAlloyBlastSmelter.java index 2dc288ccefd..17e0a014be8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAlloyBlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAlloyBlastSmelter.java @@ -145,11 +145,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDAlloyBlastSmelterActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDAlloyBlastSmelterActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDAlloyBlastSmelter; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDAlloyBlastSmelterGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(15); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAutoCrafter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAutoCrafter.java index e38764a46d3..235e1ec3c00 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAutoCrafter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEAutoCrafter.java @@ -108,11 +108,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_GLOW; + } + @Override protected int getCasingTextureId() { return TAE.getIndexFromPage(0, 10); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTECyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTECyclotron.java index 38173d19b94..ac988cf6ab7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTECyclotron.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTECyclotron.java @@ -196,11 +196,21 @@ protected IIconContainer getActiveOverlay() { return getIconOverlay(); } + @Override + protected IIconContainer getActiveGlowOverlay() { + return getIconGlowOverlay(); + } + @Override protected IIconContainer getInactiveOverlay() { return getIconOverlay(); } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return getIconGlowOverlay(); + } + @Override protected int getCasingTextureId() { return 44; @@ -214,6 +224,14 @@ public IIconContainer getIconOverlay() { return TexturesGtBlock.Overlay_MatterFab_Animated; } + public IIconContainer getIconGlowOverlay() { + if (this.getBaseMetaTileEntity() + .isActive()) { + return TexturesGtBlock.Overlay_MatterFab_Active_Animated_Glow; + } + return TexturesGtBlock.Overlay_MatterFab_Animated_Glow; + } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEElementalDuplicator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEElementalDuplicator.java index 96ea3957ce8..e5db1f585d8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEElementalDuplicator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEElementalDuplicator.java @@ -263,11 +263,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAElementalDuplicatorActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAElementalDuplicatorActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAElementalDuplicator; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAElementalDuplicatorGlow; + } + @Override protected int getCasingTextureId() { return CASING_TEXTURE_ID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEFrothFlotationCell.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEFrothFlotationCell.java index 30a9f707809..d8986bc4331 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEFrothFlotationCell.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEFrothFlotationCell.java @@ -103,11 +103,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDFrothFlotationCellActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDFrothFlotationCellActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDFrothFlotationCell; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDFrothFlotationCellGlow; + } + @Override protected int getCasingTextureId() { return TAE.getIndexFromPage(2, 1); 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..ee84fbcd0e9 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 @@ -174,11 +174,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW; + } + @Override protected int getCasingTextureId() { return getCasingTextureIndex(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialRockBreaker.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialRockBreaker.java index 6953834156a..79c445e1978 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialRockBreaker.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialRockBreaker.java @@ -151,11 +151,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAIndustrialRockBreakerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialRockBreakerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAIndustrialRockBreaker; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAIndustrialRockBreakerGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(16); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeRocketEngine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeRocketEngine.java index 791de0bf487..bb5a0c29640 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeRocketEngine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeRocketEngine.java @@ -189,11 +189,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCALargeRocketEngineActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCALargeRocketEngineActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCALargeRocketEngine; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCALargeRocketEngineGlow; + } + @Override protected int getCasingTextureId() { return CASING_ID; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeSemifluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeSemifluidGenerator.java index db98863b173..652cf06637e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeSemifluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTELargeSemifluidGenerator.java @@ -90,11 +90,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_GLOW; + } + @Override protected int getCasingTextureId() { return 50; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java index 025c118db5c..b71347f8cad 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java @@ -131,11 +131,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.Overlay_MatterFab_Active_Animated; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.Overlay_MatterFab_Active_Animated_Glow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.Overlay_MatterFab_Animated; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.Overlay_MatterFab_Animated_Glow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(9); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java index eb985938290..d86395368f8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java @@ -56,7 +56,6 @@ import gregtech.api.enums.SoundResource; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -415,14 +414,6 @@ private int getFocusingTier() { return mFocusingTier; } - protected IIconContainer getActiveOverlay() { - return TexturesGtBlock.oMCAQFTActive; - } - - protected IIconContainer getInactiveOverlay() { - return TexturesGtBlock.oMCAQFT; - } - protected int getCasingTextureId() { return TAE.getIndexFromPage(0, 10); } @@ -774,14 +765,28 @@ public void loadNBTData(NBTTagCompound aNBT) { public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int aColorIndex, boolean aActive, boolean aRedstone) { if (side == facing) { - if (aActive) return new ITexture[] { getCasingTexture(), TextureFactory.builder() - .addIcon(getActiveOverlay()) - .extFacing() - .build() }; - return new ITexture[] { getCasingTexture(), TextureFactory.builder() - .addIcon(getInactiveOverlay()) - .extFacing() - .build() }; + if (aActive) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)), + TextureFactory.builder() + .addIcon(TexturesGtBlock.oMCAQFTActive) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(TexturesGtBlock.oMCAQFTActiveGlow) + .extFacing() + .glow() + .build() }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)), + TextureFactory.builder() + .addIcon(TexturesGtBlock.oMCAQFT) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(TexturesGtBlock.oMCAQFTGlow) + .extFacing() + .glow() + .build() }; } return new ITexture[] { getCasingTexture() }; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTERefinery.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTERefinery.java index db83cc352ba..f05d9830c30 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTERefinery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTERefinery.java @@ -86,11 +86,21 @@ protected IIconContainer getActiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW; + } + @Override protected IIconContainer getInactiveOverlay() { return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(18); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEThermalBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEThermalBoiler.java index ee92ebf15ca..9c92bb24c76 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEThermalBoiler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEThermalBoiler.java @@ -302,11 +302,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAThermalBoilerActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAThermalBoilerActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAThermalBoiler; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAThermalBoilerGlow; + } + @Override protected int getCasingTextureId() { return TAE.GTPP_INDEX(1); 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..bbab18b73a0 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 @@ -213,11 +213,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCDAlgaePondBaseActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCDAlgaePondBaseActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCDAlgaePondBase; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCDAlgaePondBaseGlow; + } + @Override protected int getCasingTextureId() { int aID = TAE.getIndexFromPage(1, 15); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/MTEChemicalPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/MTEChemicalPlant.java index 25c5ee64d44..e6ab4b7c1c4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/MTEChemicalPlant.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/MTEChemicalPlant.java @@ -428,11 +428,21 @@ protected IIconContainer getActiveOverlay() { return TexturesGtBlock.oMCAChemicalPlantActive; } + @Override + protected IIconContainer getActiveGlowOverlay() { + return TexturesGtBlock.oMCAChemicalPlantActiveGlow; + } + @Override protected IIconContainer getInactiveOverlay() { return TexturesGtBlock.oMCAChemicalPlant; } + @Override + protected IIconContainer getInactiveGlowOverlay() { + return TexturesGtBlock.oMCAChemicalPlantGlow; + } + @Override protected int getCasingTextureId() { return getCasingTextureID(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java index 0c5c5ba41f1..0d57fb78a95 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java @@ -390,12 +390,22 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec TextureFactory.builder() .addIcon(TexturesGtBlock.oMCAMegaAlloyBlastSmelterActive) .extFacing() + .build(), + TextureFactory.builder() + .addIcon(TexturesGtBlock.oMCAMegaAlloyBlastSmelterActiveGlow) + .extFacing() + .glow() .build() }; } return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)), TextureFactory.builder() .addIcon(TexturesGtBlock.oMCAMegaAlloyBlastSmelter) .extFacing() + .build(), + TextureFactory.builder() + .addIcon(TexturesGtBlock.oMCAMegaAlloyBlastSmelterGlow) + .extFacing() + .glow() .build() }; } return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)) }; diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 850e013a73c..78ea8d1d537 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -1630,12 +1630,6 @@ gt.solar.system.mercury=Mercury gt.solar.system.titan=Titan gt.solar.system.phobos=Phobos -item.flintSword.name=Flint Sword -item.flintAxe.name=Flint Axe -item.flintShovel.name=Flint Shovel -item.flintPickaxe.name=Flint Pickaxe -item.flintHoe.name=Flint Hoe - gt.multiBlock.controller.cokeOven=Coke Oven gt.locker.waila_armor_slot_none=Slot %s: §7None diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/active.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/active.png deleted file mode 100644 index ffd43d8dc23..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/active.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/active_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/active_glow.png deleted file mode 100644 index 3bb29bbda66..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/active_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/base.png deleted file mode 100644 index b119dc1ba04..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/inactive.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/inactive.png deleted file mode 100644 index 6092ec4c180..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/inactive.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/inactive_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/inactive_glow.png deleted file mode 100644 index b7955d63ab8..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BigLaserEngraver/inactive_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BlackLaserEngraver/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BlackLaserEngraver/base.png deleted file mode 100644 index de4345cf435..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/BlackLaserEngraver/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/Laserblock/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/Laserblock/base.png deleted file mode 100644 index 2ec2c2e004a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/Laserblock/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/active.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/active.png deleted file mode 100644 index ffd43d8dc23..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/active.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/active_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/active_glow.png deleted file mode 100644 index 3bb29bbda66..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/active_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/base.png deleted file mode 100644 index 84cd5fa9f22..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/inactive.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/inactive.png deleted file mode 100644 index 6092ec4c180..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/inactive.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/inactive_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/inactive_glow.png deleted file mode 100644 index b7955d63ab8..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/advChemicalProcessor/inactive_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/amperage/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/amperage/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/amperage/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cleanroom/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cleanroom/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cleanroom/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/active.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/active.png deleted file mode 100644 index 708971d8cf6..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/active.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/active_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/active_glow.png deleted file mode 100644 index c2866f45701..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/active_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/base.png deleted file mode 100644 index f125fa6bbcc..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/inactive.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/inactive.png deleted file mode 100644 index c684fbb353f..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/cokeOven/inactive.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/conveyor/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/conveyor/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/conveyor/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/active.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/active.png deleted file mode 100644 index ffd43d8dc23..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/active.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/active_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/active_glow.png deleted file mode 100644 index 3bb29bbda66..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/active_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/base.png deleted file mode 100644 index 99f62d97a47..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/inactive.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/inactive.png deleted file mode 100644 index 6092ec4c180..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/inactive.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/inactive_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/inactive_glow.png deleted file mode 100644 index b7955d63ab8..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/distillationTower/inactive_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/emitter/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/emitter/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/emitter/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/fieldGenerator/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/fieldGenerator/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/fieldGenerator/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/heater/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/heater/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/heater/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/insulator/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/insulator/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/insulator/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/inventory/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/inventory/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/inventory/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laser/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laser/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laser/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade1/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade1/base.png deleted file mode 100644 index 7e644d11cbc..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade1/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade2/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade2/base.png deleted file mode 100644 index d4ee6ed4028..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade2/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade3/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade3/base.png deleted file mode 100644 index dbc1a20f764..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade3/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade4/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade4/base.png deleted file mode 100644 index 1587cdeca69..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/laserengraverupgrade4/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/active.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/active.png deleted file mode 100644 index ffd43d8dc23..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/active.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/active_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/active_glow.png deleted file mode 100644 index 3bb29bbda66..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/active_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/inactive.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/inactive.png deleted file mode 100644 index 6092ec4c180..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/inactive.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/inactive_glow.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/inactive_glow.png deleted file mode 100644 index b7955d63ab8..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/macerator/inactive_glow.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/motor/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/motor/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/motor/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/piston/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/piston/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/piston/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/pump/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/pump/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/pump/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/robotArm/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/robotArm/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/robotArm/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/sensor/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/sensor/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/sensor/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/tank/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/tank/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/tank/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/wireless/base.png b/src/main/resources/assets/gregtech/textures/blocks/multitileentity/wireless/base.png deleted file mode 100644 index e05f5d89c7a..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/multitileentity/wireless/base.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/items/tools/flintAxe.png b/src/main/resources/assets/gregtech/textures/items/tools/flintAxe.png deleted file mode 100644 index 4a1a8c8334b..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/items/tools/flintAxe.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/items/tools/flintHoe.png b/src/main/resources/assets/gregtech/textures/items/tools/flintHoe.png deleted file mode 100644 index ed788a127f6..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/items/tools/flintHoe.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/items/tools/flintPickaxe.png b/src/main/resources/assets/gregtech/textures/items/tools/flintPickaxe.png deleted file mode 100644 index d26be7b33fe..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/items/tools/flintPickaxe.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/items/tools/flintShovel.png b/src/main/resources/assets/gregtech/textures/items/tools/flintShovel.png deleted file mode 100644 index 48290a5a995..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/items/tools/flintShovel.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/items/tools/flintSword.png b/src/main/resources/assets/gregtech/textures/items/tools/flintSword.png deleted file mode 100644 index a8c538a4fe7..00000000000 Binary files a/src/main/resources/assets/gregtech/textures/items/tools/flintSword.png and /dev/null differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated_glow.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated_glow.png new file mode 100644 index 00000000000..f0ed0a08e4a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated_glow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated_glow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated_glow.png.mcmeta new file mode 100644 index 00000000000..49e988e8bb3 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated_glow.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_glow.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_glow.png new file mode 100644 index 00000000000..a8b3e09375c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_glow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated_glow.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated_glow.png new file mode 100644 index 00000000000..abe6ca83b37 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated_glow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated_glow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated_glow.png.mcmeta new file mode 100644 index 00000000000..49e988e8bb3 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated_glow.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_glow.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_glow.png new file mode 100644 index 00000000000..24e26855a34 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_glow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedEBFGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedHeatExchangerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/advancedImplosionGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/algaePondBaseGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/alloyBlastSmelterGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/amazonPackagerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/chemicalPlantGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/cokeOvenGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/elementalDuplicatorGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/fluidHeaterGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/frothFlotationCellGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialArcFurnaceGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialChiselGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialCuttingMachineGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialDehydratorGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialElectrolyzerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialExtruderGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialForgeHammerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMixerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialMolecularTransformerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialPlatePressGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialRockBreakerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialSifterGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialThermalCentrifugeGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialVacuumFreezerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWashPlantGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillActiveGlow.png new file mode 100644 index 00000000000..7efce3bddf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillActiveGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillGlow.png new file mode 100644 index 00000000000..51e1d510935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillGlow.png.mcmeta new file mode 100644 index 00000000000..60af678259b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/industrialWiremillGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/largeRocketEngineGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/megaAlloyBlastSmelterGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/quantumForceTransformerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/spargeTowerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerActiveGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerActiveGlow.png new file mode 100644 index 00000000000..fb066be5770 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerActiveGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerActiveGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerActiveGlow.png.mcmeta new file mode 100644 index 00000000000..97596ba8176 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerActiveGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerGlow.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerGlow.png new file mode 100644 index 00000000000..e3c03505af5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerGlow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerGlow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerGlow.png.mcmeta new file mode 100644 index 00000000000..24f863c95ec --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/controllerFaces/thermalBoilerGlow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/mixin/java/gregtech/mixin/mixins/early/minecraft/ItemToolMaterialMixin.java b/src/mixin/java/gregtech/mixin/mixins/early/minecraft/ItemToolMaterialMixin.java new file mode 100644 index 00000000000..e4420b5def9 --- /dev/null +++ b/src/mixin/java/gregtech/mixin/mixins/early/minecraft/ItemToolMaterialMixin.java @@ -0,0 +1,20 @@ +package gregtech.mixin.mixins.early.minecraft; + +import net.minecraft.item.Item; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(Item.ToolMaterial.class) +public class ItemToolMaterialMixin { + + @Inject(method = "getEfficiencyOnProperMaterial", at = @At("HEAD"), cancellable = true) + public void gt5u$getEfficiencyOnProperMaterial(CallbackInfoReturnable cir) { + if ((Object) this == Item.ToolMaterial.WOOD) { + cir.setReturnValue(4.0F); + cir.cancel(); + } + } +}