diff options
| author | Raven Szewczyk <git@eigenraven.me> | 2024-07-20 15:35:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-20 21:35:26 +0700 |
| commit | 8b077c28bea7bcc046be1e4b8485d69b4c245a43 (patch) | |
| tree | 8601728fda54a11c894fa0a5533672ca40023af8 /src/main/java/com | |
| parent | a33bca92fbf9ec0a1d7f42f5a1a08b807739007c (diff) | |
| download | GT5-Unofficial-8b077c28bea7bcc046be1e4b8485d69b4c245a43.tar.gz GT5-Unofficial-8b077c28bea7bcc046be1e4b8485d69b4c245a43.tar.bz2 GT5-Unofficial-8b077c28bea7bcc046be1e4b8485d69b4c245a43.zip | |
Beamline (#2619)
* Beamline
* Remove hardcoded dreamcraft items and spotless
* Remove logs and fix auto structure check
* Remove logs and fix auto structure check
* Fix typo and synchrotron high MF scaling
* sa
(cherry picked from commit b2796d95538a1b683b4a98bf6cb0f8fe21404fbd)
* Add multi textures, add structuredesc info, remove test TC input, add synchrotron/input/output recipes
* Spotless
* Prevent mob spawning on casings
* Fix LINAC glass requirement, make synchrotron structure less ugly, add last recipe
* Spotless
* Add placeholder particle textures
* Add some mask recipes I missed
* Spotless apply for branch lanth-beamline for #2619 (#2630)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Add further error messages to LINAC and Synchrotron, fix MM & LaB6 recipes
* Spotless apply for branch lanth-beamline for #2619 (#2648)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Minor changes, add more multi error messages & 9x U-238 SC recipe
* Spotless apply for branch lanth-beamline for #2619 (#2651)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Missed a change
* Spotless apply for branch lanth-beamline for #2619 (#2652)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Update beamline desc
* Remove comments, move coolant fluid check to Util class
* Spotless
* Spotless apply for branch lanth-beamline for #2619 (#2666)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Fix Mu-Metal recipe output amount, tool stats for MM & LaB6
* Spotless
* Fix multi hatch textures
* Spotless apply for branch lanth-beamline for #2619 (#2676)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Increase Synchrotron output rate eut & antenna tier scaling, in general improve output rates, buff all TC recipes' processing time
* Fix misleading BL tooltip
* update
* remove import
* Buff higher-tier wafer recipes for each IC, from a 4x to 3x increase of recipe amount per two wafer tier increases
* Remove RA1 calls in beamline (#2716)
* Spotless apply for branch lanth-beamline for #2619 (#2717)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* fix
* Spotless apply for branch lanth-beamline for #2619 (#2733)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
---------
Co-authored-by: unknown <gtandemmodding@gmail.com>
Co-authored-by: Elisis <jarrad.thomson@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/com')
36 files changed, 5928 insertions, 54 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java b/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java index 275e8ae107..8ffdc0b5a1 100644 --- a/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java +++ b/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java @@ -1,18 +1,15 @@ package com.elisis.gtnhlanth; -import java.util.Arrays; import java.util.logging.Logger; -import net.minecraftforge.oredict.OreDictionary; - 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 com.github.bartimaeusnek.bartworks.system.material.Werkstoff; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -21,8 +18,6 @@ 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; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_Log; @Mod( modid = Tags.MODID, @@ -46,9 +41,13 @@ public class GTNHLanthanides { @EventHandler public static void preInit(FMLPreInitializationEvent e) { + WerkstoffAdderRegistry.addWerkstoffAdder(new WerkstoffMaterialPool()); WerkstoffAdderRegistry.addWerkstoffAdder(new BotWerkstoffMaterialPool()); - LanthItemList.register(); + + LanthItemList.registerTypical(); + LanthItemList.registerGTMTE(); + // GregTech_API.sAfterGTPostload.add(new ZPMRubberChanges()); proxy.preInit(e); } @@ -61,37 +60,45 @@ public class GTNHLanthanides { @EventHandler public static void postInit(FMLPostInitializationEvent e) { + RecipeLoader.loadGeneral(); RecipeLoader.loadLanthanideRecipes(); RecipeLoader.addRandomChemCrafting(); + RecipeLoader.loadAccelerator(); + + BeamlineRecipeLoader.load(); + BotRecipes.addGTRecipe(); // RecipeLoader.loadZylonRecipes(); proxy.postInit(e); // GT_Log.out.print(FluidRegistry.getFluid("Sodium Tungstate").getName()); - GT_Log.out.print( - Arrays.toString( - Werkstoff.werkstoffNameHashMap.keySet() - .toArray())); - GT_Log.out.print( - Arrays.toString( - Werkstoff.werkstoffHashMap.keySet() - .toArray())); - - GT_Log.out.print( - "HMMM " + Arrays.toString( - OreDictionary - .getOreIDs(WerkstoffMaterialPool.DephosphatedSamariumConcentrate.get(OrePrefixes.dust, 1)))); + // GT_Log.out.print(Arrays.toString(Werkstoff.werkstoffNameHashMap.keySet().toArray())); + // GT_Log.out.print(Arrays.toString(Werkstoff.werkstoffHashMap.keySet().toArray())); + + /* + * GT_Log.out.print("HMMM " + Arrays.toString(OreDictionary.getOreIDs( + * WerkstoffMaterialPool.DephosphatedSamariumConcentrate.get(OrePrefixes.dust, 1)))); + */ } @EventHandler public static void onModLoadingComplete(FMLLoadCompleteEvent e) { - GT_Log.out.print("AAAAAAAAAAAAAA"); + // GT_Log.out.print("AAAAAAAAAAAAAA " + new + // ItemStack(LanthItemList.maskMap.get(MaskList.CPU)).getUnlocalizedName()); // - GT_Log.out.print("We are done loading"); + // GT_Log.out.print("We are done loading"); BotRecipes.removeRecipes(); RecipeLoader.removeCeriumSources(); - GT_Log.out.print("blah blah " + WerkstoffMaterialPool.PTMEGElastomer.hasGenerationFeature(OrePrefixes.ingot)); + /* + * for (GT_ItemStack stack : BeamlineRecipeAdder.instance.TargetChamberRecipes.mRecipeItemMap.keySet()) { + * GT_Log.out.print(" Recipes for: " + stack.mItem.getUnlocalizedName() + ": "); for (GT_Recipe recipe : + * BeamlineRecipeAdder.instance.TargetChamberRecipes.mRecipeItemMap.get(stack)) { + * GT_Log.out.print(Arrays.toString(recipe.mOutputs)); } } + */ + + // GT_Log.out.print("blah blah " + + // WerkstoffMaterialPool.PTMEGElastomer.hasGenerationFeature(OrePrefixes.ingot)); } } diff --git a/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java b/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java new file mode 100644 index 0000000000..9c10703c2e --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamInformation.java @@ -0,0 +1,51 @@ +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 new file mode 100644 index 0000000000..bbd712a9b0 --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/beamline/BeamLinePacket.java @@ -0,0 +1,51 @@ +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 new file mode 100644 index 0000000000..763365647c --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/beamline/IConnectsToBeamline.java @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000000..f6bc2517f4 --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/beamline/Particle.java @@ -0,0 +1,71 @@ +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 new file mode 100644 index 0000000000..058234d2bb --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/beamline/TileBeamline.java @@ -0,0 +1,256 @@ +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 new file mode 100644 index 0000000000..ea7d8423df --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/block/AntennaCasing.java @@ -0,0 +1,15 @@ +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 new file mode 100644 index 0000000000..71f581efbe --- /dev/null +++ b/src/main/java/com/elisis/gtnhlanth/common/block/Casing.java @@ -0,0 +1,80 @@ +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 mat |
