aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2018-12-25 22:58:41 +0100
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2018-12-25 22:58:41 +0100
commitb2f8f479060bfe6c3adc8dd70edaeecda903adbc (patch)
tree41fdbd4617f01cceae300010313a59032a7e1221
parentddfae9c6ecf6fb42ba352cca6dd6afd4a17bdb1c (diff)
downloadGT5-Unofficial-b2f8f479060bfe6c3adc8dd70edaeecda903adbc.tar.gz
GT5-Unofficial-b2f8f479060bfe6c3adc8dd70edaeecda903adbc.tar.bz2
GT5-Unofficial-b2f8f479060bfe6c3adc8dd70edaeecda903adbc.zip
added Windmill
+added a shitton of Recipes and Items for it +added GUI's for them aswell
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java13
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java55
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java45
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java81
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java90
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java58
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java22
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java206
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/BW_RotorBlock.java27
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java608
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang12
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/GUIPrimitiveKUBox.pngbin0 -> 1717 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/GUI_Windmill.pngbin0 -> 2046 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/BWRotorBlock.pngbin0 -> 559 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/GrindstoneL.pngbin0 -> 835 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/brick.pngbin0 -> 506 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/windmill_top.pngbin0 -> 591 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/completed_grindstone.pngbin0 -> 932 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/grindstone_bottom.pngbin0 -> 823 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/grindstone_top.pngbin0 -> 822 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/combinedParts.pngbin0 -> 699 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/itemRotorCombined.pngbin0 -> 407 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/itemRotorLeather.pngbin0 -> 441 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/itemRotorPaper.pngbin0 -> 472 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/itemRotorWool.pngbin0 -> 382 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/leatherParts.pngbin0 -> 600 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/paperParts.pngbin0 -> 546 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/rotorCombined.pngbin0 -> 2892 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/rotorLeather.pngbin0 -> 2230 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/rotorPaper.pngbin0 -> 1238 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/rotorWool.pngbin0 -> 1911 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/items/rotors/woolParts.pngbin0 -> 601 bytes
32 files changed, 1181 insertions, 36 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index a2fc611223..0219ef93bd 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -4,7 +4,10 @@ package com.github.bartimaeusnek.bartworks;
import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab;
import com.github.bartimaeusnek.bartworks.client.creativetabs.bartworksTab;
import com.github.bartimaeusnek.bartworks.common.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer;
import com.github.bartimaeusnek.bartworks.common.loaders.LoaderRegistry;
+import com.github.bartimaeusnek.bartworks.common.tileentities.BW_RotorBlock;
+import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_Windmill;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@@ -12,16 +15,12 @@ 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.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_OreDictUnificator;
+import cpw.mods.fml.common.registry.GameRegistry;
+import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.ItemStack;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import static com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry.BW_BLOCKS;
-
@Mod(
modid = MainMod.modID, name = MainMod.name, version = MainMod.version,
dependencies = "required-after:IC2; "
@@ -53,7 +52,7 @@ public final class MainMod {
}
@Mod.EventHandler
public void init(FMLInitializationEvent init) {
- new LoaderRegistry().run();
+ new LoaderRegistry().run();
}
@Mod.EventHandler
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
new file mode 100644
index 0000000000..1311c291ac
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java
@@ -0,0 +1,55 @@
+package com.github.bartimaeusnek.bartworks.client.gui;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator;
+import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator;
+import ic2.core.util.GuiTooltipHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class BW_GUIContainer_RotorBlock extends GuiWindKineticGenerator
+{
+ public ContainerWindKineticGenerator container;
+ public String name;
+
+ public BW_GUIContainer_RotorBlock(ContainerWindKineticGenerator container1) {
+ super(container1);
+ this.container = container1;
+ this.name = StatCollector.translateToLocal("tile.BWRotorBlock.name");
+ }
+
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
+ this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 6, 2157374);
+ if (this.container.base.checkrotor()) {
+ if (!this.container.base.rotorspace()) {
+ this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotorspace"), 27, 52, 2157374);
+ } else if (this.container.base.checkrotor() && !this.container.base.guiisminWindStrength()) {
+ this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak1"), 27, 52, 2157374);
+ } else {
+ this.fontRendererObj.drawString(this.container.base.getRotorhealth() + " %", 46, 52, 2157374);
+ if (this.container.base.guiisoverload()) {
+ GuiTooltipHelper.drawAreaTooltip(p_146979_1_ - this.guiLeft, p_146979_2_ - this.guiTop, StatCollector.translateToLocal("ic2.WindKineticGenerator.error.overload"), 44, 27, 79, 52);
+ }
+ }
+ } else {
+ this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotormiss"), 27, 52, 2157374);
+ }
+
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
+ GL11.glColor3f(0.5f,0.25f,0.07f);
+ this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.modID, "textures/GUI/GUIPrimitiveKUBox.png"));
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ if (this.container.base.guiisoverload() && this.container.base.checkrotor()) {
+ this.drawTexturedModalRect(j + 44, k + 20, 176, 0, 30, 26);
+ this.drawTexturedModalRect(j + 102, k + 20, 176, 0, 30, 26);
+ }
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java
new file mode 100644
index 0000000000..76cd7d2998
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java
@@ -0,0 +1,45 @@
+package com.github.bartimaeusnek.bartworks.client.gui;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import gregtech.api.gui.GT_Container_MultiMachine;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+public class BW_GUIContainer_Windmill extends GT_GUIContainer_MultiMachine {
+
+ public BW_GUIContainer_Windmill(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
+ super(aInventoryPlayer, aTileEntity, aName, null);
+ }
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ if (!(this.mContainer instanceof GT_Container_MultiMachine))
+ return;
+
+ if ((((GT_Container_MultiMachine)this.mContainer).mDisplayErrorCode & 64) != 0)
+ this.fontRendererObj.drawString(this.trans("138", "Incomplete Structure."), 92, 22, 16448255);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ GL11.glColor3f(0.5f,0.25f,0.07f);
+ this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.modID, "textures/GUI/GUI_Windmill.png"));
+
+ int x = (this.width - this.xSize) / 2;
+ int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ if (this.mContainer.mMaxProgressTime > 0){
+ this.drawTexturedModalRect(x+152, y+5,176,0,16,15);
+ this.drawTexturedModalRect(x+53, y+63,176,16,13,17);
+ }
+
+ if (((GT_Container_MultiMachine)this.mContainer).mDisplayErrorCode == 0) {
+ if (((GT_Container_MultiMachine) this.mContainer).mActive == 0) {
+ GL11.glColor3f(1f,1f,1f);
+ this.drawTexturedModalRect(x+66, y+66,176,33,15,15);
+ }
+ }
+
+
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
new file mode 100644
index 0000000000..b90bfeeec9
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
@@ -0,0 +1,81 @@
+package com.github.bartimaeusnek.bartworks.common.blocks;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import ic2.api.tile.IWrenchable;
+import ic2.core.IC2;
+import ic2.core.IHasGui;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BW_TileEntityContainer extends BlockContainer {
+
+ Class<? extends TileEntity> tileEntity = null;
+
+ public BW_TileEntityContainer(Material p_i45386_1_,Class<? extends TileEntity> tileEntity, String blockName) {
+ super(p_i45386_1_);
+ this.tileEntity=tileEntity;
+ this.setCreativeTab(MainMod.BWT);
+ this.setBlockName(blockName);
+ this.setBlockTextureName(MainMod.modID+":"+blockName);
+ }
+
+
+ @Override
+ public boolean onBlockActivated(World worldObj, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
+ if (worldObj.isRemote) {
+ return true;
+ }
+ if (!player.isSneaking()) {
+ final TileEntity tile = worldObj.getTileEntity(x, y, z);
+ if (tile instanceof IHasGui) {
+ return worldObj.isRemote || IC2.platform.launchGui(player, (IHasGui)tile);
+ }
+ }
+
+ return false;
+ }
+
+
+ public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack itemStack) {
+ final TileEntity tile = world.getTileEntity(x, y, z);
+ if (tile instanceof IWrenchable && itemStack != null) {
+ final IWrenchable tile2 = (IWrenchable)tile;
+ int meta = itemStack.getItemDamage();
+ world.setBlockMetadataWithNotify(x, y, z, meta, 2);
+ if (entity != null) {
+ final int face = MathHelper.floor_double(entity.rotationYaw * 4.0f / 360.0f + 0.5) & 0x3;
+ switch (face) {
+ case 0:
+ tile2.setFacing((short)2);
+ break;
+ case 1:
+ tile2.setFacing((short)5);
+ break;
+ case 2:
+ tile2.setFacing((short)3);
+ break;
+ case 3:
+ tile2.setFacing((short)4);
+ break;
+ }
+ }
+ }
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
+ try {
+ return this.tileEntity.newInstance();
+ } catch (InstantiationException | IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
new file mode 100644
index 0000000000..3fb86d4963
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
@@ -0,0 +1,90 @@
+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 ic2.api.item.IKineticRotor;
+import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator;
+import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
+import java.util.List;
+
+import static ic2.api.item.IKineticRotor.GearboxType.WATER;
+import static ic2.api.item.IKineticRotor.GearboxType.WIND;
+
+public class BW_Stonage_Rotors extends Item implements IKineticRotor {
+
+ private int[] DiaMinMax = new int[3];
+ private float eff;
+ private GearboxType type;
+ private ResourceLocation tex;
+ private String itemTex;
+
+ public BW_Stonage_Rotors(int diameter, float eff, int min, int max,int durability, GearboxType type,ResourceLocation tex, String Name, String itemTex){
+ this.DiaMinMax[0]=diameter;
+ this.DiaMinMax[1]=min;
+ this.DiaMinMax[2]=max;
+ this.eff=eff;
+ this.type=type;
+ this.tex=tex;
+ this.setMaxDamage(durability);
+ this.setUnlocalizedName(Name);
+ this.setCreativeTab(MainMod.BWT);
+ this.itemTex=itemTex;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ this.itemIcon = iconRegister.registerIcon(MainMod.modID+":"+itemTex);
+ }
+
+ public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean b) {
+ info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", this.DiaMinMax[1], this.DiaMinMax[2]));
+ GearboxType type = null;
+ if (Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator) {
+ type = WATER;
+ } else if (Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator) {
+ type = WIND;
+ }
+ if (type != null) {
+ info.add(StatCollector.translateToLocal(("ic2.itemrotor.fitsin." + this.isAcceptedType(itemStack, type))));
+ }
+ }
+
+ @Override
+ public int getDiameter(ItemStack itemStack) {
+ return this.DiaMinMax[0];
+ }
+
+ @Override
+ public ResourceLocation getRotorRenderTexture(ItemStack itemStack) {
+ return this.tex;
+ }
+
+ @Override
+ public float getEfficiency(ItemStack itemStack) {
+ return this.eff;
+ }
+
+ @Override
+ public int getMinWindStrength(ItemStack itemStack) {
+ return this.DiaMinMax[1];
+ }
+
+ @Override
+ public int getMaxWindStrength(ItemStack itemStack) {
+ return this.DiaMinMax[2];
+ }
+
+ @Override
+ public boolean isAcceptedType(ItemStack itemStack, GearboxType gearboxType) {
+ return gearboxType.equals(this.type);
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
new file mode 100644
index 0000000000..76b0d79b78
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java
@@ -0,0 +1,58 @@
+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 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 SimpleSubItemClass extends Item {
+ String[] tex;
+ @SideOnly(Side.CLIENT)
+ protected IIcon[] itemIcon;
+
+ public SimpleSubItemClass(String[] tex){
+ this.tex=tex;
+ this.hasSubtypes=true;
+ this.setCreativeTab(MainMod.BWT);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ itemIcon = new IIcon[tex.length];
+ for (int i = 0; i < tex.length; i++) {
+ itemIcon[i]=iconRegister.registerIcon(MainMod.modID+":"+tex[i]);
+ }
+
+ }
+
+ @Override
+ public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) {
+ for (int i = 0; i < tex.length; i++) {
+ p_150895_3_.add(new ItemStack(p_150895_1_, 1, i));
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconFromDamage(int p_77617_1_)
+ {
+ if (p_77617_1_<tex.length)
+ return this.itemIcon[p_77617_1_];
+ else
+ return this.itemIcon[0];
+ }
+
+ public String getUnlocalizedName(ItemStack p_77667_1_)
+ {
+ if (p_77667_1_.getItemDamage()<tex.length)
+ return "item."+this.tex[p_77667_1_.getItemDamage()].replaceAll("/",".");
+ else
+ return "WrongDamageItemDestroyIt";
+ }
+
+}
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
index 11567daeee..161f6111bb 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
@@ -3,15 +3,20 @@ 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.blocks.BW_TileEntityContainer;
import com.github.bartimaeusnek.bartworks.common.items.*;
+import com.github.bartimaeusnek.bartworks.common.tileentities.BW_RotorBlock;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
+import ic2.api.item.IKineticRotor;
import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
import static com.github.bartimaeusnek.bartworks.MainMod.BWT;
import static com.github.bartimaeusnek.bartworks.MainMod.GT2;
@@ -30,6 +35,15 @@ public class ItemRegistry implements Runnable {
public static ItemStack[] Diode8A= new ItemStack[GT_Values.VN.length];
public static ItemStack[] Diode12A= new ItemStack[GT_Values.VN.length];
public static ItemStack[] Diode16A= new ItemStack[GT_Values.VN.length];
+ public static final Block ROTORBLOCK = new BW_TileEntityContainer(Material.wood, BW_RotorBlock.class,"BWRotorBlock");
+
+ public static final Item LeatherRotor = new BW_Stonage_Rotors(5, 0.15f, 15, 30,2400, IKineticRotor.GearboxType.WIND,new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorLeather.png"),"BW_LeatherRotor","rotors/itemRotorLeather");
+ public static final Item WoolRotor = new BW_Stonage_Rotors(7, 0.18f, 10, 20,1600, IKineticRotor.GearboxType.WIND,new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorWool.png"),"BW_WoolRotor","rotors/itemRotorWool");
+ public static final Item PaperRotor = new BW_Stonage_Rotors(9, 0.2f, 1, 10,800, IKineticRotor.GearboxType.WIND,new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorPaper.png"),"BW_PaperRotor","rotors/itemRotorPaper");
+ public static final Item CombinedRotor = new BW_Stonage_Rotors(11, 0.22f, 1, 50,5800, IKineticRotor.GearboxType.WIND,new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorCombined.png"),"BW_CombinedRotor","rotors/itemRotorCombined");
+ public static final Item craftingParts = new SimpleSubItemClass(new String[]{"grindstone_top","grindstone_bottom","completed_grindstone","rotors/leatherParts","rotors/woolParts","rotors/paperParts","rotors/combinedParts"});
+
+
public static final Item tab = new SimpleIconItem("GT2Coin");
public static final Block[] BW_BLOCKS = {
new BW_Blocks("BW_ItemBlocks", new String[]
@@ -57,6 +71,14 @@ public class ItemRegistry implements Runnable {
if (newStuff) {
GameRegistry.registerBlock(BW_BLOCKS[2], BW_ItemBlocks.class, "BW_Machinery_Casings");
GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.NickelZincFerrite, new ItemStack(BW_BLOCKS[2]));
+
+ GameRegistry.registerItem(LeatherRotor,"BW_LeatherRotor");
+ GameRegistry.registerItem(WoolRotor,"BW_WoolRotor");
+ GameRegistry.registerItem(PaperRotor,"BW_PaperRotor");
+ GameRegistry.registerItem(CombinedRotor,"BW_CombinedRotor");
+ GameRegistry.registerItem(craftingParts,"craftingParts");
+ GameRegistry.registerTileEntity(BW_RotorBlock.class,"BWRotorBlockTE");
+ GameRegistry.registerBlock(ROTORBLOCK,"BWRotorBlock");
}
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
index a6db1925a9..a467af62bd 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
@@ -2,11 +2,8 @@ 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.items.Circuit_Programmer;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_Diode;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_ManualTrafo;
+import com.github.bartimaeusnek.bartworks.common.tileentities.*;
+import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -18,12 +15,13 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.oredict.OreDictionary;
import static com.github.bartimaeusnek.bartworks.common.ConfigHandler.newStuff;
public class RecipeLoader implements Runnable {
- private final static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE;
+ private static final long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE;
@Override
public void run() {
@@ -46,7 +44,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.BW_BLOCKS[1]),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"LLL",
"LCL",
@@ -58,8 +56,8 @@ public class RecipeLoader implements Runnable {
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.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0), RecipeLoader.bitsd, new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1)});
+ GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1), RecipeLoader.bitsd, new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0)});
}
/*
@@ -68,7 +66,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new GT_TileEntity_LESU(ConfigHandler.IDOffset, "LESU", "LESU").getStackForm(1L),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"CDC",
"SBS",
@@ -82,7 +80,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.Destructopack),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"CPC",
"PLP",
@@ -94,7 +92,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.Destructopack),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"CPC",
"PLP",
@@ -106,7 +104,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.RockcutterMV),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"DS ",
"DP ",
@@ -120,7 +118,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.RockcutterLV),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"DS ",
"DP ",
@@ -134,7 +132,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.RockcutterHV),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"DS ",
"DP ",
@@ -149,7 +147,7 @@ public class RecipeLoader implements Runnable {
if (ConfigHandler.teslastaff)
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.Teslastaff),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"BO ",
"OP ",
@@ -171,7 +169,7 @@ public class RecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(
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").getStackForm(1L),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"PWP",
"WCW",
@@ -182,7 +180,7 @@ public class RecipeLoader implements Runnable {
});
GT_ModHandler.addCraftingRecipe(
ItemRegistry.Diode12A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 4 + 1 + i, "Cable Diode 12A " + GT_Values.VN[i], "Cable Diode 12A " + GT_Values.VN[i], i, 12).getStackForm(1L),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"WDW",
"DCD",
@@ -195,7 +193,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
ItemRegistry.Diode12A[i],
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"WDW",
"DCD",
@@ -208,7 +206,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
ItemRegistry.Diode8A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 3 + 1 + i, "Cable Diode 8A " + GT_Values.VN[i], "Cable Diode 8A " + GT_Values.VN[i], i, 8).getStackForm(1L),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"WDW",
"DCD",
@@ -221,7 +219,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
ItemRegistry.Diode8A[i],
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"WDW",
"DCD",
@@ -234,7 +232,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
ItemRegistry.Diode4A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 2 + 1 + i, "Cable Diode 4A " + GT_Values.VN[i], "Cable Diode 4A " + GT_Values.VN[i], i, 4).getStackForm(1L),
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"WDW",
"DCD",
@@ -247,7 +245,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
ItemRegistry.Diode4A[i],
- bitsd,
+ RecipeLoader.bitsd,
new Object[]{
"WDW",
"DCD",
@@ -260,7 +258,7 @@ public class RecipeLoader impl