From 1b820de08a05070909a267e17f033fcf58ac8710 Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Mon, 2 Sep 2024 23:17:17 +0200 Subject: The Great Renaming (#3014) * move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names --- .../java/com/elisis/gtnhlanth/GTNHLanthanides.java | 83 - src/main/java/com/elisis/gtnhlanth/Tags.java | 11 - .../api/recipe/LanthanidesRecipeMaps.java | 25 - .../com/elisis/gtnhlanth/client/ClientProxy.java | 6 - .../com/elisis/gtnhlanth/common/CommonProxy.java | 14 - .../gtnhlanth/common/beamline/BeamInformation.java | 51 - .../gtnhlanth/common/beamline/BeamLinePacket.java | 51 - .../common/beamline/IConnectsToBeamline.java | 14 - .../elisis/gtnhlanth/common/beamline/Particle.java | 71 - .../gtnhlanth/common/beamline/TileBeamline.java | 256 -- .../gtnhlanth/common/block/AntennaCasing.java | 15 - .../com/elisis/gtnhlanth/common/block/Casing.java | 80 - .../gtnhlanth/common/block/ShieldedAccGlass.java | 74 - .../gtnhlanth/common/hatch/TileBusInputFocus.java | 85 - .../common/hatch/TileHatchBeamlineConnector.java | 136 - .../common/hatch/TileHatchInputBeamline.java | 131 - .../common/hatch/TileHatchOutputBeamline.java | 138 - .../elisis/gtnhlanth/common/item/ICanFocus.java | 5 - .../elisis/gtnhlanth/common/item/LanthItem.java | 15 - .../com/elisis/gtnhlanth/common/item/MaskList.java | 162 - .../elisis/gtnhlanth/common/item/ParticleItem.java | 124 - .../common/item/PhotolithographicMask.java | 42 - .../common/register/BotWerkstoffMaterialPool.java | 88 - .../gtnhlanth/common/register/LanthItemList.java | 172 - .../common/register/WerkstoffMaterialPool.java | 2033 --------- .../gtnhlanth/common/tileentity/Digester.java | 241 -- .../common/tileentity/DissolutionTank.java | 264 -- .../elisis/gtnhlanth/common/tileentity/LINAC.java | 749 ---- .../gtnhlanth/common/tileentity/SourceChamber.java | 410 -- .../gtnhlanth/common/tileentity/Synchrotron.java | 1078 ----- .../gtnhlanth/common/tileentity/TargetChamber.java | 481 --- .../recipe/beamline/BeamlineRecipeAdder2.java | 166 - .../recipe/beamline/BeamlineRecipeLoader.java | 194 - .../tileentity/recipe/beamline/RecipeSC.java | 53 - .../tileentity/recipe/beamline/RecipeTC.java | 72 - .../recipe/beamline/SourceChamberFrontend.java | 24 - .../recipe/beamline/TargetChamberFrontend.java | 109 - .../com/elisis/gtnhlanth/loader/BotRecipes.java | 263 -- .../gtnhlanth/loader/MetaTileEntity_Loader.java | 4 - .../com/elisis/gtnhlanth/loader/RecipeLoader.java | 4508 -------------------- .../elisis/gtnhlanth/loader/ZPMRubberChanges.java | 409 -- .../gtnhlanth/util/DescTextLocalization.java | 24 - src/main/java/com/elisis/gtnhlanth/util/Util.java | 55 - .../com/elisis/gtnhlanth/xmod/nei/NEI_Config.java | 27 - 44 files changed, 13013 deletions(-) delete mode 100644 src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/Tags.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/api/recipe/LanthanidesRecipeMaps.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/beamline/BeamLinePacket.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/beamline/IConnectsToBeamline.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/beamline/Particle.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/beamline/TileBeamline.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/block/AntennaCasing.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/block/Casing.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/hatch/TileBusInputFocus.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/item/ICanFocus.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/item/LanthItem.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/item/ParticleItem.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/item/PhotolithographicMask.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/SourceChamber.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/TargetChamber.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeAdder2.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/RecipeSC.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/RecipeTC.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/SourceChamberFrontend.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/TargetChamberFrontend.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/loader/MetaTileEntity_Loader.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/loader/RecipeLoader.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/loader/ZPMRubberChanges.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/util/DescTextLocalization.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/util/Util.java delete mode 100644 src/main/java/com/elisis/gtnhlanth/xmod/nei/NEI_Config.java (limited to 'src/main/java/com/elisis') diff --git a/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java b/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java deleted file mode 100644 index 1683ca3ea0..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.elisis.gtnhlanth; - -import java.util.logging.Logger; - -import com.elisis.gtnhlanth.common.CommonProxy; -import com.elisis.gtnhlanth.common.register.BotWerkstoffMaterialPool; -import com.elisis.gtnhlanth.common.register.LanthItemList; -import com.elisis.gtnhlanth.common.register.WerkstoffMaterialPool; -import com.elisis.gtnhlanth.common.tileentity.recipe.beamline.BeamlineRecipeLoader; -import com.elisis.gtnhlanth.loader.BotRecipes; -import com.elisis.gtnhlanth.loader.RecipeLoader; -import com.github.bartimaeusnek.bartworks.API.WerkstoffAdderRegistry; - -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; - -@Mod( - modid = Tags.MODID, - version = Tags.VERSION, - name = Tags.MODNAME, - dependencies = "required-after:IC2; " + "required-after:gregtech; " - + "required-after:bartworks; " - + "required-after:GoodGenerator; " - + "before:miscutils; ") -public class GTNHLanthanides { - - public static Logger LOG = Logger.getLogger("GTNH:Lanthanides"); - - @Mod.Instance(Tags.MODID) - public static GTNHLanthanides instance; - - @SidedProxy( - clientSide = "com.elisis.gtnhlanth.client.ClientProxy", - serverSide = "com.elisis.gtnhlanth.common.CommonProxy") - public static CommonProxy proxy; - - @EventHandler - public static void preInit(FMLPreInitializationEvent e) { - - WerkstoffAdderRegistry.addWerkstoffAdder(new WerkstoffMaterialPool()); - WerkstoffAdderRegistry.addWerkstoffAdder(new BotWerkstoffMaterialPool()); - - LanthItemList.registerTypical(); - LanthItemList.registerGTMTE(); - - // GregTech_API.sAfterGTPostload.add(new ZPMRubberChanges()); - proxy.preInit(e); - } - - @EventHandler - public static void init(FMLInitializationEvent e) { - proxy.init(e); - WerkstoffMaterialPool.runInit(); - } - - @EventHandler - public static void postInit(FMLPostInitializationEvent e) { - - RecipeLoader.loadGeneral(); - RecipeLoader.loadLanthanideRecipes(); - RecipeLoader.addRandomChemCrafting(); - RecipeLoader.loadAccelerator(); - - BeamlineRecipeLoader.load(); - - BotRecipes.addGTRecipe(); - proxy.postInit(e); - - } - - @EventHandler - public static void onModLoadingComplete(FMLLoadCompleteEvent e) { - - BotRecipes.removeRecipes(); - RecipeLoader.removeCeriumSources(); - - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/Tags.java b/src/main/java/com/elisis/gtnhlanth/Tags.java deleted file mode 100644 index 461eac1db3..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/Tags.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.elisis.gtnhlanth; - -import gregtech.GT_Version; - -public class Tags { - - public static final String MODID = "gtnhlanth"; - public static final String MODNAME = "GTNH: Lanthanides"; - public static final String VERSION = GT_Version.VERSION; - public static final String GROUPNAME = "com.elisis.gtnhlanth"; -} diff --git a/src/main/java/com/elisis/gtnhlanth/api/recipe/LanthanidesRecipeMaps.java b/src/main/java/com/elisis/gtnhlanth/api/recipe/LanthanidesRecipeMaps.java deleted file mode 100644 index 4bf100b1d4..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/api/recipe/LanthanidesRecipeMaps.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.elisis.gtnhlanth.api.recipe; - -import gregtech.api.gui.modularui.GT_UITextures; -import gregtech.api.recipe.RecipeMap; -import gregtech.api.recipe.RecipeMapBackend; -import gregtech.api.recipe.RecipeMapBuilder; -import gregtech.nei.formatter.HeatingCoilSpecialValueFormatter; -import gregtech.nei.formatter.SimpleSpecialValueFormatter; - -public class LanthanidesRecipeMaps { - - public static final RecipeMap digesterRecipes = RecipeMapBuilder.of("gtnhlanth.recipe.digester") - .maxIO(1, 1, 1, 1) - .minInputs(1, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) - .neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE) - .build(); - public static final RecipeMap dissolutionTankRecipes = RecipeMapBuilder - .of("gtnhlanth.recipe.disstank") - .maxIO(2, 3, 2, 1) - .minInputs(1, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) - .neiSpecialInfoFormatter(new SimpleSpecialValueFormatter("value.disstank")) - .build(); -} diff --git a/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java b/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java deleted file mode 100644 index 4420975173..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.elisis.gtnhlanth.client; - -import com.elisis.gtnhlanth.common.CommonProxy; - -public class ClientProxy extends CommonProxy { -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java b/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java deleted file mode 100644 index 6e77ba200f..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.elisis.gtnhlanth.common; - -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; - -public class CommonProxy { - - public void preInit(FMLPreInitializationEvent e) {} - - public void init(FMLInitializationEvent e) {} - - public void postInit(FMLPostInitializationEvent e) {} -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java b/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java deleted file mode 100644 index 9c10703c2e..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.elisis.gtnhlanth.common.beamline; - -public class BeamInformation { - - private float energy; // in keV - private int rate; - - private Particle particle; - private int particleId; - - private float focus; - - public BeamInformation(float energy, int rate, int particleId, float focus) { - this.energy = energy; - this.rate = rate; - this.particleId = particleId; - this.particle = Particle.values()[particleId]; - this.focus = focus; - } - - public float getEnergy() { - return this.energy; - } - - public int getRate() { - return this.rate; - } - - public Particle getParticle() { - return this.particle; - } - - public int getParticleId() { - return this.particleId; - } - - public float getFocus() { - return this.focus; - } - - @Override - public String toString() { - return "Energy=" + this.getEnergy() - + ",Rate=" - + this.getRate() - + ",Particle=" - + this.getParticleId() - + ",Focus=" - + this.getFocus(); - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamLinePacket.java b/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamLinePacket.java deleted file mode 100644 index bbd712a9b0..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamLinePacket.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.elisis.gtnhlanth.common.beamline; - -import net.minecraft.nbt.NBTTagCompound; - -import com.github.technus.tectech.mechanics.dataTransport.DataPacket; - -public class BeamLinePacket extends DataPacket { - - public BeamLinePacket(BeamInformation content) { - super(content); - } - - public BeamLinePacket(NBTTagCompound compound) { - super(compound); - } - - @Override - protected BeamInformation contentFromNBT(NBTTagCompound nbt) { - /* - * NBTTagCompound compound = nbt.getCompoundTag("beamline"); - */ - return new BeamInformation( - nbt.getFloat("energy"), - nbt.getInteger("rate"), - nbt.getInteger("particleId"), - nbt.getInteger("focus")); - } - - @Override - protected NBTTagCompound contentToNBT() { - - NBTTagCompound compound = new NBTTagCompound(); - - compound.setFloat("energy", content.getEnergy()); - compound.setInteger("rate", content.getRate()); - compound.setInteger("particleId", content.getParticleId()); - compound.setFloat("focus", content.getFocus()); - - return compound; - } - - @Override - public boolean extraCheck() { - return true; - } - - @Override - protected BeamInformation unifyContentWith(BeamInformation arg0) { - throw new NoSuchMethodError("Unavailable to unify beam info data packet"); - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/beamline/IConnectsToBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/beamline/IConnectsToBeamline.java deleted file mode 100644 index 763365647c..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/beamline/IConnectsToBeamline.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.elisis.gtnhlanth.common.beamline; - -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; - -public interface IConnectsToBeamline extends IMetaTileEntity { - - boolean canConnect(ForgeDirection side); - - IConnectsToBeamline getNext(IConnectsToBeamline source); - - boolean isDataInputFacing(ForgeDirection side); -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/beamline/Particle.java b/src/main/java/com/elisis/gtnhlanth/common/beamline/Particle.java deleted file mode 100644 index f6bc2517f4..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/beamline/Particle.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.elisis.gtnhlanth.common.beamline; - -import net.minecraft.util.StatCollector; - -public enum Particle { - - ELECTRON(true, 0, 0.511f, 5000, "electron", "e\u207B", -1, null), - PHOTON(false, 1, 0, 0, "photon", "\u03B3", 0, null), - NEUTRON(false, 2, 939.57f, 15000, "neutron", "n\u2070", 0, null), - PROTON(true, 3, 938.27f, 15000, "proton", "p\u207A", 1, null), - ALPHA(true, 4, 3727.38f, 8000, "alpha", "\u03B1", 2, null); - - private boolean canAcc; - - private float restMass; // in MeV - - private float maxSourceEnergy; // in keV - - private String name; - private String shortName; - - private float charge; // in multiples of elemental charge - - private String chargeSpecial; - - private Particle(boolean canAcc, int id, float restMass, float maxSourceEnergy, String name, String shortName, - float charge, String chargeSpecial) { // ID - // is - // symbolic - // only - this.canAcc = canAcc; - this.restMass = restMass; - this.maxSourceEnergy = maxSourceEnergy; - this.name = name; - this.shortName = shortName; - this.charge = charge; - this.chargeSpecial = chargeSpecial; - } - - public float getMass() { - return this.restMass; - } - - public float getCharge() { - return this.charge; - } - - public String getChargeSpecial() { - return this.chargeSpecial; - } - - public boolean canAccelerate() { - return this.canAcc; - } - - public float maxSourceEnergy() { - return this.maxSourceEnergy; - } - - public String getName() { - return this.name; - } - - public String getLocalisedName() { - return StatCollector.translateToLocal("particle." + this.name) + " (" + this.shortName + ")"; - } - - public static Particle getParticleFromId(int id) { - return Particle.values()[id]; - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/beamline/TileBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/beamline/TileBeamline.java deleted file mode 100644 index 058234d2bb..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/beamline/TileBeamline.java +++ /dev/null @@ -1,256 +0,0 @@ -package com.elisis.gtnhlanth.common.beamline; - -import static gregtech.api.enums.Dyes.MACHINE_METAL; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -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.GT_Mod; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.common.GT_Client; -import gregtech.common.render.GT_TextureBuilder; - -public class TileBeamline extends MetaPipeEntity implements IConnectsToBeamline { - - private static Textures.BlockIcons.CustomIcon pipe; - - private byte connectionCount = 0; - - private boolean active; - - public TileBeamline(int id, String name, String nameRegional) { - super(id, name, nameRegional, 0); - } - - public TileBeamline(String name) { - super(name, 0); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if ((aTick & 31) == 31) { - mConnections = 0; - connectionCount = 0; - - for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { - ForgeDirection d1 = dir.getOpposite(); - TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(dir); - if (tTileEntity instanceof IConnectsToBeamline) { - if (((IConnectsToBeamline) tTileEntity).canConnect(d1)) { - mConnections |= 1 << dir.ordinal(); - connectionCount++; - } - } else if (tTileEntity instanceof IGregTechTileEntity) { - IMetaTileEntity meta = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); - if (meta instanceof IConnectsToBeamline) { - if (((IConnectsToBeamline) meta).canConnect(d1)) { - mConnections |= 1 << dir.ordinal(); - connectionCount++; - } - } - } - } - } - } else if (aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected == 4) { - aBaseMetaTileEntity.issueTextureUpdate(); - } - } - - @Override - public byte getTileEntityBaseType() { - return 7; - } - - @Override - public void loadNBTData(NBTTagCompound arg0) {} - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { - return new TileBeamline(mName); - } - - @Override - public void saveNBTData(NBTTagCompound arg0) {} - - @Override - public float getThickNess() { - if (GT_Mod.instance.isClientSide() && GT_Client.hideValue == 1) { - return 0.0625F; - } - return 0.5f; - } - - @Override - public boolean renderInside(ForgeDirection arg0) { - return false; - } - - @Override - public boolean canConnect(ForgeDirection side) { - return true; - } - - // Largely taken from Tec's DataPipe - - @Override - public IConnectsToBeamline getNext(IConnectsToBeamline source) { - - for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { - - if ((mConnections & 1 << dir.ordinal()) == 0) { - continue; - } - - TileEntity next = this.getBaseMetaTileEntity() - .getTileEntityAtSide(dir); - if (next instanceof IConnectsToBeamline && next != source) { - - if (((IConnectsToBeamline) next).isDataInputFacing(dir.getOpposite())) { - return (IConnectsToBeamline) next; - } - - } else if (next instanceof IGregTechTileEntity) { - - IMetaTileEntity meta = ((IGregTechTileEntity) next).getMetaTileEntity(); - if (meta instanceof IConnectsToBeamline && meta != source) { - - if (meta instanceof TileBeamline && (((TileBeamline) meta).connectionCount == 2)) { - - ((TileBeamline) meta).markUsed(); - return (IConnectsToBeamline) meta; - } - - if (((IConnectsToBeamline) meta).isDataInputFacing(dir.getOpposite())) { - - return (IConnectsToBeamline) meta; - } - } - } - } - - return null; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - pipe = new Textures.BlockIcons.CustomIcon("iconsets/pipe"); - super.registerIcons(aBlockIconRegister); - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection aSide, int aConnections, - int aColorIndex, boolean aConnected, boolean aRedstone) { - return new ITexture[] { new GT_TextureBuilder().addIcon(pipe) - .build(), - new GT_TextureBuilder().addIcon(pipe) - .setRGBA(Dyes.getModulation((byte) aColorIndex, MACHINE_METAL.getRGBA())) - .build() }; - } - - public void markUsed() { - this.active = true; - } - - @Override - public boolean isDataInputFacing(ForgeDirection side) { - return true; - } - - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - float tSpace = (1f - 0.375f) / 2; - float tSide0 = tSpace; - float tSide1 = 1f - tSpace; - float tSide2 = tSpace; - float tSide3 = 1f - tSpace; - float tSide4 = tSpace; - float tSide5 = 1f - tSpace; - - if (getBaseMetaTileEntity().getCoverIDAtSide(ForgeDirection.DOWN) != 0) { - tSide0 = tSide2 = tSide4 = 0; - tSide3 = tSide5 = 1; - } - if (getBaseMetaTileEntity().getCoverIDAtSide(ForgeDirection.UP) != 0) { - tSide2 = tSide4 = 0; - tSide1 = tSide3 = tSide5 = 1; - } - if (getBaseMetaTileEntity().getCoverIDAtSide(ForgeDirection.NORTH) != 0) { - tSide0 = tSide2 = tSide4 = 0; - tSide1 = tSide5 = 1; - } - if (getBaseMetaTileEntity().getCoverIDAtSide(ForgeDirection.SOUTH) != 0) { - tSide0 = tSide4 = 0; - tSide1 = tSide3 = tSide5 = 1; - } - if (getBaseMetaTileEntity().getCoverIDAtSide(ForgeDirection.WEST) != 0) { - tSide0 = tSide2 = tSide4 = 0; - tSide1 = tSide3 = 1; - } - if (getBaseMetaTileEntity().getCoverIDAtSide(ForgeDirection.EAST) != 0) { - tSide0 = tSide2 = 0; - tSide1 = tSide3 = tSide5 = 1; - } - - byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; - if ((tConn & 1 << ForgeDirection.DOWN.ordinal()) != 0) { - tSide0 = 0f; - } - if ((tConn & 1 << ForgeDirection.UP.ordinal()) != 0) { - tSide1 = 1f; - } - if ((tConn & 1 << ForgeDirection.NORTH.ordinal()) != 0) { - tSide2 = 0f; - } - if ((tConn & 1 << ForgeDirection.SOUTH.ordinal()) != 0) { - tSide3 = 1f; - } - if ((tConn & 1 << ForgeDirection.WEST.ordinal()) != 0) { - tSide4 = 0f; - } - if ((tConn & 1 << ForgeDirection.EAST.ordinal()) != 0) { - tSide5 = 1f; - } - - return AxisAlignedBB - .getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); - } - - @Override - public String[] getDescription() { - return new String[] { StatCollector.translateToLocal("beamline.pipe.desc.0"), // Beamline pipe - EnumChatFormatting.AQUA + StatCollector.translateToLocal("beamline.pipe.desc.1"), // Does not cross, split - // or turn - "Added by " + EnumChatFormatting.GREEN + "GTNH: Lanthanides" - - }; - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return false; - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/block/AntennaCasing.java b/src/main/java/com/elisis/gtnhlanth/common/block/AntennaCasing.java deleted file mode 100644 index ea7d8423df..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/block/AntennaCasing.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.elisis.gtnhlanth.common.block; - -public class AntennaCasing extends Casing { - - private int antennaTier; - - public AntennaCasing(int tier) { - super("antenna_t" + tier); - this.antennaTier = tier; - } - - public int getTier() { - return this.antennaTier; - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/block/Casing.java b/src/main/java/com/elisis/gtnhlanth/common/block/Casing.java deleted file mode 100644 index 71f581efbe..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/block/Casing.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.elisis.gtnhlanth.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import com.elisis.gtnhlanth.Tags; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; - -public class Casing extends Block { - - @SideOnly(Side.CLIENT) - protected IIcon[] texture; - - private String name; - - public Casing(String name) { - super(Material.iron); - this.name = name; - this.setBlockTextureName(Tags.MODID + ":casing." + name); - GregTech_API.registerMachineBlock(this, -1); - } - - public Casing(String name, Material material) { - super(material); - this.name = name; - this.setBlockTextureName(Tags.MODID + ":casing." + name); - GregTech_API.registerMachineBlock(this, -1); - } - - @Override - public int damageDropped(int meta) { - return meta; - } - - @Override - public String getHarvestTool(int aMeta) { - return "wrench"; - } - - @Override - public int getHarvestLevel(int aMeta) { - return 2; - } - - @Override - public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { - return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); - } - - @Override - public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - super.breakBlock(aWorld, aX, aY, aZ, aBlock, aMetaData); - } - - @Override - public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { - super.onBlockAdded(aWorld, aX, aY, aZ); - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - - @Override - public String getUnlocalizedName() { - return "casing." + this.name; - } - - @Override - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { - return false; - } - -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java b/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java deleted file mode 100644 index bdc57f1e59..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.elisis.gtnhlanth.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import com.elisis.gtnhlanth.Tags; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; - -public class ShieldedAccGlass extends Block { - - private static final String name = "shielded_accelerator_glass"; - - public ShieldedAccGlass() { - super(Material.glass); - this.setBlockName("casing." + name); - this.setBlockTextureName(Tags.MODID + ":casing." + name); - GregTech_API.registerMachineBlock(this, -1); - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } - - @Override - public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - } - - @Override - public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) { - if (GregTech_API.isMachineBlock(this, aMetaData)) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - } - - @Override - public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { - return Blocks.glass.getBlockHardness(aWorld, aX, aY, aZ); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) { - if (worldClient.getBlock(xCoord, yCoord, zCoord) instanceof ShieldedAccGlass) return false; - return super.shouldSideBeRendered(worldClient, xCoord, yCoord, zCoord, aSide); - } - - @Override - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { - return false; - } - -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileBusInputFocus.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileBusInputFocus.java deleted file mode 100644 index 43a6df9366..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileBusInputFocus.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.elisis.gtnhlanth.common.hatch; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -import com.elisis.gtnhlanth.common.item.ICanFocus; -import com.elisis.gtnhlanth.util.Util; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_NbtConsumable; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class TileBusInputFocus extends GT_MetaTileEntity_Hatch_NbtConsumable { - - private static final int INPUT_SLOTS = 4; - - public TileBusInputFocus(int id, String name, String nameRegional) { - super(id, name, nameRegional, 0, INPUT_SLOTS, "Input Bus for Foci", false); - } - - public TileBusInputFocus(String name, String[] descriptionArray, ITexture[][][] textures) { - super(name, 0, INPUT_SLOTS, descriptionArray, false, textures); - } - - @Override - public int getInputSlotCount() { - return INPUT_SLOTS; - } - - @Override - public boolean isFacingValid(ForgeDirection facing) { - return true; - } - - @Override - public AutoMap getItemsValidForUsageSlots() { - return new AutoMap<>(); - } - - @Override - public boolean isItemValidForUsageSlot(ItemStack aStack) { - - if (this.getContentUsageSlots() - .size() == 0) { - return aStack.getItem() instanceof ICanFocus; - } else { - return false; - } - - } - - @Override - public String getNameGUI() { - return "Focus Input Bus"; - } - - public void depleteFocusDurability(int damage) { - - ItemStack stack = this.getContentUsageSlots() - .toArray()[0]; - - Util.depleteDurabilityOfStack(stack, damage); - - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst) }; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst) }; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new TileBusInputFocus(mName, mDescriptionArray, mTextures); - } - -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java deleted file mode 100644 index 0c9cb9ad51..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.elisis.gtnhlanth.common.hatch; - -import static com.github.technus.tectech.util.CommonValues.MOVE_AT; -import static net.minecraft.util.StatCollector.translateToLocalFormatted; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidStack; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import com.elisis.gtnhlanth.common.beamline.IConnectsToBeamline; -import com.github.technus.tectech.mechanics.dataTransport.DataPacket; -import com.github.technus.tectech.util.TT_Utility; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; - -public abstract class TileHatchBeamlineConnector extends GT_MetaTileEntity_Hatch - implements IConnectsToBeamline { - - private String clientLocale = "en_US"; - - public T q; - - public short id = -1; - - protected TileHatchBeamlineConnector(int aID, String aName, String aNameRegional, int aTier, String descr) { - super(aID, aName, aNameRegional, aTier, 0, descr); - TT_Utility.setTier(aTier, this); - } - - protected TileHatchBeamlineConnector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 0, aDescription, aTextures); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setShort("eID", id); - if (q != null) { - aNBT.setTag("eDATA", q.toNbt()); - } - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - id = aNBT.getShort("eID"); - if (aNBT.hasKey("eDATA")) { - q = loadPacketFromNBT(aNBT.getCompoundTag("eDATA")); - } - } - - protected abstract T loadPacketFromNBT(NBTTagCompound nbt); - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (MOVE_AT == aTick % 20) { - if (q == null) { - getBaseMetaTileEntity().setActive(false); - } else { - getBaseMetaTileEntity().setActive(true); - moveAround(aBaseMetaTileEntity); - } - } - } - } - - public abstract void moveAround(IGregTechTileEntity aBaseMetaTileEntity); - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - try { - EntityPlayerMP player = (EntityPlayerMP) aPlayer; - clientLocale = (String) FieldUtils.readField(player, "translator", true); - } catch (Exception e) { - clientLocale = "en_US"; - } - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return false; - } - - @Override - public boolean isValidSlot(int aIndex) { - return false; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public String[] getInfoData() { - if (id > 0) { - return new String[] { - translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, - translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " - + EnumChatFormatting.AQUA - + (q != null ? q.getContentString() : 0), - translateToLocalFormatted("tt.keyword.PacketHistory", clientLocale) + ": " - + EnumChatFormatting.RED - + (q != null ? q.getTraceSize() : 0), }; - } - return new String[] { - translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " - + EnumChatFormatting.AQUA - + (q != null ? q.getContentString() : 0), - translateToLocalFormatted("tt.keyword.PacketHistory", clientLocale) + ": " - + EnumChatFormatting.RED - + (q != null ? q.getTraceSize() : 0), }; - } - - @Override - public String[] getDescription() { - return new String[] { "Text description shouldn't be seen, report to Tec", "High speed fibre optics connector.", - EnumChatFormatting.AQUA + "Must be painted to work" }; - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java deleted file mode 100644 index ffa0ecf56c..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.elisis.gtnhlanth.common.hatch; - -import static gregtech.api.enums.Dyes.MACHINE_METAL; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; - -import com.elisis.gtnhlanth.common.beamline.BeamLinePacket; -import com.elisis.gtnhlanth.common.beamline.IConnectsToBeamline; -import com.github.technus.tectech.util.TT_Utility; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -public class TileHatchInputBeamline extends TileHatchBeamlineConnector { - - private boolean delay = true; - - private static final String activeIconPath = "iconsets/OVERLAY_BI_ACTIVE"; - private static final String sideIconPath = "iconsets/OVERLAY_BI_SIDES"; - private static final String connIconPath = "iconsets/BI_CONN"; - - private static final Textures.BlockIcons.CustomIcon activeIcon = new Textures.BlockIcons.CustomIcon(activeIconPath); - private static final Textures.BlockIcons.CustomIcon sideIcon = new Textures.BlockIcons.CustomIcon(sideIconPath); - private static final Textures.BlockIcons.CustomIcon connIcon = new Textures.BlockIcons.CustomIcon(connIconPath); - - public TileHatchInputBeamline(int id, String name, String nameRegional, int tier) { - - super(id, name, nameRegional, tier, ""); - TT_Utility.setTier(tier, this); - } - - public TileHatchInputBeamline(String name, int tier, String[] desc, ITexture[][][] textures) { - super(name, tier, desc, textures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GT_RenderedTexture( - activeIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GT_RenderedTexture(connIcon) }; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GT_RenderedTexture( - sideIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GT_RenderedTexture(connIcon) }; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity tile) { - return new TileHatchInputBeamline(mName, mTier, mDescriptionArray, mTextures); - } - - @Override - protected BeamLinePacket loadPacketFromNBT(NBTTagCompound tag) { - return new BeamLinePacket(tag); - } - - @Override - public boolean isInputFacing(ForgeDirection side) { - return side == getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public boolean isDataInputFacing(ForgeDirection side) { - return isInputFacing(side); - } - - @Override - public boolean isOutputFacing(ForgeDirection aSide) { - return false; - } - - @Override - public boolean isFacingValid(ForgeDirection facing) { - return true; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean canConnect(ForgeDirection side) { - return isInputFacing(side); - } - - @Override - public IConnectsToBeamline getNext(IConnectsToBeamline source) { - return null; - } - - @Override - public String[] getDescription() { - return null; - } - - public void setContents(BeamLinePacket in) { - if (in == null) { - this.q = null; - } else { - if (in.getContent() - .getRate() > 0) { - this.q = in; - delay = true; - } else { - this.q = null; - } - } - } - - @Override - public void moveAround(IGregTechTileEntity tile) { - if (delay) { - delay = false; - } else { - this.setContents(null); - } - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java deleted file mode 100644 index 31a18ea58d..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.elisis.gtnhlanth.common.hatch; - -import static gregtech.api.enums.Dyes.MACHINE_METAL; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; - -import com.elisis.gtnhlanth.common.beamline.BeamLinePacket; -import com.elisis.gtnhlanth.common.beamline.IConnectsToBeamline; -import com.elisis.gtnhlanth.common.beamline.TileBeamline; -import com.github.technus.tectech.util.TT_Utility; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -public class TileHatchOutputBeamline extends TileHatchBeamlineConnector implements IConnectsToBeamline { - - private static final String activeIconPath = "iconsets/OVERLAY_BO_ACTIVE"; - private static final String sideIconPath = "iconsets/OVERLAY_BO_SIDES"; - private static final String connIconPath = "iconsets/BO_CONN"; - - private static final Textures.BlockIcons.CustomIcon activeIcon = new Textures.BlockIcons.CustomIcon(activeIconPath); - private static final Textures.BlockIcons.CustomIcon sideIcon = new Textures.BlockIcons.CustomIcon(sideIconPath); - private static final Textures.BlockIcons.CustomIcon connIcon = new Textures.BlockIcons.CustomIcon(connIconPath); - - public TileHatchOutputBeamline(int id, String name, String nameRegional, int tier) { - super(id, name, nameRegional, tier, ""); - TT_Utility.setTier(tier, this); - } - - public TileHatchOutputBeamline(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GT_RenderedTexture( - activeIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GT_RenderedTexture(connIcon) }; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GT_RenderedTexture( - sideIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GT_RenderedTexture(connIcon) }; - } - - @Override - public IConnectsToBeamline getNext(IConnectsToBeamline source) { - - IGregTechTileEntity base = this.getBaseMetaTileEntity(); - IGregTechTileEntity next = base.getIGregTechTileEntityAtSide(base.getFrontFacing()); - - if (next == null) { - return null; - } - - IMetaTileEntity meta = next.getMetaTileEntity(); - if (meta instanceof TileBeamline) { - - ((TileBeamline) meta).markUsed(); - return (IConnectsToBeamline) meta; - - } else if (meta instanceof TileHatchInputBeamline && ((TileHatchInputBeamline) meta).canConnect( - base.getFrontFacing() - .getOpposite())) { - - return (IConnectsToBeamline) meta; - } - - return null; - } - - @Override - public void moveAround(IGregTechTileEntity aBaseMetaTileEntity) { - IConnectsToBeamline current = this, source = this, next; - int range = 0; - while ((next = current.getNext(source)) != null && range++ < 100) { - if (next instanceof TileHatchInputBeamline) { - ((TileHatchInputBeamline) next).setContents(q); - break; - } - source = current; - current = next; - } - q = null; - } - - @Override - protected BeamLinePacket loadPacketFromNBT(NBTTagCompound nbt) { - return new BeamLinePacket(nbt); - } - - @Override - public boolean canConnect(ForgeDirection side) { - return this.isOutputFacing(side); - } - - @Override - public boolean isDataInputFacing(ForgeDirection side) { - return this.isInputFacing(side); - } - - @Override - public boolean isFacingValid(ForgeDirection facing) { - return true; - } - - @Override - public boolean isInputFacing(ForgeDirection aSide) { - return false; - } - - @Override - public boolean isOutputFacing(ForgeDirection side) { - return side == this.getBaseMetaTileEntity() - .getFrontFacing(); - } - - @Override - public String[] getDescription() { - return null; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { - return new TileHatchOutputBeamline(mName, mTier, mDescriptionArray, mTextures); - } -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/item/ICanFocus.java b/src/main/java/com/elisis/gtnhlanth/common/item/ICanFocus.java deleted file mode 100644 index 21cdb636c5..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/item/ICanFocus.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.elisis.gtnhlanth.common.item; - -public interface ICanFocus { - -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/item/LanthItem.java b/src/main/java/com/elisis/gtnhlanth/common/item/LanthItem.java deleted file mode 100644 index 062b9b1a91..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/item/LanthItem.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.elisis.gtnhlanth.common.item; - -import net.minecraft.item.Item; - -import com.elisis.gtnhlanth.Tags; - -public class LanthItem extends Item { - - public LanthItem(String name) { - super(); - this.setUnlocalizedName(name); - this.setTextureName(Tags.MODID + ":" + name); - } - -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java b/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java deleted file mode 100644 index 18423565ca..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.elisis.gtnhlanth.common.item; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.TierEU; - -public enum MaskList { - - // There are absolutely better ways of doing this than a GT Materials-esque Enum, some method of automatically - // scraping the wafer types would be preferable in particular - // Use Dyes._NULL to indicate a wafer's lack of a dedicated lens instead of null, if the wafer's mask is to be - // generated - // Ignore last argument if using all wafers - ERROR("error", "ERROR", 0, "", null, null, 0, 0, 0, 0, 0, null), - BLANK1("blank1", "T1 Blank", 0, "VISIBLE", null, null, 0, 0, 0, 0, 0, null), - BLANK2("blank2", "T2 Blank", 0, "UV", null, null, 0, 0, 0, 0, 0, null), - BLANK3("blank3", "T3 Blank", 0, "X-RAY", null, null, 0, 0, 0, 0, 0, null), - ILC("ilc", "Integrated Logic Circuit", 100, "", BLANK1, Dyes.dyeRed, TierEU.RECIPE_MV, 0.5e-3f, 4e-3f, 35, 1, - ItemList.Circuit_Wafer_ILC.get(1)), - RAM("ram", "Random Access Memory", 200, "", BLANK1, Dyes.dyeCyan, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 40, 2, - ItemList.Circuit_Wafer_Ram.get(1), ItemList.Circuit_Silicon_Wafer), - NAND("nand", "NAND", 200, "", BLANK2, Dyes._NULL, TierEU.RECIPE_HV, 7e-3f, 12e-3f, 40, 1, - ItemList.Circuit_Wafer_NAND.get(1), ItemList.Circuit_Silicon_Wafer), // NAND uses only Ender Pearl lens, don't - // ask me why - NOR("nor", "NOR", 100, "", BLANK2, Dyes._NULL, TierEU.RECIPE_LuV, 8e-3f, 10e-3f, 40, 1, - ItemList.Circuit_Wafer_NOR.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), // Same as - // above, - // but with - // ender - // eye - CPU("cpu", "Central Processing Unit", 10, "", BLANK2, Dyes.dyeWhite, TierEU.RECIPE_MV, 6e-3f, 12e-3f, 45, 2, - ItemList.Circuit_Wafer_CPU.get(1)), - SOC("soc", "SoC", 150, "", BLANK2, Dyes.dyeYellow, TierEU.RECIPE_EV, 3e-3f, 10e-3f, 45, 2, - ItemList.Circuit_Wafer_SoC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), - ASOC("asoc", "Advanced SoC", 120, "", BLANK2, Dyes.dyeGreen, TierEU.RECIPE_EV, 100e-3f, 200e-3f, 50, 2, - ItemList.Circuit_Wafer_SoC2.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), - PIC("pic", "Power IC", 100, "", BLANK2, Dyes.dyeBlue, TierEU.RECIPE_HV, 5e-3f, 10e-3f, 50, 4, - ItemList.Circuit_Wafer_PIC.get(1), ItemList.Circuit_Silicon_Wafer), - HPIC("hpic", "High Power IC", 80, "", BLANK3, null, TierEU.RECIPE_IV, 100e-3f, 200e-3f, 50, 6, - ItemList.Circuit_Wafer_HPIC.get(1), ItemList.Circuit_Silicon_Wafer), // Different, made in chemical reactor. - // Figure out something for - // this later? - NCPU("ncpu", "NanoCPU", 60, "", BLANK2, null, TierEU.RECIPE_EV, 5e-3f, 10e-3f, 50, 4, - ItemList.Circuit_Wafer_NanoCPU.get(1), ItemList.Circuit_Silicon_Wafer), // Same as above - QBIT("qbit", "QBit", 50, "", BLANK2, null, TierEU.RECIPE_EV, 3e-3f, 10e-3f, 50, 4, - ItemList.Circuit_Wafer_QuantumCPU.get(1), ItemList.Circuit_Silicon_Wafer), // ^ - UHPIC("uhpic", "Ultra High Power IC", 60, "", BLANK3, null, TierEU.RECIPE_LuV, 200e-3f, 400e-3f, 50, 8, - ItemList.Circuit_Wafer_UHPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), // You - // get - // the - // gist - SSOC("ssoc", "Simple SoC", 150, "", BLANK1, Dyes.dyeOrange, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 25, 1, - ItemList.Circuit_Wafer_Simple_SoC.get(1)), - ULPIC("ulpic", "Ultra Low Power IC", 200, "", BLANK1, Dyes.dyeGreen, TierEU.RECIPE_LV, 2e-3f, 4e-3f, 30, 1, - ItemList.Circuit_Wafer_ULPIC.get(1)), // Can use green for this as well as asoc, given - // the latter uses a different base mask - LPIC("lpic", "Low Power IC", 150, "", BLANK1, Dyes.dyeYellow, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 30, 2, - ItemList.Circuit_Wafer_LPIC.get(1)), // Same as above, except for yellow - NPIC("npic", "Nano Power IC", 70, "", BLANK3, Dyes.dyeRed, TierEU.RECIPE_LuV, 1, 100000, 50, 4, - ItemList.Circuit_Wafer_NPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, - ItemList.Circuit_Silicon_Wafer3), // Same - PPIC("ppic", "PPIC", 50, "", BLANK3, null, TierEU.RECIPE_ZPM, 10, 15, 50, 6, ItemList.Circuit_Wafer_PPIC.get(1), - ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, ItemList.Circuit_Silicon_Wafer3), // CR - // recipe - QPIC("qpic", "QPIC", 50, "", BLANK3, Dyes.dyeBlue, TierEU.RECIPE_UV, 5, 9, 50, 6, - ItemList.Circuit_Wafer_QPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, - ItemList.Circuit_Silicon_Wafer3, ItemList.Circuit_Silicon_Wafer4); // Different base mask to PIC - - String name; - String englishName; - String spectrum; - - int maxDamage; - - MaskList precursor; - Dyes lensColour; - - long engraverEUt; - - float minEnergy; - float maxEnergy; - - float minFocus; - int baselineAmount; - - ItemStack producedItem; - - ItemList[] forbiddenWafers; - - MaskList(String name, String englishName, int maxDamage, String spectrum, MaskList precursor, Dyes lensColour, - long engraverEUt, float minEnergy, float maxEnergy, float minFocus, int baselineAmount, ItemStack producedItem, - ItemList... forbiddenWafers) { - this.name = name; - this.englishName = englishName; - this.spectrum = spectrum; - this.maxDamage = maxDamage; - this.precursor = precursor; - this.lensColour = lensColour; - this.engraverEUt = engraverEUt; - this.minFocus = minFocus; - this.minEnergy = minEnergy; - this.maxEnergy = maxEnergy; - this.baselineAmount = baselineAmount; - this.producedItem = producedItem; - this.forbiddenWafers = forbiddenWafers; - } - - public String getName() { - return this.name; - } - - public String getEnglishName() { - return this.englishName; - } - - public String getSpectrum() { - return this.spectrum; - } - - public int getDamage() { - return this.maxDamage; - } - - public MaskList getPrecursor() { - return this.precursor; - } - - public Dyes getLensColour() { - return this.lensColour; - } - - public long getEngraverEUt() { - return this.engraverEUt; - } - - public float getMinEnergy() { - return this.minEnergy; - } - - public float getMaxEnergy() { - return this.maxEnergy; - } - - public float getMinFocus() { - return this.minFocus; - } - - public int getBaselineAmount() { - return this.baselineAmount; - } - - public ItemStack getProducedItem() { - return this.producedItem; - } - - public ItemList[] getForbiddenWafers() { - return this.forbiddenWafers; - } - -} diff --git a/src/main/java/com/elisis/gtnhlanth/common/item/ParticleItem.java b/src/main/java/com/elisis/gtnhlanth/common/item/ParticleItem.java deleted file mode 100644 index b6484b93a5..0000000000 --- a/src/main/java/com/elisis/gtnhlanth/common/item/ParticleItem.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.elisis.gtnhlanth.common.item; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; - -import com.elisis.gtnhlanth.Tags; -import com.elisis.gtnhlanth.common.beamline.Particle; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ParticleItem extends Item { - - public static final int NUMBER_OF_SUBTYPES = Particle.values().length; - - private static String[] names = new String[NUMBER_OF_SUBTYPES]; - - static { - populateNamesArray(); - } - - @SideOnly(Side.CLIENT) - private IIcon[] iconArray; - - public ParticleItem() { - - this.setHasSubtypes(true); - this.setMaxDamage(0); - - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIconFromDamage(int damage) { - int j = MathHelper.clamp_int(damage, 0, NUMBER_OF_SUBTYPES - 1); - return this.iconArray[j]; - } - - public String getUnlocalizedName(ItemStack stack) { - int i = MathHelper.clamp_int(stack.getItemDamage(), 0, NUMBER_OF_SUBTYPES - 1); - return super.getUnlocalizedName() + "." + names[i]; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @SideOnly(Side.CLIENT) - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < NUMBER_OF_SUBTYPES; ++i) { - list.add(new ItemStack(item, 1, i)); - } - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister register) { - this.iconArray = new IIcon[NUMBER_OF_SUBTYPES]; - - for (int i = 0; i < NUMBER_OF_SUBTYPES; ++i) { - this.iconArray[i] = register.registerIcon(Tags.MODID + ":" + "particle/" + names[i]); - } - } - - @SideOnly(Side.CLIENT) - @Override - public String getItemStackDisplayName(ItemStack stack) { - - int i = MathHelper.clamp_int(stack.getItemDamage(), 0, N