aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/elisis
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/com/elisis
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
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
Diffstat (limited to 'src/main/java/com/elisis')
-rw-r--r--src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java83
-rw-r--r--src/main/java/com/elisis/gtnhlanth/Tags.java11
-rw-r--r--src/main/java/com/elisis/gtnhlanth/api/recipe/LanthanidesRecipeMaps.java25
-rw-r--r--src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java6
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java14
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java51
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/beamline/BeamLinePacket.java51
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/beamline/IConnectsToBeamline.java14
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/beamline/Particle.java71
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/beamline/TileBeamline.java256
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/block/AntennaCasing.java15
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/block/Casing.java80
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java74
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileBusInputFocus.java85
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java136
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java131
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java138
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/item/ICanFocus.java5
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/item/LanthItem.java15
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java162
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/item/ParticleItem.java124
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/item/PhotolithographicMask.java42
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java88
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java172
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java2033
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java241
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java264
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java749
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/SourceChamber.java410
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java1078
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/TargetChamber.java481
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeAdder2.java166
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java194
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/RecipeSC.java53
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/RecipeTC.java72
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/SourceChamberFrontend.java24
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/TargetChamberFrontend.java109
-rw-r--r--src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java263
-rw-r--r--src/main/java/com/elisis/gtnhlanth/loader/MetaTileEntity_Loader.java4
-rw-r--r--src/main/java/com/elisis/gtnhlanth/loader/RecipeLoader.java4508
-rw-r--r--src/main/java/com/elisis/gtnhlanth/loader/ZPMRubberChanges.java409
-rw-r--r--src/main/java/com/elisis/gtnhlanth/util/DescTextLocalization.java24
-rw-r--r--src/main/java/com/elisis/gtnhlanth/util/Util.java55
-rw-r--r--src/main/java/com/elisis/gtnhlanth/xmod/nei/NEI_Config.java27
44 files changed, 0 insertions, 13013 deletions
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<RecipeMapBackend> 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<RecipeMapBackend> 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<BeamInformation> {
-
- 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;
-