diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2018-09-16 22:44:58 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2018-09-16 22:44:58 +0200 |
commit | c05995f211407bc8538b35695254e6934d90c054 (patch) | |
tree | 939a7b2ec72fad1772eb7f32b1638a2946c7453f /src/main | |
parent | c9836c63aa11d409c2085a12701acf6aff20f642 (diff) | |
download | GT5-Unofficial-c05995f211407bc8538b35695254e6934d90c054.tar.gz GT5-Unofficial-c05995f211407bc8538b35695254e6934d90c054.tar.bz2 GT5-Unofficial-c05995f211407bc8538b35695254e6934d90c054.zip |
Source Upload
Diffstat (limited to 'src/main')
37 files changed, 1691 insertions, 0 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java new file mode 100644 index 0000000000..1a19fa32d6 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java @@ -0,0 +1,26 @@ +package com.github.bartimaeusnek.bartworks; + +import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_Destructopack; +import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack; +import cpw.mods.fml.common.network.IGuiHandler; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +public class GuiHandler implements IGuiHandler { + + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + switch (ID){ + case 0: return new GT_Container_Item_Destructopack(player.inventory); + } + return null; + } + + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + switch (ID){ + case 0: return new GT_GUIContainer_Destructopack(player.inventory); + } + return null; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java new file mode 100644 index 0000000000..8e7bb21122 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -0,0 +1,66 @@ +package com.github.bartimaeusnek.bartworks; + + +import codechicken.nei.NEIActions; +import codechicken.nei.NEIClientUtils; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.asm.NEICorePlugin; +import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab; +import com.github.bartimaeusnek.bartworks.common.ConfigHandler; +import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import com.github.bartimaeusnek.bartworks.common.loaders.LoaderRegistry; +import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor; +import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import gregtech.api.enums.GT_Values; +import gregtech.nei.NEI_GT_Config; +import net.minecraft.creativetab.CreativeTabs; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +@Mod( + modid = MainMod.modID, name = MainMod.name, version = MainMod.version, + dependencies = "required-after:IC2; " + + "required-after:gregtech; " + ) +public final class MainMod { + public static final String name = "BartWorks"; + public static final String version = "@version@"; + public static final String modID = "bartworks"; + public static final Logger logger = LogManager.getLogger(name); + public static boolean GTNH = false; + public static final CreativeTabs GT2 = new GT2Tab("GT2C"); + public static final IGuiHandler GH = new GuiHandler(); + @Mod.Instance(modID) + public static MainMod instance; + public static ConfigHandler CHandler; + + + @Mod.EventHandler + public void preInit(FMLPreInitializationEvent preinit) { + if(Loader.isModLoaded("dreamcraft")) { + GTNH = true; + } + CHandler= new ConfigHandler(preinit); + if (GTNH) + logger.info("GTNH-Detected . . . ACTIVATE HARDMODE."); + } + @Mod.EventHandler + public void init(FMLInitializationEvent init) { + new LoaderRegistry().run(); + } + + @Mod.EventHandler + public void postInit(FMLPostInitializationEvent postinit) { + NetworkRegistry.INSTANCE.registerGuiHandler(instance,GH); + } + + + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java new file mode 100644 index 0000000000..82188db9c5 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java @@ -0,0 +1,17 @@ +package com.github.bartimaeusnek.bartworks.client.creativetabs; + +import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; + +public class GT2Tab extends CreativeTabs { + + public GT2Tab (String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return ItemRegistry.tab; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java new file mode 100644 index 0000000000..4946bdb328 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java @@ -0,0 +1,31 @@ +package com.github.bartimaeusnek.bartworks.client.gui; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GT_GUIContainer_Destructopack extends GuiContainer +{ + public GT_GUIContainer_Destructopack(InventoryPlayer inventory) { + super(new GT_Container_Item_Destructopack(inventory)); + } + public static final ResourceLocation texture = new ResourceLocation(MainMod.modID, "textures/GT2/gui/Destructopack.png"); + + @Override + public void drawGuiContainerBackgroundLayer(float f, int j, int i) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, 175, 165); + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + } + + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java new file mode 100644 index 0000000000..574bc89536 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java @@ -0,0 +1,60 @@ +package com.github.bartimaeusnek.bartworks.client.gui; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; +import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import gregtech.api.gui.GT_GUIContainer; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +import java.awt.*; + +public class GT_GUIContainer_LESU extends GT_GUIContainer { + + protected GT_Container_LESU mContainer; + + public static final ResourceLocation texture = new ResourceLocation(MainMod.modID, "textures/GT2/gui/LESU.png"); + private GT_TileEntity_LESU c; + + public GT_GUIContainer_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_LESU(aInventoryPlayer, aTileEntity), texture.getResourceDomain()); + mContainer = ((GT_Container_LESU)this.inventorySlots); + c = ((GT_TileEntity_LESU)(this.mContainer.mTileEntity.getMetaTileEntity())); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.drawString(this.fontRendererObj,"L.E.S.U.", 11, 8, 16448255); + if (this.mContainer != null) { + String percell = String.valueOf(c.energyPerCell).substring(1); + this.drawString(this.fontRendererObj,"EU: " + String.valueOf(this.mContainer.mEnergy), 11, 16, 16448255); + this.drawString(this.fontRendererObj,"MAX: " + (this.c.getBaseMetaTileEntity().isActive() ? String.valueOf(this.mContainer.mOutput)+ percell : Integer.toString(0)), 11, 24, 16448255); + this.drawString(this.fontRendererObj,"MAX EU/t IN: " + String.valueOf(this.mContainer.mInput), 11, 32, 16448255); + this.drawString(this.fontRendererObj,"EU/t OUT: " + String.valueOf(this.mContainer.mOutput), 11, 40, 16448255); + this.drawString(this.fontRendererObj,"AMP/t IN/OUT: " + String.valueOf(c.getBaseMetaTileEntity().getInputAmperage()), 11, 48, 16448255); + if (c.maxEUStore() >= Long.MAX_VALUE-1) { + this.drawString(this.fontRendererObj, "Maximum Capacity!", 11, 56, Color.YELLOW.getRGB()); + } + if (!this.c.getBaseMetaTileEntity().isActive()) { + this.drawString(this.fontRendererObj,"Multiple Controllers!", 11, 56, Color.RED.getRGB()); + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + final long tScale = this.mContainer.mEnergy / Math.max(1, c.maxEUStore() / 116); + this.drawTexturedModalRect(x + 8, y + 73, 0, 251, (int) tScale, 5); + } + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java new file mode 100644 index 0000000000..e1dbebf049 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java @@ -0,0 +1,31 @@ +package com.github.bartimaeusnek.bartworks.common; + + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gregtech.api.enums.GT_Values; +import net.minecraftforge.common.config.Configuration; + +import java.io.File; + +public class ConfigHandler { + public static int IDOffset = 12500; + public static final int IDU=1+ GT_Values.VN.length; + public static boolean ezmode = false; + public static boolean teslastaff = false; + public final Configuration c; + public ConfigHandler(FMLPreInitializationEvent e){ + c = new Configuration(new File(e.getModConfigurationDirectory().toString()+"/"+MainMod.modID+".cfg")); + + IDOffset=c.get("System","ID Offset",12500,"ID Offset for this mod. This Mod uses "+IDU+" IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").getInt(12500); + GT_TileEntity_LESU.energyPerCell=c.get("Multiblocks","energyPerLESUCell",1000000,"This will set Up the Energy per LESU Cell",1000000,Integer.MAX_VALUE).getInt(1000000); + ezmode=c.get("System","Mode switch",false,"If GTNH is Loaded, this will enable easy recipes, if not, it will enable harder recipes.").getBoolean(false); + MainMod.GTNH = ezmode ? !MainMod.GTNH : MainMod.GTNH; + teslastaff=c.get("System","Enable Teslastaff",false,"Enables the Teslastaff, an Item used to destroy Electric Armors").getBoolean(false); + + if (c.hasChanged()) + c.save(); + } + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java new file mode 100644 index 0000000000..983ec42653 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java @@ -0,0 +1,63 @@ +package com.github.bartimaeusnek.bartworks.common.blocks; + +import com.github.bartimaeusnek.bartworks.MainMod; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import java.util.List; + +public class BW_Blocks extends Block { + + public BW_Blocks(String name, String[] texture) { + super(Material.anvil); + this.setHardness(15.0F); + this.setResistance(30.0F); + this.name = name; + this.textureNames=texture; + this.setCreativeTab(MainMod.GT2); + } + + @SideOnly(Side.CLIENT) + private IIcon[] texture; + private String[] textureNames; + private String name; + + @Override + public int damageDropped(final int meta) { + return meta; + } + + @Override + public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { + for (int i = 0; i < textureNames.length; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return meta < texture.length ? texture[meta] : texture[0]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister par1IconRegister){ + texture = new IIcon[textureNames.length]; + for (int i = 0; i < textureNames.length; i++) { + texture[i] = par1IconRegister.registerIcon(textureNames[i]); + } + } + + @Override + public String getUnlocalizedName(){ + return name; + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java new file mode 100644 index 0000000000..959a67014e --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java @@ -0,0 +1,60 @@ +package com.github.bartimaeusnek.bartworks.common.items; + +import com.github.bartimaeusnek.bartworks.MainMod; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import java.util.List; + +public class BW_ItemBlocks extends ItemBlock { + + public BW_ItemBlocks(final Block par1){ + super(par1); + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setCreativeTab(MainMod.GT2); + } + + protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + + @Override + public int getMetadata(final int aMeta) { + return aMeta; + } + + @Override + public String getUnlocalizedName(final ItemStack aStack) { + return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack); + } + + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + aList.add(this.mNoMobsToolTip); + aList.add(this.mNoTileEntityToolTip); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int pass) { + return this.field_150939_a.getIcon(0,stack.getItemDamage()); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + return getIcon(stack, renderPass); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_) { + return this.field_150939_a.getIcon(0,p_77618_2_); + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java new file mode 100644 index 0000000000..3747bb2141 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java @@ -0,0 +1,35 @@ +package com.github.bartimaeusnek.bartworks.common.items; + +import com.github.bartimaeusnek.bartworks.MainMod; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.items.GT_Generic_Item; +import gregtech.api.util.GT_Config; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import sun.applet.Main; + +public class GT_Destructopack_Item extends GT_Generic_Item +{ + + public GT_Destructopack_Item() { + super("GT2Destructopack","Destructopack","Mobile Trash Bin"); + this.setMaxStackSize(1); + this.setNoRepair(); + this.setHasSubtypes(false); + this.setCreativeTab(MainMod.GT2); + } + + @Override + public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + aPlayer.openGui(MainMod.instance, 0, aWorld, 0, 0, 0); + return aStack; + } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aIconRegister) { + this.mIcon = aIconRegister.registerIcon("bartworks:gt.GT2Destructopack"); + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java new file mode 100644 index 0000000000..7e4ef6c05c --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java @@ -0,0 +1,145 @@ +package com.github.bartimaeusnek.bartworks.common.items; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.google.common.collect.Sets; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemTool; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class GT_Rockcutter_Item extends ItemTool implements IElectricItem +{ + @SideOnly(Side.CLIENT) + private IIcon icon; + + public int mCharge; + public int mTransfer; + public int mTier; + public static Set mineableBlocks = Sets.newHashSet(Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.clay); + private int multi; + public GT_Rockcutter_Item(int aTier) { + super(2*aTier, ToolMaterial.EMERALD, mineableBlocks); + this.mTier = aTier; + multi = (int) Math.pow(10,(mTier-1)); + this.mineableBlocks = new HashSet(); + this.maxStackSize=1; + this.mCharge = 10000 * multi; + this.mTransfer = (int) GT_Values.V[mTier]; + this.efficiencyOnProperMaterial = 2.0f*mTier; + this.setCreativeTab(MainMod.GT2); + this.setMaxDamage(27+ 10*multi); + this.setNoRepair(); + this.setUnlocalizedName("GT_Rockcutter_Item_"+ GT_Values.VN[mTier]); + } + + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + aList.add("Tier: " + GT_Values.VN[this.mTier]); + } + + public void onUpdate(ItemStack aStack, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + if (!ElectricItem.manager.canUse(aStack, 500*multi)) { + if (aStack.isItemEnchanted()) { + aStack.getTagCompound().removeTag("ench"); + } + } + else if (!aStack.isItemEnchanted()) { + aStack.addEnchantment(Enchantment.silkTouch,3); + } + } + + public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + ElectricItem.manager.use(aStack, 0, aPlayer); + return false; + } + + public boolean onBlockDestroyed(final ItemStack var1, final World var2, final Block var3, final int var4, final int var5, final int var6, final EntityLivingBase var7) { + ElectricItem.manager.use(var1, 0, var7); + if (ElectricItem.manager.canUse(var1, 500*multi)) { + ElectricItem.manager.use(var1, 500*multi, var7); + } + else{ + ElectricItem.manager.discharge(var1, Integer.MAX_VALUE, Integer.MAX_VALUE, true,true, false); + } + return true; + } + + @Override + public boolean canHarvestBlock(Block par1Block, ItemStack itemStack) { + return par1Block.getMaterial().equals(Material.glass) || par1Block.getMaterial().equals(Material.clay) || par1Block.getMaterial().equals(Material.packedIce) || par1Block.getMaterial().equals(Material.ice) || par1Block.getMaterial().equals(Material.sand) || par1Block.getMaterial().equals(Material.ground) || par1Block.getMaterial().equals(Material.rock) || this.mineableBlocks.contains(par1Block); + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } + + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + + @Override + public double getMaxCharge(ItemStack itemStack) { + return this.mCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return this.mTier; + } + + @Override + public double getTransferLimit(ItemStack itemStack) { + return this.mTransfer; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.icon = iconRegister.registerIcon("bartworks:GT_Rockcutter"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java new file mode 100644 index 0000000000..addc694783 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java @@ -0,0 +1,122 @@ +package com.github.bartimaeusnek.bartworks.common.items; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.google.common.collect.Sets; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemTool; +import net.minecraft.util.IIcon; + +import java.util.List; +import java.util.Set; + +public class GT_Teslastaff_Item extends ItemTool implements ic2.api.item.IElectricItem +{ + public double mCharge; + public double mTransfer; + public int mTier; + private static Set effective = Sets.newHashSet(Blocks.web); + + @SideOnly(Side.CLIENT) + private IIcon icon; + + public GT_Teslastaff_Item() { + super(0, ToolMaterial.GOLD, effective); + this.setCreativeTab(MainMod.GT2); + this.setNoRepair(); + this.mCharge = 10000000D; + this.mTransfer = 8192D; + this.mTier = 4; + this.setMaxStackSize(1); + this.setMaxDamage(27); + this.setUnlocalizedName("GT_Teslastaff_Item"); + } + + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + aList.add("No warranty!"); + } + + public boolean hitEntity(ItemStack aStack, EntityLivingBase aTarget, EntityLivingBase aPlayer) { + if (aTarget instanceof EntityLiving && ElectricItem.manager.canUse(aStack, 9000000)) { + final EntityLiving tTarget = (EntityLiving)aTarget; + final EntityLivingBase tPlayer = (EntityLivingBase)aPlayer; + ElectricItem.manager.use(aStack, 9000000, tPlayer); + for (int i = 1; i < 5; ++i) { + if (tTarget.getEquipmentInSlot(i) != null && tTarget.getEquipmentInSlot(i).getItem() instanceof IElectricItem) { + tTarget.setCurrentItemOrArmor(i,null); + } + } + } + return true; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + + @Override + public double getMaxCharge(ItemStack itemStack) { + return this.mCharge; + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public int getTier(ItemStack itemStack) { + return this.mTier; + } + + @Override + public double getTransferLimit(ItemStack itemStack) { + return this.mTransfer; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.icon = iconRegister.registerIcon("bartworks:GT_Teslastaff"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java new file mode 100644 index 0000000000..41b72f6369 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java @@ -0,0 +1,21 @@ +package com.github.bartimaeusnek.bartworks.common.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; + +public class SimpleIconItem extends Item { + + String tex; + + public SimpleIconItem(String tex){ + super(); + this.tex=tex; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + itemIcon=iconRegister.registerIcon("bartworks:"+tex); + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java new file mode 100644 index 0000000000..0ceeb19d1c --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java @@ -0,0 +1,48 @@ +package com.github.bartimaeusnek.bartworks.common.loaders; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.ConfigHandler; +import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks; +import com.github.bartimaeusnek.bartworks.common.items.*; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.block.Block; +import net.minecraft.item.Item; + +public class ItemRegistry implements Runnable { + + public static final Item Destructopack = new GT_Destructopack_Item(); + public static final Item Teslastaff = new GT_Teslastaff_Item(); + public static final Item RockcutterLV = new GT_Rockcutter_Item(1); + public static final Item RockcutterMV = new GT_Rockcutter_Item(2); + public static final Item RockcutterHV = new GT_Rockcutter_Item(3); + public static final Item tab = new SimpleIconItem("GT2Coin"); + public static final Block[] BW_BLOCKS = { + new BW_Blocks("BW_ItemBlocks", new String[] + { + MainMod.modID+":EtchedLapisCell", + MainMod.modID+":PlatedLapisCell", + }), + + new BW_Blocks("GT_LESU_CASING", new String[]{ + MainMod.modID+":LESU_CELL", + }), + + }; + + + @Override + public void run() { + + GameRegistry.registerBlock(BW_BLOCKS[0], BW_ItemBlocks.class,"BW_ItemBlocks"); + + GameRegistry.registerBlock(BW_BLOCKS[1],BW_ItemBlocks.class,"GT_LESU_CASING"); + + if (ConfigHandler.teslastaff) + GameRegistry.registerItem(Teslastaff,Teslastaff.getUnlocalizedName()); + + GameRegistry.registerItem(RockcutterLV,RockcutterLV.getUnlocalizedName()); + GameRegistry.registerItem(RockcutterMV,RockcutterMV.getUnlocalizedName()); + GameRegistry.registerItem(RockcutterHV,RockcutterHV.getUnlocalizedName()); + GameRegistry.registerItem(tab,"tabIconGT2"); + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LoaderRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LoaderRegistry.java new file mode 100644 index 0000000000..199f4068bf --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/LoaderRegistry.java @@ -0,0 +1,14 @@ +package com.github.bartimaeusnek.bartworks.common.loaders; + +public class LoaderRegistry implements Runnable { + public ItemRegistry items = new ItemRegistry(); + public RecipeLoader recipes = new RecipeLoader(); + + @Override + public void run() { + items.run(); + recipes.run(); + } + + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java new file mode 100644 index 0000000000..dc7a7acda8 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java @@ -0,0 +1,149 @@ +package com.github.bartimaeusnek.bartworks.common.loaders; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.ConfigHandler; +import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor; +import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; + +public class RecipeLoader implements Runnable { + + private final static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE; + + @Override + public void run() { + + if(MainMod.GTNH) { + GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(Blocks.lapis_block),Materials.Iron.getMolten(1296L),new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0),100,(int) (GT_Values.V[3]-(GT_Values.V[3]/10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0), Materials.Lapis.getPlates(9), GT_OreDictUnificator.get(OrePrefixes.circuit,Materials.Advanced,2L), GT_Utility.getIntegratedCircuit(17)}, FluidRegistry.getFluidStack("ic2coolant",1000),new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1),100,(int) (GT_Values.V[3]-(GT_Values.V[3]/10))); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1), Materials.Lapis.getBlocks(8), GT_Utility.getIntegratedCircuit(17)}, GT_Values.NF, new ItemStack(ItemRegistry.BW_BLOCKS[1]),100,(int) (GT_Values.V[3]-(GT_Values.V[3]/10))); + } + else { + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{Materials.Lapis.getBlocks(8), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L), GT_Utility.getIntegratedCircuit(17)}, GT_Values.NF, new ItemStack(ItemRegistry.BW_BLOCKS[1]), 100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.BW_BLOCKS[1]), + bitsd, + new Object[]{ + "LLL", + "LCL", + "LLL", + 'L', Materials.Lapis.getBlocks(1), + 'C', "circuitBasic" + }); + + GT_Values.RA.addCutterRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[1]),new ItemStack(ItemRegistry.BW_BLOCKS[0],9,1),GT_Values.NI,100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + GT_Values.RA.addCompressorRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],9,1),new ItemStack(ItemRegistry.BW_BLOCKS[1]),100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + GT_Values.RA.addCompressorRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],9,0),new ItemStack(ItemRegistry.BW_BLOCKS[1]),100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0),bitsd,new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1)}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1),bitsd,new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0)}); + } + + GT_ModHandler.addCraftingRecipe( + new GT_TileEntity_LESU(ConfigHandler.IDOffset,"LESU","LESU").getStackForm(1L), + bitsd, + new Object[]{ + "CDC", + "SBS", + "CFC", + 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, MainMod.GTNH ? Materials.Advanced : Materials.Basic,1L), + 'D', ItemList.Cover_Screen.get(1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.cableGt12, MainMod.GTNH ? Materials.Platinum : Materials.AnnealedCopper,1L), + 'B', new ItemStack(ItemRegistry.BW_BLOCKS[1]), + 'F', MainMod.GTNH ? ItemList.Field_Generator_HV.get(1L) : ItemList.Field_Generator_LV.get(1L) + }); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.Destructopack), + bitsd, + new Object[]{ + "CPC", + "PLP", + "CPC", + 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced,1L), + 'P', GT_OreDictUnificator.get(MainMod.GTNH ? OrePrefixes.plateDouble : OrePrefixes.plate, Materials.Aluminium,1L), + 'L', new ItemStack(Items.lava_bucket) + }); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.Destructopack), + bitsd, + new Object[]{ + "CPC", + "PLP", + "CPC", + 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced,1L), + 'P', GT_OreDictUnificator.get(MainMod.GTNH ? OrePrefixes.plateDouble : OrePrefixes.plate, MainMod.GTNH ? Materials.Steel : Materials.Iron,1L), + 'L', new ItemStack(Items.lava_bucket) + }); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.RockcutterMV), + bitsd, + new Object[]{ + "DS ", + "DP ", + "DCB", + 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond,1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.stick,Materials.TungstenSteel,1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate,Materials.TungstenSteel,1L), + 'C', "circuitGood", + 'B', ItemList.IC2_AdvBattery.get(1L) + }); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.RockcutterLV), + bitsd, + new Object[]{ + "DS ", + "DP ", + "DCB", + 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond,1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.stick,Materials.Titanium,1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Titanium,1L), + 'C', "circuitBasic", + 'B', ItemList.IC2_ReBattery.get(1L) + }); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.RockcutterHV), + bitsd, + new Object[]{ + "DS ", + "DP ", + "DCB", + 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond,1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.stick,Materials.Iridium,1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Iridium,1L), + 'C', "circuitAdvanced", + 'B', ItemList.IC2_EnergyCrystal.get(1L) + }); + + if (ConfigHandler.teslastaff) + GT_ModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.Teslastaff), + bitsd, + new Object[]{ + "BO ", + "OP ", + " P", + 'O', GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Superconductor,1L), + 'B', ItemList.Energy_LapotronicOrb.get(1L), + 'P', "plateAlloyIridium", + }); + + for (int i = 0; i < GT_Values.VN.length; i++) { + new GT_MetaTileEntity_EnergyDistributor(ConfigHandler.IDOffset+1+i,"Energy Distributor "+GT_Values.VN[i], "Energy Distributor "+GT_Values.VN[i], i, "Splits Amperage into several Sides"); + } + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java new file mode 100644 index 0000000000..fd5e1a60bb --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java @@ -0,0 +1,53 @@ +package com.github.bartimaeusnek.bartworks.common.tileentities; + +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Transformer; + +public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Transformer { + + public GT_MetaTileEntity_EnergyDistributor(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_EnergyDistributor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public GT_MetaTileEntity_EnergyDistributor(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_EnergyDistributor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + } + + public long maxEUInput() { + return GT_Values.V[this.mTier]; + } + + public long maxEUOutput() { + return GT_Values.V[this.mTier]; + } + + public long maxAmperesOut() { + return 64*5; + } + + public long maxAmperesIn() { + return 256; + } + + @Override + public long maxEUStore() { + return 512L + (GT_Values.V[this.mTier ] * 256L); + } + + public String[] getDescription() { + return new String[] {mDescription,"Voltage: "+ ChatColorHelper.YELLOW +GT_Values.V[this.mTier],"Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(),"Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut()}; + } + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java new file mode 100644 index 0000000000..f4dca5cb4c --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java @@ -0,0 +1,403 @@ +package com.github.bartimaeusnek.bartworks.common.tileentities; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_LESU; +import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU; +import com.github.bartimaeusnek.bartworks.util.ConnectedBlocksChecker; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; + + +public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { + + @SideOnly(Side.CLIENT) + static IIcon[] iIcons = new IIcon[4]; + @SideOnly(Side.CLIENT) + static IIconContainer[] iIconContainers = new IIconContainer[4]; + @SideOnly(Side.CLIENT) + static ITexture[][] iTextures = new ITexture[4][1]; + @SideOnly(Side.CLIENT) + static final byte TEXID_SIDE = 0; + @SideOnly(Side.CLIENT) + static final byte TEXID_CHARGING = 1; + @SideOnly(Side.CLIENT) + static final byte TEXID_IDLE = 2; + @SideOnly(Side.CLIENT) + static final byte TEXID_EMPTY = 3; + + public static long energyPerCell = 100000L; + + private long mStorage; + public ConnectedBlocksChecker connectedcells; + public ItemStack[] circuits = new ItemStack[5]; + + public GT_TileEntity_LESU(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + this.mStorage = energyPerCell; + } + + public GT_TileEntity_LESU(String aName){ + super(aName); + } + + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public long maxEUStore() { + return (this.mStorage >= Long.MAX_VALUE-1 || this.mStorage < 0) ? Long.MAX_VALUE-1 : this.mStorage; + } + + @Override + public long maxAmperesIn() { + int ret = 0; + for (int i = 0 ; i < 5; ++i) + if (this.circuits[i] != null && this.circuits[i].getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem())) + ret += this.circuits[i].getItemDamage(); + return ret > 0 ? ret : 1; + } + + @Override + public long maxAmperesOut() { + return maxAmperesIn(); + } + + @Override + public long maxEUInput() { + + for (int i = 1; i < GT_Values.V.length; i++) { + if (maxEUOutput() <= GT_Values.V[i] && maxEUOutput() > GT_Values.V[i-1]) + return Math.min(GT_Values.V[i],32768L); + } + + return 8; + } + + @Override + public long maxEUOutput() { + return Math.min(Math.max(this.mStorage / energyPerCell, 1L), 32768L); + } + + @Override + public int rechargerSlotStartIndex() { + return 0; + } + + @Override + public int rechargerSlotCount() { + return 1; + } + + @Override + public int dechargerSlotStartIndex() { + return 1; + } + + @Override + public int dechargerSlotCount() { + return 1; + } + + @Override + public boolean isTeleporterCompatible() { + return true; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new GT_TileEntity_LESU(mName); + } + + @Override + public String[] getDescription() { + return new String[]{ + + }; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + for (int i = 0; i < iTextures.length; i++) { + iIcons[i]=aBlockIconRegister.registerIcon(MainMod.modID+":LESU_CASING_"+i); + final int finalI = i; + iIconContainers[i]=new IIconContainer() { + @Override + public IIcon getIcon() { + return iIcons[finalI]; + } + + @Override + public IIcon getOverlayIcon() { + return iIcons[finalI]; + } + + @Override + public ResourceLocation getTextureFile() { + return new ResourceLocation(MainMod.modID+":LESU_CASING_"+ finalI); + } + }; + } + + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_LESU(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_LESU(aPlayerInventory, aBaseMetaTileEntity); + } + + public boolean isServerSide() { + return !isClientSide(); + } + + public boolean isClientSide() { + if (getWorld() != null) + return getWorld().isRemote ? FMLCommonHandler.instance().getSide() == Side.CLIENT : FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT; + return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT; + } + + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + + ITexture[] ret = new ITexture[0]; + + if(this.isClientSide()) { + for (int i = 0; i < iTextures.length; i++) { + iTextures[i][0] = new GT_RenderedTexture(iIconContainers[i], Dyes.getModulation(0, Dyes.MACHINE_METAL.mRGBa)); + } + + if (aSide == aFacing && this.getBaseMetaTileEntity().getUniversalEnergyStored() <= 0) + ret = iTextures[TEXID_EMPTY]; + else if (aSide == aFacing && !aActive) + ret = iTextures[TEXID_IDLE]; + else if (aSide == aFacing && aActive) + ret = iTextures[TEXID_CHARGING]; + else + ret = iTextures[TEXID_SIDE]; + } + + return ret; + } + + @Override + public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { + return true; + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { + return true; + } + + @Override + public int getSizeInventory() { + return 6; + } + + @Override + public ItemStack getStackInSlot(int p_70301_1_) { + if (p_70301_1_ > 1) + return this.circuits[(p_70301_1_-2)]; + return this.mInventory[p_70301_1_]; + } + + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { + if (p_70299_1_ < 2) + this.mInventory[p_70299_1_]=p_70299_2_; + else + this.circuits[(p_70299_1_-2)]=p_70299_2_; + } + + @Override + public String getInventoryName() { + return "L.E.S.U."; + } + + @Override + public boolean hasCustomInventoryName() { + return true; + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { + return true; + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + + switch (p_94041_1_){ + case 0: case 1: + return true; + default: + return p_94041_2_.getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem()); + } + } + + @Override + public boolean isCorrectMachinePart(ItemStack itemStack) { + return true; + } + + @Override + public boolean checkRecipe(ItemStack itemStack) { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + checkMachine(aBaseMetaTileEntity, null); + super.onFirstTick(aBaseMetaTileEntity); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + this.mMaxProgresstime = 1; + if (aTick % 20 == 0) + checkMachine(aBaseMetaTileEntity, null); + this.mWrench = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mHardHammer = true; + this.mSolderingTool = true; + this.mCrowbar = true; + } + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public boolean onRunningTick(ItemStack aStack){ + this.mMaxProgresstime=1; + + return true; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setIntArray("customCircuitInv",GT_Utility.stacksToIntArray(this.circuits)); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + int[] stacks = aNBT.getIntArray("customCircuitInv"); + for (int i = 0; i < stacks.length ; i++) { + this.circuits[i]=GT_Utility.intToStack(stacks[i]); + } + super.loadNBTData(aNBT); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) { + connectedcells = new ConnectedBlocksChecker(); + connectedcells.get_connected(aBaseMetaTileEntity.getWorld(),aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord(), ItemRegistry.BW_BLOCKS[1]); + + if (connectedcells.get_meta_of_sideblocks(aBaseMetaTileEntity.getWorld(),this.getBaseMetaTileEntity().getMetaTileID(),new int[]{aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()},true)) + { + this.getBaseMetaTileEntity().disableWorking(); + this.getBaseMetaTileEntity().setActive(false); + this.mStorage=0; + this.mMaxProgresstime=0; + this.mProgresstime=0; + return false; + } + + this.mEfficiency=this.getMaxEfficiency(null); + this.mStorage=(energyPerCell * connectedcells.hashset.size() >= Long.MAX_VALUE-1 || energyPerCell * connectedcells.hashset.size() < 0) ? Long.MAX_VALUE-1 : energyPerCell * connectedcells.hashset.size() ; + this.mMaxProgresstime=1; + this.mProgresstime=0; + + this.mCrowbar=true; + this.mHardHammer=true; + this.mScrewdriver=true; + this.mSoftHammer=true; + this.mSolderingTool=true; + this.mWrench=true; + + this.getBaseMetaTileEntity().enableWorking(); + this.getBaseMetaTileEntity().setActive(true); + + return true; + } + + @Override + public int getMaxEfficiency(ItemStack itemStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack itemStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack itemStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack itemStack) { + return false; + } + + public World getWorld() { + return this.getBaseMetaTileEntity().getWorld(); + } + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java new file mode 100644 index 0000000000..0de2b8b98f --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java @@ -0,0 +1,58 @@ +package com.github.bartimaeusnek.bartworks.server.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_Item_Destructopack extends Container { + + public GT_Container_Item_Destructopack(InventoryPlayer inventory) { + + addSlotToContainer(new delslot()); + + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + for (int i = 0; i < 9; i++) { + addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); + } + } + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int aSlotIndex) { + final Slot slotObject = (Slot) this.inventorySlots.get(aSlotIndex); + slotObject.putStack(null); + return null; + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) { + return true; + } + @Override + public void onCraftMatrixChanged(IInventory p_75130_1_) + { + final Slot slotObject = (Slot) this.inventorySlots.get(0); + slotObject.decrStackSize(0); + } + + + class delslot extends Slot{ + public delslot() + { + super(new InventoryPlayer(null), 0, 80, 17); + } + + public void putStack(ItemStack p_75215_1_) + { + p_75215_1_=null; + this.onSlotChanged(); + } + + + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java new file mode 100644 index 0000000000..8b91ccf315 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java @@ -0,0 +1,37 @@ +package com.github.bartimaeusnek.bartworks.server.container; + +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_LESU extends GT_Container_MultiMachine { + + public GT_Container_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public GT_Container_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 128, 14)); + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 128, 50)); + this.addSlotToContainer(new Slot(this.mTileEntity, 2, 152, 5)); + this.addSlotToContainer(new Slot(this.mTileEntity, 3, 152, 23)); + this.addSlotToContainer(new Slot(this.mTileEntity, 4, 152, 41)); + this.addSlotToContainer(new Slot(this.mTileEntity, 5, 152, 59)); + } + + public int getSlotCount() { + return 6; + } + + public int getShiftClickSlotCount() { + return 6; + } + +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java new file mode 100644 index 0000000000..456a98cf76 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/ChatColorHelper.java @@ -0,0 +1,27 @@ +package com.github.bartimaeusnek.bartworks.util; + +public class ChatColorHelper { + + public static final String BLACK = (char) 167 + "0"; + public static final String DARKBLUE = (char) 167 + "1"; + public static final String DARKGREEN = (char) 167 + "2"; + public static final String DARKAQUA = (char) 167 + "3"; + public static final String DARKRED = (char) 167 + "4"; + public static final String DARKPURPLE = (char) 167 + "5"; + public static final String GOLD = (char) 167 + "6"; + public static final String GRAY = (char) 167 + "7"; + public static final String DARKGRAY = (char) 167 + "8"; + public static final String BLUE = (char) 167 + "9"; + public static final String GREEN = (char) 167 + "a"; + public static final String AQUA = (char) 167 + "b"; + public static final String RED = (char) 167 + "c"; + public static final String LIGHT_PURPLE = (char) 167 + "d"; + public static final String YELLOW = (char) 167 + "e"; + public static final String WHITE = (char) 167 + "f"; + public static final String OBFUSCATED = (char) 167 + "k"; + public static final String BOLD = (char) 167 + "l"; + public static final String STRIKETHROUGH = (char) 167 + "m"; + public static final String UNDERLINE = (char) 167 + "n"; + public static final String ITALIC = (char) 167 + "o"; + public static final String RESET = (char) 167 + "r"; +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java new file mode 100644 index 0000000000..71a158463c --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/ConnectedBlocksChecker.java @@ -0,0 +1,171 @@ +package com.github.bartimaeusnek.bartworks.util; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import java.util.HashSet; +import java.util.Objects; + +public class ConnectedBlocksChecker { + + public final HashSet<Coords> hashset = new HashSet<Coords>(); + + public int get_connected(World w, int x, int y, int z, Block b){ + int ret = 0; + + byte sides = check_sourroundings(w, x, y, z, b); + + if (((sides | 0b111110) == 0b111111) && !hashset.contains(new Coords(x,y+1,z))) { + ret++; + ret += get_connected(w, x, y + 1, z,b); + } + + if (( (sides | 0b111101) == 0b111111) && !hashset.contains(new Coords(x,y-1,z))) { + ret++; + ret += get_connected(w, x, y - 1, z,b); + } + + if (( (sides | 0b111011) == 0b111111) && !hashset.contains(new Coords(x+1,y,z))) { + ret++; + ret += get_connected(w, x+1, y, z,b); + } + + if (( (sides | 0b110111) == 0b111111) && !hashset.contains(new Coords(x-1,y,z))) { + ret++; + ret += get_connected(w, x-1, y, z,b); + } + + if (( (sides | 0b101111) == 0b111111) && !hashset.contains(new Coords(x,y,z+1))) { + ret++; + ret += get_connected(w, x, y, z+1,b); + } + + if (( (sides | 0b011111) == 0b111111) && !hashset.contains(new Coords(x,y,z-1))) { + ret++; + ret += get_connected(w, x, y, z-1,b); + } + + return ret; + } + + + public byte check_sourroundings(World w, int x, int y, int z,Block b){ + + byte ret = 0; + + if (hashset.contains(new Coords(x,y,z))) + return ret; + + hashset.add(new Coords(x,y,z)); + + if (w.getBlock(x,y+1,z).equals(b)) + ret = (byte) (ret | 0b000001); + + if (w.getBlock(x,y-1,z).equals(b)) + ret = (byte) (ret | 0b000010); + + if (w.getBlock(x+1,y,z).equals(b)) + ret = (byte) (ret | 0b000100); + + if (w.getBlock(x-1,y,z).equals(b)) + ret = (byte) (ret | 0b001000); + + if (w.getBlock(x,y,z+1).equals(b)) + ret = (byte) (ret | 0b010000); + + if (w.getBlock(x,y,z-1).equals(b)) + ret = (byte) (ret | 0b100000); + + return ret; + } + + public boolean get_meta_of_sideblocks(World w, int n, int[] xyz, boolean GT){ + + Coords Controller = new Coords(xyz[0],xyz[1],xyz[2]); + + for (Coords C : hashset){ + if (GT) { + TileEntity t; + t = w.getTileEntity(C.x, C.y + 1, C.z); + if (t != null && !new Coords(C.x, C.y + 1, C.z).equals(Controller)) { + if (t instanceof IGregTechTileEntity) + if (((IGregTechTileEntity) t).getMetaTileID() == n) + return true; + } + t = w.getTileEntity(C.x, C.y - 1, C.z); + if (t != null && !new Coords(C.x, C.y - 1, C.z).equals(Controller)) { + if (t instanceof IGregTechTileEntity) + if (((IGregTechTileEntity) t).getMetaTileID() == n) + return true; + } + t = w.getTileEntity(C.x + 1, C.y, C.z); + if (t != null && !new Coords(C.x + 1, C.y, C.z).equals(Controller)) { + if (t instanceof IGregTechTileEntity) + if (((IGregTechTileEntity) t).getMetaTileID() == n) + return true; + } + t = w.getTileEntity(C.x - 1, C.y, C.z); + if (t != null && !new Coords(C.x - 1, C.y, C.z).equals(Controller)) { + if (t instanceof IGregTechTileEntity) + if (((IGregTechTileEntity) t).getMetaTileID() == n) + return true; + } + t = w.getTileEntity(C.x, C.y, C.z + 1); + if (t != null && !new Coords(C.x, C.y, C.z + 1).equals(Controller)) { + if (t instanceof IGregTechTileEntity) + if (((IGregTechTileEntity) t).getMetaTileID() == n) + return true; + } + t = w.getTileEntity(C.x, C.y, C.z - 1); + if (t != null && !new Coords(C.x, C.y, C.z - 1).equals(Controller)) { + if (t instanceof IGregTechTileEntity) + if (((IGregTechTileEntity) t).getMetaTileID() == n) + return true; + } + }else { + if (n == w.getBlockMetadata(C.x, C.y + 1, C.z) && !new Coords(C.x, C.y + 1, C.z).equals(Controller)) + return true; + if (n == w.getBlockMetadata(C.x, C.y - 1, C.z) && !new Coords(C.x, C.y - 1, C.z).equals(Controller)) + return true; + if (n == w.getBlockMetadata(C.x + 1, C.y, C.z) && !new Coords(C.x + 1, C.y, C.z).equals(Controller)) + return true; + if (n == w.getBlockMetadata(C.x - 1, C.y, C.z) && !new Coords(C.x - 1, C.y, C.z).equals(Controller)) + return true; + if (n == w.getBlockMetadata(C.x, C.y, C.z + 1) && !new Coords(C.x, C.y, C.z + 1).equals(Controller)) + return true; + if (n == w.getBlockMetadata(C.x, C.y, C.z - 1) && !new Coords(C.x, C.y, C.z - 1).equals(Controller)) + return true; + } + } + return false; + } + + + class Coords { + + public int x,y,z; + + public Coords(int x, int y, int z){ + this.x=x; + this.y=y; + this.z=z; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Coords coords = (Coords) o; + return x == coords.x && + y == coords.y && + z == coords.z; + } + + @Override + public int hashCode() { + return Objects.hash(x, y, z); + } + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java new file mode 100644 index 0000000000..2b634986d2 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java @@ -0,0 +1,30 @@ +package com.github.bartimaeusnek.bartworks.util; + +import codechicken.nei.api.API; +import codechicken.nei.api.IConfigureNEI; +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import cpw.mods.fml.common.Optional; +import net.minecraft.item.ItemStack; + +@Optional.Interface(iface = "codechicken.nei.api.API", modid = "NotEnoughItems") +public class NEIbartworksConfig implements IConfigureNEI { + + @Optional.Method(modid="NotEnoughItems") + @Override + public String getName() { + return MainMod.name; + } + + @Optional.Method(modid="NotEnoughItems") + @Override + public String getVersion() { + return MainMod.version; + } + + @Optional.Method(modid="NotEnoughItems") + @Override + public void loadConfig() { + API.hideItem(new ItemStack(ItemRegistry.tab)); + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/bartworks/lang/en_US.lang b/src/main/resources/assets/bartworks/lang/en_US.lang new file mode 100644 index 0000000000..ebb7c3ff15 --- /dev/null +++ b/src/main/resources/assets/bartworks/lang/en_US.lang @@ -0,0 +1,8 @@ +item.GT_Rockcutter_Item_LV.name=Rockcutter LV +item.GT_Rockcutter_Item_MV.name=Rockcutter MV +item.GT_Rockcutter_Item_HV.name=Rockcutter HV +item.GT_Teslastaff_Item.name=Teslastaff +BW_ItemBlocks.0.name=Etched Lapis Cell +BW_ItemBlocks.1.name=Plated Lapis Cell +GT_LESU_CASING.0.name=LESU Casing +itemGroup.GT2C=Gregtech 2 Compat diff --git a/src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.png b/src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.png Binary files differnew file mode 100644 index 0000000000..b4a5e95cfe --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.png diff --git a/src/main/resources/assets/bartworks/textures/GT2/gui/LESU.png b/src/main/resources/assets/bartworks/textures/GT2/gui/LESU.png Binary files differnew file mode 100644 index 0000000000..d295b015f6 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/GT2/gui/LESU.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.png b/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.png Binary files differnew file mode 100644 index 0000000000..8922a3d4e2 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/EtchedLapisCell.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.png b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.png Binary files differnew file mode 100644 index 0000000000..0fd516231e --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_0.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.png b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.png Binary files differnew file mode 100644 index 0000000000..acdb3b4e6a --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_1.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.png b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.png Binary files differnew file mode 100644 index 0000000000..1feeb1fd92 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_2.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.png b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.png Binary files differnew file mode 100644 index 0000000000..c6de6719e9 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/LESU_CASING_3.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.png b/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.png Binary files differnew file mode 100644 index 0000000000..f41b59f820 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/LESU_CELL.png diff --git a/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.png b/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.png Binary files differnew file mode 100644 index 0000000000..336a7a5b4e --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/blocks/PlatedLapisCell.png diff --git a/src/main/resources/assets/bartworks/textures/items/GT2Coin.png b/src/main/resources/assets/bartworks/textures/items/GT2Coin.png Binary files differnew file mode 100644 index 0000000000..c590469aed --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/GT2Coin.png diff --git a/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.png b/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.png Binary files differnew file mode 100644 index 0000000000..b04bb30f5c --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/GT_Rockcutter.png diff --git a/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.png b/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.png Binary files differnew file mode 100644 index 0000000000..fd8185056b --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/GT_Teslastaff.png diff --git a/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.png b/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.png Binary files differnew file mode 100644 index 0000000000..6de5748e32 --- /dev/null +++ b/src/main/resources/assets/bartworks/textures/items/gt.GT2Destructopack.png diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000000..6d2fc25463 --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,16 @@ +[ +{ + "modid": "bartworks", + "name": "BartWorks", + "description": "A Gregtech Addon.", + "version": "${version}", + "mcversion": "${mcversion}", + "url": "", + "updateUrl": "", + "authorList": ["bartimaeusnek"], + "credits": "Gregorius Techneticies for making gregtech and allowing me to port his old stuff.", + "logoFile": "", + "screenshots": [], + "dependencies": [] +} +] |