Merge branch 'dev'

dev
Arona Jones 2015-10-17 12:43:50 +01:00
commit 7d9add436e
106 changed files with 2041 additions and 937 deletions

View File

@ -45,7 +45,7 @@ project.ext {
mcVersion = "1.7.10"
}
version = project.ext.mcVersion + "-B4.5." + project.ext.buildNum
version = project.ext.mcVersion + "-B5.0.0" + project.ext.buildNum
group= "brassgoggledcoders" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "steamcraft2"
@ -55,7 +55,7 @@ minecraft {
}
dependencies {
compile "brassgoggledcoders:boilerplate:1.7.10-6.0.0.+:deobf"
compile "brassgoggledcoders:boilerplate:1.7.10-6.1.0.+:deobf"
compile 'com.mod-buildcraft:buildcraft:6.4.16:dev'
compile 'net.industrial-craft:industrialcraft-2:2.2.727-experimental:api'
compile 'Azanor:Thaumcraft:4.2.3.5:deobf@jar'
@ -64,6 +64,8 @@ dependencies {
compile name: "Botania", group: "vazkii.botania", version: "r1.6-190.6", classifier: "deobf"
compile files("libs/Railcraft_1.7.10-9.7.0.0-dev.jar")
runtime 'Azanor:Baubles:1.0.1.10:deobf@jar'
}
task getLibraries {

View File

@ -218,6 +218,39 @@ Beta 4.5:
# Fixed path recipe
# Fixed pocket watch in-game time display not working
# Various texture fixes and updates. Improve armour editor texture
Beta 5:
+ Whales! Kill them for blubber, bone and meat. - warlordjones
+ Refinery for turning blubber into whale oil - warlordjones
+ Liquid boiler that uses whale oil and other liquid fuels like lava or other mod's oil (Note: all fluids currently display as whale oil in the GUI) - warlordjones
+ Whalebone armour. - warlordjones
+ Steel Hatch. Just a badass version of a trapdoor. Only operable via redstone signal. - warlordjones
+ Ligher slate that generates higher, while the old slate was changed to generate deeper. - warlordjones
+ Added a config option to disable the deeps portal generation, since it seems to be very broken. - warlordjones
+ Metal plates. Just metallic carpet. - warlordjones
+ Rusty and Mossy variants of metal blocks. - warlordjones
+ Coins which have no recipe, just useful as server currency. Accurate old english denominations. - warlordjones and WolfieWaffle
+ Correctly register steam canisters as fluid containers - warlordjones
+ Add uranium blocks to the ore dictionary - warlordjones
+ Added double capacity reinforced steam canisters - warlordjones
+ Readded the spanner's ability to act as a RC crowbar. - Skysom
+ Add teacups to oredict. Should allow BetterSleeping compat. - warlordjones
+ Allow the grindstone to configurably grind metals that aren't in SC2, like lead. - warlordjones
+ New battery bank model. - warlordjones
+ Stonebrick (with all variants), stoneslab and brick wall. - warlordjones
+ Electric Jars can now charge items in the player inventory by shift-right clicking them. Works similar to Thermal Expansion's Capacitors.
+ Tier 2 steel pipes.
* Brand new awesome armour editor GUI :D - Skysom
- Copper and Brass parts. Should halve the clutter problems.
- Removed obsidian and etherium related items. After much deliberation I feel they didn't really fit. Will be available in BrassUtils soon. - warlordjones
* Nerfed the buffs from tea. Still need to figure out what I actually want it to do :P - decebaldecebal
# Prevent steam drill from being able to mine otherwise indestructible blocks (even bedrock!) in 3x3 mode. - warlordjones
* Decrease energy usage of the raygun - decebaldecebal
# Fix teacup recipe - decebaldecebal
# Raygun/shrinkray no longer work without electricity. - decebaldecebal
# Fixed ore drops being messed up. - warlordjones
# Fix TC Clusters not giving enough ingots. - warlordjones
# Fixed some stray pixels. - warlordjones
# Hopefully fix the disappearance of golden hammers. - warlordjones
# Fixed Tea plant drops. Again. - warlordjones
# Fixed Statis Field not keeping items from despawning. - decebaldecebal

View File

@ -0,0 +1,23 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the BoilerCraft Mod for Minecraft.
*
* BoilerCraft is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
*/
package steamcraft.api.tile;
import net.minecraftforge.common.util.ForgeDirection;
/**
* @author decebaldecebal
*
*/
public interface ISpannerTile
{
public void changeExtraction();
public void changeExtraction(int dirIndex);
public ForgeDirection[] getExtractableConnections();
public ForgeDirection[] getExtractions();
}

View File

@ -43,6 +43,7 @@ import steamcraft.client.renderers.block.BlockHatchRenderer;
import steamcraft.client.renderers.block.BlockSpiderEggRenderer;
import steamcraft.client.renderers.block.BlockSteelPipeRenderer;
import steamcraft.client.renderers.block.BlockSteelWireRenderer;
import steamcraft.client.renderers.block.BlockTransparentWithInsideRenderer;
import steamcraft.client.renderers.entity.RenderAbandonedGolem;
import steamcraft.client.renderers.entity.RenderBoar;
import steamcraft.client.renderers.entity.RenderFallingBoulder;
@ -207,6 +208,8 @@ public class ClientProxy extends CommonProxy
RenderingRegistry.registerBlockHandler(new BlockTESRRenderer(new TileTrunk(), RenderIDs.blockTrunkRI));
// Cast Iron Gate
RenderingRegistry.registerBlockHandler(new BlockCastIronGateRenderer());
// Lattice
RenderingRegistry.registerBlockHandler(new BlockTransparentWithInsideRenderer());
}
@Override

View File

@ -0,0 +1,120 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.client.gui;
import org.lwjgl.opengl.GL11;
import boilerplate.client.BaseContainerGui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import steamcraft.api.tile.ISpannerTile;
import steamcraft.common.init.InitPackets;
import steamcraft.common.lib.ModInfo;
import steamcraft.common.packets.UpdateExtractionPacket;
import steamcraft.common.tiles.container.ContainerChangeExtractions;
/**
* @author decebaldecebal
*
*/
public class GuiChangeExtractions extends BaseContainerGui
{
private static ResourceLocation guitexture = new ResourceLocation(ModInfo.PREFIX + "textures/gui/changeextractions.png");
private static String[] buttonNames = new String[]{"Insert", "Extract"};
private TileEntity tile;
private int worldId;
public GuiChangeExtractions(TileEntity tile, int worldId)
{
super(new ContainerChangeExtractions());
this.xSize = 206;
this.ySize = 111;
this.tile = tile;
this.worldId = worldId;
}
@Override
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
{
this.fontRendererObj.drawString("Change Extraction", 60, 6, 4210752);
this.fontRendererObj.drawString("Up:", 20, 26, 4210752);
this.fontRendererObj.drawString("Down:", 115, 26, 4210752);
this.fontRendererObj.drawString("North:", 20, 56, 4210752);
this.fontRendererObj.drawString("South:", 115, 56, 4210752);
this.fontRendererObj.drawString("West:", 20, 86, 4210752);
this.fontRendererObj.drawString("East:", 115, 86, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(guitexture);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
}
@SuppressWarnings("unchecked")
@Override
public void initGui()
{
super.initGui();
buttonList.clear();
ISpannerTile spannerTile = (ISpannerTile) this.tile;
ForgeDirection[] connections = spannerTile.getExtractableConnections();
ForgeDirection[] extractions = spannerTile.getExtractions();
GuiButton up = this.createGuiButton(0, guiLeft + 55, guiTop + 20, 44, 20, connections, extractions);
GuiButton down = this.createGuiButton(1, guiLeft + 150, guiTop + 20, 44, 20, connections, extractions);
GuiButton north = this.createGuiButton(2, guiLeft + 55, guiTop + 50, 44, 20, connections, extractions);
GuiButton south = this.createGuiButton(3, guiLeft + 150, guiTop + 50, 44, 20, connections, extractions);
GuiButton west = this.createGuiButton(4, guiLeft + 55, guiTop + 80, 44, 20, connections, extractions);
GuiButton east = this.createGuiButton(5, guiLeft + 150, guiTop + 80, 44, 20, connections, extractions);
buttonList.add(north);
buttonList.add(south);
buttonList.add(west);
buttonList.add(east);
buttonList.add(up);
buttonList.add(down);
}
private GuiButton createGuiButton(int index, int x, int y, int xx, int yy, ForgeDirection[] connections, ForgeDirection[] extractions)
{
GuiButton button = new GuiButton(index, x, y, xx, yy, extractions[index] == null ? buttonNames[0] : buttonNames[1]);
if (connections[index] == null)
button.enabled = false;
return button;
}
@Override
protected void actionPerformed(GuiButton button)
{
if (button.enabled)
{
InitPackets.network.sendToServer(new UpdateExtractionPacket(worldId, this.tile.xCoord, this.tile.yCoord, this.tile.zCoord, button.id));
button.displayString = button.displayString.equals(buttonNames[0]) ? buttonNames[1] : buttonNames[0];
}
}
}

View File

@ -15,8 +15,6 @@ package steamcraft.client.gui;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.common.FMLLog;
import net.minecraftforge.fluids.FluidRegistry;
import boilerplate.client.BaseContainerGui;
@ -56,14 +54,9 @@ public class GuiLiquidBoiler extends BaseContainerGui
this.drawTexturedModalRect(this.guiLeft + 43, (this.guiTop + 48) - burnTime, 176, 12 - burnTime, 14, burnTime + 2);
}
this.drawFluid(FluidRegistry.getFluid("water"), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 8, 20, 60);
if (this.boiler.fuelTank.getFluid() != null)
{
this.drawFluid(this.boiler.fuelTank.getFluid().getFluid(), this.boiler.getScaledFuelLevel(60), this.guiLeft + 20, this.guiTop + 8, 20,
60);
FMLLog.info("" + this.boiler.getScaledFuelLevel(60), "" + this.boiler.getScaledFuelLevel(60));
}
this.drawFluid(FluidRegistry.getFluid("steam"), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 8, 32, 60);
this.drawFluid(FluidRegistry.getFluid("water"), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 9, 20, 60);
this.drawFluid(FluidRegistry.getFluid("whaleoil"), this.boiler.getScaledFuelLevel(60), this.guiLeft + 40, this.guiTop + 9, 20, 60);
this.drawFluid(FluidRegistry.getFluid("steam"), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 9, 32, 60);
this.mc.renderEngine.bindTexture(guitexture);
this.drawTexturedModalRect(this.guiLeft + 8, this.guiTop + 15, 176, 14, 20, 49);
@ -79,7 +72,7 @@ public class GuiLiquidBoiler extends BaseContainerGui
this.drawFluidInfo(this.boiler.waterTank, x, y);
else if (((x - this.guiLeft) >= 74) && ((x - this.guiLeft) <= 106))
this.drawFluidInfo(this.boiler.steamTank, x, y);
else if (((x - this.guiLeft) >= 40) && ((x - this.guiLeft) <= 60))
this.drawFluidInfo(this.boiler.fuelTank, x, y);
// else if (((x - this.guiLeft) >= 40) && ((x - this.guiLeft) <= 60))
// this.drawFluidInfo(this.boiler.fuelTank, x, y);
}
}

View File

@ -60,7 +60,7 @@ public class GuiRefinery extends BaseContainerGui
if (this.refinery.isCooking())
{
int cookTime = this.refinery.getCookTimeRemainingScaled(12);
this.drawTexturedModalRect(this.guiLeft + 43, (this.guiTop + 48), 176, 50, cookTime + 1, 16);
this.drawTexturedModalRect(this.guiLeft + 42, (this.guiTop + 41), 176, 78, cookTime + 1, 20);
}
this.drawFluid(FluidRegistry.getFluid("whaleoil"), this.refinery.getScaledWhaleOilLevel(60), this.guiLeft + 74, this.guiTop + 18, 32, 60);

View File

@ -12,15 +12,14 @@
*/
package steamcraft.client.gui;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;
import steamcraft.common.container.ContainerVanity;
import steamcraft.common.container.InventoryVanity;
import steamcraft.common.lib.ModInfo;
@ -30,35 +29,29 @@ import steamcraft.common.lib.ModInfo;
*
*/
@SideOnly(Side.CLIENT)
public class GuiVanity extends GuiContainer
{
@SuppressWarnings("unused")
public class GuiVanity extends GuiContainer {
private float xSize_lo;
@SuppressWarnings("unused")
private float ySize_lo;
private static final ResourceLocation iconLocation = new ResourceLocation(ModInfo.PREFIX + "textures/gui/vanity.png");
private final InventoryVanity inventory;
public GuiVanity(final EntityPlayer player, final InventoryPlayer inventoryPlayer, final InventoryVanity inventoryCustom)
{
public GuiVanity(final EntityPlayer player, final InventoryPlayer inventoryPlayer, final InventoryVanity inventoryCustom) {
super(new ContainerVanity(player, inventoryPlayer, inventoryCustom));
this.inventory = inventoryCustom;
}
@Override
public void drawScreen(final int x, final int y, final float scale)
{
public void drawScreen(final int x, final int y, final float scale) {
super.drawScreen(x, y, scale);
this.xSize_lo = x;
this.ySize_lo = y;
}
@Override
protected void drawGuiContainerForegroundLayer(final int x, final int y)
{
protected void drawGuiContainerForegroundLayer(final int x, final int y) {
final String s = this.inventory.getInventoryName();
this.fontRendererObj.drawString(s, this.xSize - this.fontRendererObj.getStringWidth(s) - 8, 5, 4210752);
this.fontRendererObj.drawString("container.inventory", 120, this.ySize - 92, 4210752); // TODO
@ -67,8 +60,7 @@ public class GuiVanity extends GuiContainer
}
@Override
protected void drawGuiContainerBackgroundLayer(final float scale, final int par2, final int par3)
{
protected void drawGuiContainerBackgroundLayer(final float scale, final int par2, final int par3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(iconLocation);
final int x = (this.width - this.xSize) / 2;

View File

@ -33,4 +33,6 @@ public class GuiIDs
public static final int CAPACITOR = 12;
public static final int LIQUID_BOILER = 13;
public static final int INJECTOR = 14;
public static final int PIPES = 15;
}

View File

@ -36,6 +36,7 @@ public class RenderIDs
public static int blockSpiderEggRI;
public static int blockTrunkRI;
public static int blockCastIronGateRI;
public static int blockTransWithInsideRI;
public static void setIDs()
{
@ -57,5 +58,6 @@ public class RenderIDs
blockSpiderEggRI = RenderingRegistry.getNextAvailableRenderId();
blockTrunkRI = RenderingRegistry.getNextAvailableRenderId();
blockCastIronGateRI = RenderingRegistry.getNextAvailableRenderId();
blockTransWithInsideRI = RenderingRegistry.getNextAvailableRenderId();
}
}

View File

@ -0,0 +1,100 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.client.renderers.block;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import steamcraft.client.lib.RenderIDs;
/**
* @author Decebaldecebal
*
*/
public class BlockTransparentWithInsideRenderer implements ISimpleBlockRenderingHandler
{
public void drawBlock(Block block, int meta, RenderBlocks renderer)
{
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, -1.0F, 0.0F);
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
tessellator.setNormal(0.0F, 0.0F, -1.0F);
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
tessellator.setNormal(0.0F, 0.0F, 1.0F);
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
tessellator.setNormal(1.0F, 0.0F, 0.0F);
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
// draw insides
renderer.setRenderFromInside(true);
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
tessellator.setNormal(0.0F, 0.0F, -1.0F);
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
tessellator.setNormal(0.0F, 0.0F, 1.0F);
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
tessellator.setNormal(1.0F, 0.0F, 0.0F);
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
renderer.setRenderFromInside(false);
tessellator.draw();
}
@Override
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer)
{
drawBlock(block, meta, renderer);
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
{
int meta = world.getBlockMetadata(x, y, z);
// draw outside
renderer.renderStandardBlock(block, x, y, z);
// draw inside
renderer.setRenderFromInside(true);
renderer.setRenderAllFaces(true);
renderer.flipTexture = true;
renderer.setRenderBounds(0.0001, 0.0001, 0.0001, 0.9999, 0.9999, 0.9999);
renderer.renderStandardBlock(block, x, y, z);
renderer.flipTexture = false;
renderer.setRenderFromInside(false);
renderer.setRenderAllFaces(false);
return false;
}
@Override
public boolean shouldRender3DInInventory(int i)
{
return true;
}
@Override
public int getRenderId()
{
return RenderIDs.blockTransWithInsideRI;
}
}

View File

@ -12,19 +12,16 @@
*/
package steamcraft.client.renderers.models;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.common.entities.living.EntityVampireBat;
@SideOnly(Side.CLIENT)
public class ModelVampireBat extends ModelBase
{
public class ModelVampireBat extends ModelBase {
private final ModelRenderer batHead;
/** The body box of the bat model. */
private final ModelRenderer batBody;
@ -37,8 +34,7 @@ public class ModelVampireBat extends ModelBase
/** The outer left wing box of the bat model. */
private final ModelRenderer batOuterLeftWing;
public ModelVampireBat()
{
public ModelVampireBat() {
this.textureWidth = 64;
this.textureHeight = 64;
this.batHead = new ModelRenderer(this, 0, 0);
@ -76,23 +72,19 @@ public class ModelVampireBat extends ModelBase
* would be recreated if the value changed and it seems a good match for a
* bats size
*/
public int getBatSize()
{
public int getBatSize() {
return 36;
}
/**
* Sets the models various rotation angles then renders the model.
*/
@SuppressWarnings("unused")
@Override
public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
{
public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) {
EntityVampireBat EntityVampireBat = (EntityVampireBat) p_78088_1_;
float f6;
if (EntityVampireBat.getIsBatHanging())
{
if (EntityVampireBat.getIsBatHanging()) {
f6 = (180F / (float) Math.PI);
this.batHead.rotateAngleX = p_78088_6_ / (180F / (float) Math.PI);
this.batHead.rotateAngleY = (float) Math.PI - (p_78088_5_ / (180F / (float) Math.PI));
@ -107,9 +99,7 @@ public class ModelVampireBat extends ModelBase
this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY;
}
else
{
} else {
f6 = (180F / (float) Math.PI);
this.batHead.rotateAngleX = p_78088_6_ / (180F / (float) Math.PI);
this.batHead.rotateAngleY = p_78088_5_ / (180F / (float) Math.PI);

View File

@ -50,20 +50,31 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
TileCopperPipe pipe = (TileCopperPipe) tile;
ForgeDirection opposite = pipe.onlyOneOpposite();
boolean isStraight = true;
for (ForgeDirection dir : pipe.extractions)
if (dir != null)
{
isStraight = false;
break;
}
if ((opposite != null) && (pipe.extract == null) && pipe.isPipe(opposite) && pipe.isPipe(opposite.getOpposite()))
ForgeDirection opposite = null;
if (isStraight && ((opposite = pipe.onlyOneOpposite()) != null) && pipe.isPipe(opposite) && pipe.isPipe(opposite.getOpposite()))
this.drawStraightConnection(opposite, pipe);
else
{
this.drawCore(pipe);
for (ForgeDirection dir : pipe.connections)
for (int i = 0;i < 6;i++)
{
ForgeDirection dir = pipe.connections[i];
if (dir != null)
if (pipe.extract == dir)
if (pipe.extractions[i] != null)
this.drawAlternateConnection(dir, pipe);
else
this.drawConnection(dir, pipe);
}
}
GL11.glEnable(GL11.GL_LIGHTING);

View File

@ -52,12 +52,20 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
this.bindTexture(this.texture1);
this.drawCore(wire);
for (ForgeDirection dir : wire.connections)
for (int i = 0;i < 6;i++)
{
ForgeDirection dir = wire.connections[i];
if (dir != null)
if (wire.extract == dir)
{
if (wire.extractions[i] != null)
{
this.drawAlternateConnection(dir, wire);
}
else
this.drawConnection(dir, wire);
}
}
GL11.glEnable(GL11.GL_LIGHTING);

View File

@ -14,10 +14,9 @@ package steamcraft.common;
import java.io.File;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import boilerplate.client.GuiHandler;
import boilerplate.common.compathandler.FMPCompatHandler;
import boilerplate.common.utils.handlers.BucketHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
@ -33,13 +32,11 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.Type;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import boilerplate.client.GuiHandler;
import boilerplate.common.compathandler.FMPCompatHandler;
import boilerplate.common.utils.handlers.BucketHandler;
import steamcraft.common.compat.CompatabilityLayer;
import steamcraft.common.compat.CompatibilityHandler;
import steamcraft.common.config.Config;
@ -60,6 +57,7 @@ import steamcraft.common.lib.ModInfo;
import steamcraft.common.lib.events.EventHandlerClient;
import steamcraft.common.lib.events.EventHandlerFML;
import steamcraft.common.lib.events.EventHandlerForge;
import steamcraft.common.lib.events.EventHandlerMobDrop;
import steamcraft.common.worldgen.WorldGenSteamcraft;
import steamcraft.common.worldgen.dimension.WorldProviderDeeps;
import steamcraft.common.worldgen.structure.MapGenCustomScatteredFeature;
@ -71,8 +69,7 @@ import steamcraft.common.worldgen.structure.StructureUndercityStart;
* @commentary by Arnold
*/
@Mod(modid = ModInfo.ID, name = ModInfo.NAME, version = ModInfo.VERSION, guiFactory = ModInfo.CONFIG_GUI, dependencies = "required-after:boilerplate;after:Thaumcraft")
public class Steamcraft
{
public class Steamcraft {
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.COMMON_PROXY)
public static CommonProxy proxy;
@ -84,8 +81,7 @@ public class Steamcraft
public static File configFolder;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
public void preInit(FMLPreInitializationEvent event) {
LoggerSteamcraft.info("Starting Preinit");
configFolder = new File(event.getModConfigurationDirectory(), "sc2");
@ -93,6 +89,7 @@ public class Steamcraft
InitBlocks.init();
InitItems.init();
// InitTinkersSupport.init();
MinecraftForge.EVENT_BUS.register(new BucketHandler());
@ -103,8 +100,7 @@ public class Steamcraft
}
@EventHandler
public void init(FMLInitializationEvent event)
{
public void init(FMLInitializationEvent event) {
LoggerSteamcraft.info("Starting Init");
CompatabilityLayer.init();
@ -116,6 +112,7 @@ public class Steamcraft
MinecraftForge.EVENT_BUS.register(new EventHandlerForge());
MinecraftForge.EVENT_BUS.register(new EventHandlerClient());
MinecraftForge.EVENT_BUS.register(new EventHandlerMobDrop());
FMLCommonHandler.instance().bus().register(new EventHandlerFML());
FMLCommonHandler.instance().bus().register(new EventHandlerClient());
@ -127,8 +124,7 @@ public class Steamcraft
if (ConfigWorldGen.generationEnabled)
GameRegistry.registerWorldGenerator(new WorldGenSteamcraft(), 1);
if (ConfigWorldGen.deepsDimensionEnabled)
{
if (ConfigWorldGen.deepsDimensionEnabled) {
DimensionManager.registerProviderType(ConfigGeneral.deepsDimensionID, WorldProviderDeeps.class, false);
DimensionManager.registerDimension(ConfigGeneral.deepsDimensionID, ConfigGeneral.deepsDimensionID);
}
@ -143,8 +139,7 @@ public class Steamcraft
@SuppressWarnings("rawtypes")
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
public void postInit(FMLPostInitializationEvent event) {
LoggerSteamcraft.info("Starting Postinit");
CompatabilityLayer.postInit();
@ -154,8 +149,7 @@ public class Steamcraft
InitMisc.initDungeonLoot();
LoggerSteamcraft.info("Finished Postinit");
LoggerSteamcraft.info(
"Please note: Steamcraft2 is now the officially unofficial mod of the Steampunk Forum at BrassGoggles, otherwise known as BG, which is only unofficial because making it official would cause a legal headache but is pretty much official, I'm just not allowed to call it that, so its not official, but it kinda is, ok? Got that? Signed, Major Vincent Smith (Otherwise known as warlordjones) - BrassGoggles moderation team member");
LoggerSteamcraft.info("Please note: Steamcraft2 is now the officially unofficial mod of the Steampunk Forum at BrassGoggles, otherwise known as BG, which is only unofficial because making it official would cause a legal headache but is pretty much official, I'm just not allowed to call it that, so its not official, but it kinda is, ok? Got that? Signed, Major Vincent Smith (Otherwise known as warlordjones) - BrassGoggles moderation team member");
if (Loader.isModLoaded("steamnsteel"))
LoggerSteamcraft.info("Evening to the distingushed ladies and gentlemen of the SteamNSteel club!");
if (Loader.isModLoaded("ImmersiveEngineering"))
@ -178,37 +172,25 @@ public class Steamcraft
}
@EventHandler
public void serverStarting(FMLServerStartingEvent event)
{
public void serverStarting(FMLServerStartingEvent event) {
event.registerServerCommand(new CommandSteamcraft());
}
// Remap old items from merged in mods
@EventHandler
public void missingMapping(FMLMissingMappingsEvent event)
{
for (MissingMapping m : event.get())
{
if (m.type == Type.BLOCK)
{
if (m.name.contains("water"))
{
public void missingMapping(FMLMissingMappingsEvent event) {
for (MissingMapping m : event.get()) {
if (m.type == Type.BLOCK) {
if (m.name.contains("water")) {
m.remap(GameRegistry.findBlock(ModInfo.ID, "BlockBoilingwater"));
}
else if (m.name.contains("mud"))
{
} else if (m.name.contains("mud")) {
m.remap(GameRegistry.findBlock(ModInfo.ID, "BlockBoilingmud"));
}
}
else if (m.type == Type.ITEM)
{
if (m.name.contains("water"))
{
} else if (m.type == Type.ITEM) {
if (m.name.contains("water")) {
m.remap(Item.getItemFromBlock(GameRegistry.findBlock(ModInfo.ID, "BlockBoilingwater")));
}
else if (m.name.contains("mud"))
{
} else if (m.name.contains("mud")) {
m.remap(Item.getItemFromBlock(GameRegistry.findBlock(ModInfo.ID, "BlockBoilingmud")));
}
}

View File

@ -14,15 +14,13 @@ package steamcraft.common.blocks;
import java.util.List;
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 cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
@ -30,19 +28,16 @@ import steamcraft.common.lib.ModInfo;
* @author Surseance
*
*/
public class BlockEngravedVanilla extends BlockEngravedSolid
{
private final IIcon[] icon = new IIcon[5];
public class BlockEngravedVanilla extends BlockEngravedSolid {
private final IIcon[] icon = new IIcon[7];
public BlockEngravedVanilla()
{
public BlockEngravedVanilla() {
super();
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final int side, final int metadata)
{
public IIcon getIcon(final int side, final int metadata) {
if (metadata < this.icon.length)
return this.icon[metadata];
else
@ -51,27 +46,26 @@ public class BlockEngravedVanilla extends BlockEngravedSolid
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir)
{
public void registerBlockIcons(IIconRegister ir) {
this.icon[0] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedDiamond");
this.icon[1] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedGold");
this.icon[2] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedIron");
this.icon[3] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedLapis");
this.icon[4] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedStone");
this.icon[5] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedEmerald");
this.icon[6] = ir.registerIcon(ModInfo.PREFIX + "blockEngravedRedstone");
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List l)
{
public void getSubBlocks(Item item, CreativeTabs tab, List l) {
for (int var4 = 0; var4 < this.icon.length; ++var4)
l.add(new ItemStack(InitBlocks.blockEngravedVanilla, 1, var4));
}
@Override
public int damageDropped(int meta)
{
public int damageDropped(int meta) {
return meta;
}
}

View File

@ -0,0 +1,87 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
import java.util.ArrayList;
import java.util.List;
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.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
/**
* @author warlordjones
*
*/
public class BlockLightSlate extends BlockSlate
{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(final IIconRegister ir)
{
// Raw
this.icon[0] = ir.registerIcon(ModInfo.PREFIX + "blockSlateRawLightBlue");
this.icon[1] = ir.registerIcon(ModInfo.PREFIX + "blockSlateRawGrey");
this.icon[2] = ir.registerIcon(ModInfo.PREFIX + "blockSlateRawLightRed");
// Cobble
this.icon[3] = ir.registerIcon(ModInfo.PREFIX + "blockSlateCobbleLightBlue");
this.icon[4] = ir.registerIcon(ModInfo.PREFIX + "blockSlateCobbleGrey");
this.icon[5] = ir.registerIcon(ModInfo.PREFIX + "blockSlateCobbleLightRed");
// Brick
this.icon[6] = ir.registerIcon(ModInfo.PREFIX + "blockSlateBrickLightBlue");
this.icon[7] = ir.registerIcon(ModInfo.PREFIX + "blockSlateBrickGrey");
this.icon[8] = ir.registerIcon(ModInfo.PREFIX + "blockSlateBrickLightRed");
// Polished
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
{
for (int var4 = 0; var4 < this.icon.length; ++var4)
l.add(new ItemStack(InitBlocks.blockLightSlate, 1, var4));
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
{
ArrayList<ItemStack> drop = new ArrayList<ItemStack>();
switch (metadata)
{
case 0:
drop.add(new ItemStack(InitBlocks.blockLightSlate, 1, 3));
break;
case 1:
drop.add(new ItemStack(InitBlocks.blockLightSlate, 1, 4));
break;
case 2:
drop.add(new ItemStack(InitBlocks.blockLightSlate, 1, 5));
break;
default:
drop.add(0, new ItemStack(InitBlocks.blockLightSlate, 1, metadata));
break;
}
return drop;
}
}

View File

@ -46,7 +46,6 @@ public class BlockMetal extends BaseMetadataBlock implements IEngravable
this.setHardness(3.0F);
this.setResistance(10.0F);
this.setStepSound(Block.soundTypeMetal);
this.setTickRandomly(true);
this.setCreativeTab(Steamcraft.tabSC2);
}

View File

@ -0,0 +1,108 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
import java.util.List;
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 cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import boilerplate.common.baseclasses.blocks.BaseMetadataBlock;
import steamcraft.client.lib.RenderIDs;
import steamcraft.common.Steamcraft;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
/**
* @author warlordjones
*
*/
public class BlockMetalLattice extends BaseMetadataBlock
{
public IIcon[] icon = new IIcon[8];
public BlockMetalLattice()
{
super(Material.iron);
this.setHardness(1.5F);
this.setResistance(5.0F);
this.setStepSound(Block.soundTypeMetal);
this.setCreativeTab(Steamcraft.tabSC2);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final int side, final int metadata)
{
if (metadata < this.icon.length)
return this.icon[metadata];
else
return this.icon[0];
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(final IIconRegister ir)
{
this.icon[0] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockAluminumLattice");
this.icon[1] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockCopperLattice");
this.icon[2] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockTinLattice");
this.icon[3] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockZincLattice");
this.icon[4] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockBrassLattice");
this.icon[5] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockBronzeLattice");
this.icon[6] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockSteelLattice");
this.icon[7] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockCastIronLattice");
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
{
for (int var4 = 0; var4 < this.icon.length; ++var4)
l.add(new ItemStack(InitBlocks.blockMetalLattice, 1, var4));
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass()
{
return 0;
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public int getRenderType()
{
return RenderIDs.blockTransWithInsideRI;
}
}

View File

@ -0,0 +1,56 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
/**
* @author warlordjones
*
*/
public class BlockMossyMetalLattice extends BlockMetalLattice
{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(final IIconRegister ir)
{
this.icon[0] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyAluminumLattice");
this.icon[1] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyCopperLattice");
this.icon[2] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyTinLattice");
this.icon[3] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyZincLattice");
this.icon[4] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyBrassLattice");
this.icon[5] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyBronzeLattice");
this.icon[6] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossySteelLattice");
this.icon[7] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockMossyCastIronLattice");
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
{
for (int var4 = 0; var4 < this.icon.length; ++var4)
l.add(new ItemStack(InitBlocks.blockMossyMetalLattice, 1, var4));
}
}

View File

@ -0,0 +1,192 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import boilerplate.common.baseclasses.blocks.BaseMetadataBlock;
import steamcraft.common.Steamcraft;
import steamcraft.common.init.InitBlocks;
public class BlockPlating extends BaseMetadataBlock
{
Block block;
public BlockPlating(Block block)
{
super(block.getMaterial());
this.setCreativeTab(Steamcraft.tabSC2);
this.block = block;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
{
if (block == InitBlocks.blockMetal)
{
for (int var4 = 0; var4 < 8; ++var4)
l.add(new ItemStack(InitBlocks.blockMetalPlate, 1, var4));
}
else if (block == InitBlocks.blockMossyMetal)
{
for (int var4 = 0; var4 < 8; ++var4)
l.add(new ItemStack(InitBlocks.blockMossyMetalPlate, 1, var4));
}
if (block == InitBlocks.blockRustyMetal)
{
for (int var4 = 0; var4 < 8; ++var4)
l.add(new ItemStack(InitBlocks.blockRustyMetalPlate, 1, var4));
}
}
/**
* Gets the block's texture. Args: side, meta
*/
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
return block.getIcon(side, meta);
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this
* box can change after the pool has been cleared to be reused)
*/
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
{
return Blocks.carpet.getCollisionBoundingBoxFromPool(world, x, y, z);
}
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
* or not to render the shared face of two adjacent blocks and also whether
* the player can attach torches, redstone wire, etc to this block.
*/
@Override
public boolean isOpaqueCube()
{
return false;
}
/**
* If this block doesn't render as an ordinary block it will return False
* (examples: signs, buttons, stairs, etc)
*/
@Override
public boolean renderAsNormalBlock()
{
return false;
}
/**
* Sets the block's bounds for rendering it as an item
*/
@Override
public void setBlockBoundsForItemRender()
{
this.func_150089_b(0);
}
protected void func_150089_b(int p_150089_1_)
{
byte b0 = 0;
float f = (1 * (1 + b0)) / 16.0F;
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
}
/**
* Checks to see if its valid to put this block at the specified
* coordinates. Args: world, x, y, z
*/
@Override
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
return super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_)
&& this.canBlockStay(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which
* neighbor changed (coordinates passed are their own) Args: x, y, z,
* neighbor Block
*/
@Override
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
{
this.func_150090_e(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_);
}
private boolean func_150090_e(World p_150090_1_, int p_150090_2_, int p_150090_3_, int p_150090_4_)
{
if (!this.canBlockStay(p_150090_1_, p_150090_2_, p_150090_3_, p_150090_4_))
{
this.dropBlockAsItem(p_150090_1_, p_150090_2_, p_150090_3_, p_150090_4_,
p_150090_1_.getBlockMetadata(p_150090_2_, p_150090_3_, p_150090_4_), 0);
p_150090_1_.setBlockToAir(p_150090_2_, p_150090_3_, p_150090_4_);
return false;
}
else
{
return true;
}
}
/**
* Can this block stay at this position. Similar to canPlaceBlockAt except
* gets checked often with plants.
*/
@Override
public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
{
return !p_149718_1_.isAirBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
}
/**
* Returns true if the given side of this block type should be rendered, if
* the adjacent block is at the given coordinates. Args: blockAccess, x, y,
* z, side
*/
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
{
return (p_149646_5_ == 1) || super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
}
/**
* Determines the damage on the item the block drops. Used in cloth and
* wood.
*/
@Override
public int damageDropped(int p_149692_1_)
{
return p_149692_1_;
}
}

View File

@ -0,0 +1,56 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
/**
* @author warlordjones
*
*/
public class BlockRustyMetalLattice extends BlockMetalLattice
{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(final IIconRegister ir)
{
this.icon[0] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyAluminumLattice");
this.icon[1] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyCopperLattice");
this.icon[2] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyTinLattice");
this.icon[3] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyZincLattice");
this.icon[4] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyBrassLattice");
this.icon[5] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyBronzeLattice");
this.icon[6] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustySteelLattice");
this.icon[7] = ir.registerIcon(ModInfo.PREFIX + "metal/" + "blockRustyCastIronLattice");
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
{
for (int var4 = 0; var4 < this.icon.length; ++var4)
l.add(new ItemStack(InitBlocks.blockRustyMetalLattice, 1, var4));
}
}

View File

@ -38,7 +38,7 @@ import steamcraft.common.lib.ModInfo;
*/
public class BlockSlate extends BaseMetadataBlock
{
private final IIcon[] icon = new IIcon[9];
protected final IIcon[] icon = new IIcon[9];
public BlockSlate()
{
@ -46,7 +46,6 @@ public class BlockSlate extends BaseMetadataBlock
this.setHardness(3.0F);
this.setResistance(10.0F);
this.setStepSound(Block.soundTypeStone);
this.setBlockName("blockSlate");
this.setCreativeTab(Steamcraft.tabSC2);
}

View File

@ -42,10 +42,10 @@ public class BlockLiquidBoiler extends BlockBaseBoiler
@Override
public void registerBlockIcons(IIconRegister icon)
{
this.blockIcon = icon.registerIcon(ModInfo.PREFIX + "blockSteamBoilerSide");
this.blockIcon = icon.registerIcon(ModInfo.PREFIX + "blockSteamBoilerTop");
this.iconFront = icon.registerIcon(ModInfo.PREFIX + "blockSteamBoilerFrontInactive");
this.iconFrontActive = icon.registerIcon(ModInfo.PREFIX + "blockSteamBoilerFrontActive");
this.iconTop = icon.registerIcon(ModInfo.PREFIX + "blockSteamBoilerTop");
this.iconTop = icon.registerIcon(ModInfo.PREFIX + "blockIntake");
}
@Override

View File

@ -12,23 +12,20 @@
*/
package steamcraft.common.compat;
import boilerplate.common.utils.helpers.IMCHelper;
import boilerplate.common.utils.helpers.OreDictHelper;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import boilerplate.common.utils.helpers.IMCHelper;
import boilerplate.common.utils.helpers.OreDictHelper;
import steamcraft.common.init.InitBiomes;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.init.InitItems;
@ -40,26 +37,22 @@ import steamcraft.common.lib.ModInfo;
* @author warlordjones
*
*/
public class CompatabilityLayer
{
public class CompatabilityLayer {
public static int ingotLiquidValue = 144;
public static int nuggetLiquidValue = ingotLiquidValue / 9;
public static int blockLiquidValue = ingotLiquidValue * 9;
public static void init()
{
public static void init() {
registerOreDictionaryEntries();
}
public static void postInit()
{
public static void postInit() {
registerBiomeTypes();
sendIMCMessages();
ForgeHooks.init();
}
private static void sendIMCMessages()
{
private static void sendIMCMessages() {
// Version Checker
NBTTagCompound tag = new NBTTagCompound();
tag.setString("curseProjectName", "224017-steamcraft-2-beta-2-fluxian-storm");
@ -70,13 +63,9 @@ public class CompatabilityLayer
sendTiConIMC();
if (Loader.isModLoaded("Thaumcraft"))
sendThaumcraftIMC();
if (Loader.isModLoaded("AquaTweaks"))
{
String[] blockNames = new String[] { "BlockCastIronFence", "BlockCastIronGate", "BlockCastIronRailing", "BlockLightningRod",
"BlockTeslaCoil", "BlockCopperPipe", "BlockCopperWire", "BlockRedwoodFence", "blockMangroveFence", "blockWillowFence",
"blockPetrifiedFence", "BlockCharger" };
for (String blockName : blockNames)
{
if (Loader.isModLoaded("AquaTweaks")) {
String[] blockNames = new String[] { "BlockCastIronFence", "BlockCastIronGate", "BlockCastIronRailing", "BlockLightningRod", "BlockTeslaCoil", "BlockCopperPipe", "BlockCopperWire", "BlockRedwoodFence", "blockMangroveFence", "blockWillowFence", "blockPetrifiedFence", "BlockCharger" };
for (String blockName : blockNames) {
NBTTagCompound tag1 = new NBTTagCompound();
tag1.setString("modid", ModInfo.ID);
tag1.setString("block", blockName);
@ -85,43 +74,29 @@ public class CompatabilityLayer
}
}
private static void sendThaumcraftIMC()
{
private static void sendThaumcraftIMC() {
FMLInterModComms.sendMessage("Thaumcraft", "harvestStandardCrop", new ItemStack(InitBlocks.blockTeaPlant, 1, 1));
FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster", Block.getIdFromBlock(InitBlocks.blockCustomOre) + "," + 0 + ","
+ Item.getIdFromItem(InitItems.itemSteamcraftCluster) + "," + 0 + ",2.0");
FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster", Block.getIdFromBlock(InitBlocks.blockCustomOre) + "," + 2 + ","
+ Item.getIdFromItem(InitItems.itemSteamcraftCluster) + "," + 1 + ",2.0");
FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster", Block.getIdFromBlock(InitBlocks.blockCustomOre) + "," + 0 + "," + Item.getIdFromItem(InitItems.itemSteamcraftCluster) + "," + 0 + ",2.0");
FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster", Block.getIdFromBlock(InitBlocks.blockCustomOre) + "," + 2 + "," + Item.getIdFromItem(InitItems.itemSteamcraftCluster) + "," + 1 + ",2.0");
}
private static void sendTiConIMC()
{
private static void sendTiConIMC() {
LoggerSteamcraft.info("TiCon Detected, adding Etherium Tool Material");
// Aluminum, Copper, Tin
for (int i = 0; i < 3; i++)
{
BlockFluidClassic block_fluid = (BlockFluidClassic) GameRegistry.findBlock("TConstruct",
"fluid.molten." + LibInfo.metals[i].toLowerCase());
IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockMetal, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), blockLiquidValue), 600);
IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockCustomOre, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), ingotLiquidValue * 2), 600);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemIngot, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), ingotLiquidValue), 300);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemNugget, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), nuggetLiquidValue), 150);
for (int i = 0; i < 3; i++) {
BlockFluidClassic block_fluid = (BlockFluidClassic) GameRegistry.findBlock("TConstruct", "fluid.molten." + LibInfo.metals[i].toLowerCase());
IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockMetal, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), blockLiquidValue), 600);
IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockCustomOre, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), ingotLiquidValue * 2), 600);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemIngot, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), ingotLiquidValue), 300);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemNugget, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), nuggetLiquidValue), 150);
}
// Skip Zinc and Brass. Bronze, Steel.
for (int i = 5; i < 7; i++)
{
for (int i = 5; i < 7; i++) {
String metalname = LibInfo.metals[i].toLowerCase();
BlockFluidClassic block_fluid = (BlockFluidClassic) GameRegistry.findBlock("TConstruct", "fluid.molten." + metalname);
IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockMetal, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), blockLiquidValue), 600);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemIngot, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), ingotLiquidValue), 300);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemNugget, 1, i), InitBlocks.blockMetal,
new FluidStack(block_fluid.getFluid(), nuggetLiquidValue), 150);
IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockMetal, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), blockLiquidValue), 600);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemIngot, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), ingotLiquidValue), 300);
IMCHelper.addNewSmeltable(new ItemStack(InitItems.itemNugget, 1, i), InitBlocks.blockMetal, new FluidStack(block_fluid.getFluid(), nuggetLiquidValue), 150);
}
/*
* Zinc IMCHelper.addNewSmeltable(new ItemStack(InitBlocks.blockMetal,
@ -149,8 +124,7 @@ public class CompatabilityLayer
IMCHelper.addNewFluxBattery(InitItems.itemElectricJarHuge);
}
private static void registerOreDictionaryEntries()
{
private static void registerOreDictionaryEntries() {
LoggerSteamcraft.info("Registering Thingies in OreDictionary");
OreDictHelper.registerOreWithAlts(InitItems.itemIngot, "ingotAluminum", "ingotAluminium");
OreDictHelper.registerOre("ingotCopper", InitItems.itemIngot, 1);
@ -180,6 +154,7 @@ public class CompatabilityLayer
OreDictHelper.registerOre("nuggetBronze", InitItems.itemNugget, 5);
OreDictHelper.registerOre("nuggetSteel", InitItems.itemNugget, 6);
OreDictHelper.registerOre("nuggetCastIron", InitItems.itemNugget, 7);
OreDictHelper.registerOre("nuggetIron", InitItems.itemNuggetIron, 0);
OreDictHelper.registerOreWithAlts(InitItems.itemPowder, "dustAluminum", "dustAluminium");
OreDictHelper.registerOre("dustCopper", InitItems.itemPowder, 1);
@ -202,8 +177,9 @@ public class CompatabilityLayer
OreDictHelper.registerOreWithAlts(InitItems.itemResource, 0, "powderSulfur", "sulfur", "dustSulfur");
OreDictHelper.registerOre("powderPhosphorus", InitItems.itemResource, 1);
OreDictHelper.registerOre("ingotUranium", InitItems.itemResource, 2);
OreDictHelper.registerOre("pelletUranium", InitItems.itemResource, 3);
OreDictHelper.registerOreWithAlts(InitItems.itemResource, 2, "sulfuricAcid", "bottleSulfuricAcid");
OreDictHelper.registerOre("ingotUranium", InitItems.itemResource, 3);
OreDictHelper.registerOre("pelletUranium", InitItems.itemResource, 4);
OreDictHelper.registerOreWithAlts(InitItems.itemSlimeRubber, "itemRubber", "barRubber", "rawRubber");
OreDictionary.registerOre("partCastIronRod", InitItems.itemMachinePart);
@ -216,8 +192,7 @@ public class CompatabilityLayer
String[] partType = new String[] { "Gear", "Sprocket", "Spring", "Thread", "Nut", "Bolt", "Washer", "Bearing", "Screw", "Nail" };
for (int i = 0; i < partType.length; i++)
{
for (int i = 0; i < partType.length; i++) {
OreDictHelper.registerOreWithAlts(InitItems.itemIronParts, i, "partIron", partType[i], partType[i].toLowerCase() + "Iron");
OreDictHelper.registerOreWithAlts(InitItems.itemSteelParts, i, "partSteel", partType[i], partType[i].toLowerCase() + "Steel");
@ -240,12 +215,19 @@ public class CompatabilityLayer
OreDictionary.registerOre("craftingHammer", new ItemStack(InitItems.itemHammer, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("craftingHammer", new ItemStack(InitItems.itemBugHammer, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockSlate, 1, 0));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockSlate, 1, 1));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockSlate, 1, 2));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockSlate, 1, 3));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockSlate, 1, 3));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockSlate, 1, 4));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockSlate, 1, 5));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockSlate, 1, 6));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockLightSlate, 1, 0));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockLightSlate, 1, 1));
OreDictionary.registerOre("stone", new ItemStack(InitBlocks.blockLightSlate, 1, 2));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockLightSlate, 1, 3));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockLightSlate, 1, 4));
OreDictionary.registerOre("cobblestone", new ItemStack(InitBlocks.blockLightSlate, 1, 5));
for (int i = 1; i < 10; i++)
OreDictionary.registerOre("foodTea", new ItemStack(InitItems.itemTeacup, 1, i));
@ -253,14 +235,12 @@ public class CompatabilityLayer
OreDictionary.registerOre("blockUranium", new ItemStack(InitBlocks.blockUranium));
}
private static void registerBiomeTypes()
{
private static void registerBiomeTypes() {
LoggerSteamcraft.info("Registering Biome Dictionary entries");
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepths, BiomeDictionary.Type.HILLS);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsF, BiomeDictionary.Type.HILLS, BiomeDictionary.Type.FOREST);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsM, BiomeDictionary.Type.MOUNTAIN);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsS, BiomeDictionary.Type.HILLS, BiomeDictionary.Type.SPOOKY,
BiomeDictionary.Type.FOREST);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsS, BiomeDictionary.Type.HILLS, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.FOREST);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsI, BiomeDictionary.Type.WASTELAND);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsJ, BiomeDictionary.Type.JUNGLE, BiomeDictionary.Type.LUSH);
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsSC, BiomeDictionary.Type.HOT, BiomeDictionary.Type.WET);
@ -269,10 +249,8 @@ public class CompatabilityLayer
BiomeDictionary.registerBiomeType(InitBiomes.biomeDepthsTF, BiomeDictionary.Type.FOREST, BiomeDictionary.Type.DENSE);
}
public static void initCompatItems()
{
if (Loader.isModLoaded("Thaumcraft"))
{
public static void initCompatItems() {
if (Loader.isModLoaded("Thaumcraft")) {
LoggerSteamcraft.info("Thaumcraft Detected. Loading Wizarding Module");
GameRegistry.registerItem(InitItems.itemSteamcraftCluster, "ItemSteamcraftCluster");
@ -283,8 +261,7 @@ public class CompatabilityLayer
Item thaumometer = GameRegistry.findItem("Thaumcraft", "ItemThaumometer");
GameRegistry.addRecipe(new ShapedOreRecipe(InitItems.itemThaumicMonocle, " I ", "ITI", " I ", 'I', "ingotBrass", 'T', thaumometer));
}
if (Loader.isModLoaded("TConstruct"))
{
if (Loader.isModLoaded("TConstruct")) {
// GameRegistry.registerBlock(InitBlocks.blockMoltenZinc,
// "blockMoltenZinc");
// GameRegistry.registerBlock(InitBlocks.blockMoltenBrass,

View File

@ -15,11 +15,9 @@ package steamcraft.common.config;
import java.io.File;
import net.minecraftforge.common.config.Configuration;
import steamcraft.common.lib.LoggerSteamcraft;
public class ConfigGeneral
{
public class ConfigGeneral {
public static Configuration config;
public static final String CATEGORY_GENERAL = "general";
@ -29,28 +27,27 @@ public class ConfigGeneral
public static boolean drawFluid;
public static boolean drawInside;
public static double armorSpawnChance;
public static boolean golemFireDrop;
public static int deepsDimensionID;
public static boolean unnaturalLightningStrikes, naturalLightningStrikes, weather2LightningStrikes;
public static int depthsBiomeID, depthsFBiomeID, depthsMBiomeID, depthsSBiomeID, depthsIBiomeID, depthsSCBiomeID, depthsSCHBiomeID,
depthsSWBiomeID, depthsTFBiomeID, depthsJBiomeID;// ,
// depthsOBiomeID,
// depthsBBiomeID;
public static int depthsBiomeID, depthsFBiomeID, depthsMBiomeID, depthsSBiomeID, depthsIBiomeID, depthsSCBiomeID, depthsSCHBiomeID, depthsSWBiomeID, depthsTFBiomeID, depthsJBiomeID;// ,
// depthsOBiomeID,
// depthsBBiomeID;
public static double spyglassZoom;
public static String[] oredictMetals;
public static void initialize(File configFile)
{
public static void initialize(File configFile) {
config = new Configuration(configFile);
try
{
try {
config.load();
partyPooper = config.get(CATEGORY_GENERAL, "Remove all little fun things from mod :(", false).getBoolean();
golemFireDrop = config.get(CATEGORY_GENERAL, "Iron Golems drop cast iron when dying from fire (Kinda breaks iron farms that use fire drop)", true).getBoolean();
armorSpawnChance = config.get(CATEGORY_GENERAL, "Spawn Chance of our Armor on Zombies/Skeletons (0.0-1.0)", 0.2D).getDouble();
drawFluid = config.get(CATEGORY_CLIENT, "Render fluid inside blocks", true).getBoolean();
@ -77,14 +74,10 @@ public class ConfigGeneral
depthsTFBiomeID = config.get(CATEGORY_GENERAL, "Biome ID for Depths Tall Forest Biome", biomeID++).getInt();
depthsJBiomeID = config.get(CATEGORY_GENERAL, "Biome ID for Depths Jungle Biome", biomeID++).getInt();
oredictMetals = config.getStringList(CATEGORY_GENERAL,
"List of oredictionary names of ingots/plates that the grindstone will be able to convert to dust",
new String[] { "Platinum", "Nickel", "Lead", "Silver", "" }, "");
} catch (Exception e)
{
oredictMetals = config.getStringList(CATEGORY_GENERAL, "List of oredictionary names of ingots/plates that the grindstone will be able to convert to dust", new String[] { "Platinum", "Nickel", "Lead", "Silver", "" }, "");
} catch (Exception e) {
LoggerSteamcraft.error("Failed to load configuration file:" + e);
} finally
{
} finally {
if (config.hasChanged())
config.save();
}

View File

@ -63,8 +63,8 @@ public class ConfigWorldGen
// Generation
generationEnabled = config.get(CATEGORY_GEN_OPTIONS, "ALL SC2 World Gen, everywhere", true).getBoolean(true);
deepsGenerationEnabled = config.get(CATEGORY_GEN_OPTIONS, "Registration of the Deeps Dimension", true).getBoolean(true);
deepsPortalGenEnabled = config.get(CATEGORY_GEN_OPTIONS, "Generation of Deeps portals", true).getBoolean(true);
deepsGenerationEnabled = config.get(CATEGORY_GEN_OPTIONS, "Registration of the Deeps Dimension", false).getBoolean(false);
deepsPortalGenEnabled = config.get(CATEGORY_GEN_OPTIONS, "Generation of Deeps portals", false).getBoolean(false);
overworldGenerationEnabled = config.get(CATEGORY_GEN_OPTIONS, "All Overworld Generation", true).getBoolean(true);
netherGenerationEnabled = config.get(CATEGORY_GEN_OPTIONS, "All Nether Generation", true).getBoolean(true);

View File

@ -16,22 +16,17 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import steamcraft.common.tiles.container.slot.SlotVanity;
/**
* @author warlordjones
*
*/
public class ContainerVanity extends Container
{
public class ContainerVanity extends Container {
@SuppressWarnings("unused")
private static final int ARMOR_START = InventoryVanity.INV_SIZE, ARMOR_END = ARMOR_START + 3, INV_START = ARMOR_END + 1, INV_END = INV_START + 26,
HOTBAR_START = INV_END + 1, HOTBAR_END = HOTBAR_START + 8;
private static final int ARMOR_START = InventoryVanity.INV_SIZE, ARMOR_END = ARMOR_START + 3, INV_START = ARMOR_END + 1, INV_END = INV_START + 26, HOTBAR_START = INV_END + 1, HOTBAR_END = HOTBAR_START + 8;
public ContainerVanity(final EntityPlayer player, final InventoryPlayer inventoryPlayer, final InventoryVanity inventoryCustom)
{
public ContainerVanity(final EntityPlayer player, final InventoryPlayer inventoryPlayer, final InventoryVanity inventoryCustom) {
// Custom Slots
this.addSlotToContainer(new SlotVanity(inventoryCustom, 0, 25, 8));
this.addSlotToContainer(new SlotVanity(inventoryCustom, 1, 25, 26));
@ -53,8 +48,7 @@ public class ContainerVanity extends Container
}
@Override
public boolean canInteractWith(final EntityPlayer player)
{
public boolean canInteractWith(final EntityPlayer player) {
return true;
}

View File

@ -16,9 +16,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;
import steamcraft.common.container.InventoryVanity;
/**
@ -26,53 +24,44 @@ import steamcraft.common.container.InventoryVanity;
*
*/
// TODO: Add packets
public class EntityPlayerExtended implements IExtendedEntityProperties
{
public class EntityPlayerExtended implements IExtendedEntityProperties {
public final static String EXT_PROP_NAME = "SteamcraftPlayerExtended";
private final InventoryVanity inventory = new InventoryVanity();
@SuppressWarnings("unused")
private final EntityPlayer player;
public EntityPlayerExtended(final EntityPlayer player)
{
public EntityPlayerExtended(final EntityPlayer player) {
this.player = player;
}
public static void register(final EntityPlayer player)
{
public static void register(final EntityPlayer player) {
player.registerExtendedProperties(EntityPlayerExtended.EXT_PROP_NAME, new EntityPlayerExtended(player));
}
public static EntityPlayerExtended get(final EntityPlayer player)
{
public static EntityPlayerExtended get(final EntityPlayer player) {
return (EntityPlayerExtended) player.getExtendedProperties(EXT_PROP_NAME);
}
@Override
public void saveNBTData(final NBTTagCompound tagCompound)
{
public void saveNBTData(final NBTTagCompound tagCompound) {
final NBTTagCompound properties = new NBTTagCompound();
tagCompound.setTag(EXT_PROP_NAME, properties);
this.inventory.writeToNBT(properties);
}
@Override
public void loadNBTData(final NBTTagCompound tagCompound)
{
public void loadNBTData(final NBTTagCompound tagCompound) {
final NBTTagCompound properties = (NBTTagCompound) tagCompound.getTag(EXT_PROP_NAME);
if (properties != null)
this.inventory.readFromNBT(properties);
}
@Override
public void init(final Entity entity, final World world)
{
public void init(final Entity entity, final World world) {
}
public InventoryVanity getInventory()
{
public InventoryVanity getInventory() {
return this.inventory;
}
}

View File

@ -48,14 +48,15 @@ public class EntityWhale extends EntityWaterMob
for (k = 0; k < j; ++k)
{
if (this.isBurning())
{
this.dropItem(InitItems.itemCookedWhaleMeat, this.rand.nextInt(15) + 5);
}
else
{
this.dropItem(InitItems.itemWhaleMeat, this.rand.nextInt(15) + 5);
}
// if (this.isBurning())
// {
// this.dropItem(InitItems.itemCookedWhaleMeat,
// this.rand.nextInt(15) + 5);
// }
// else
// {
this.dropItem(InitItems.itemWhaleMeat, this.rand.nextInt(15) + 5);
// }
}
}

View File

@ -14,64 +14,51 @@ package steamcraft.common.entities.projectile;
import java.util.List;
import boilerplate.common.baseclasses.BaseThrowableEntity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import boilerplate.common.baseclasses.BaseThrowableEntity;
import steamcraft.common.lib.DamageSourceHandler;
public class EntitySplashLightningBottle extends BaseThrowableEntity
{
public EntitySplashLightningBottle(World world, EntityLivingBase entityLiving)
{
public class EntitySplashLightningBottle extends BaseThrowableEntity {
public EntitySplashLightningBottle(World world, EntityLivingBase entityLiving) {
super(world, entityLiving);
}
public EntitySplashLightningBottle(World world)
{
public EntitySplashLightningBottle(World world) {
super(world);
this.setSize(0.5F, 0.5F);
}
@Override
protected float getGravityVelocity()
{
protected float getGravityVelocity() {
return 0.03F;
}
@SuppressWarnings({ "rawtypes", "unused" })
@SuppressWarnings({ "rawtypes" })
@Override
protected void onImpact(MovingObjectPosition mop)
{
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
if (!this.worldObj.isRemote)
{
protected void onImpact(MovingObjectPosition mop) {
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
if (!this.worldObj.isRemote) {
AxisAlignedBB axisalignedbb = this.boundingBox.expand(4.0D, 2.0D, 4.0D);
List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
if ((list1 != null) && !list1.isEmpty())
{
for (Object obj : list1)
{
if ((list1 != null) && !list1.isEmpty()) {
for (Object obj : list1) {
EntityLivingBase entitylivingbase = (EntityLivingBase) obj;
double d0 = this.getDistanceSqToEntity(entitylivingbase);
if (d0 < 16.0D)
{
if (d0 < 16.0D) {
double d1 = 1.0D - (Math.sqrt(d0) / 4.0D);
if (entitylivingbase == mop.entityHit)
{
if (entitylivingbase == mop.entityHit) {
d1 = 1.0D;
}
entitylivingbase.attackEntityFrom(DamageSourceHandler.electrocution, 4);
if (entitylivingbase instanceof EntityCreeper)
{
if (entitylivingbase instanceof EntityCreeper) {
EntityCreeper creeper = (EntityCreeper) entitylivingbase;
creeper.getDataWatcher().updateObject(17, Byte.valueOf((byte) (1)));
}

View File

@ -58,14 +58,19 @@ import steamcraft.common.blocks.BlockInfestedGrass;
import steamcraft.common.blocks.BlockInvertedCastIronLamp;
import steamcraft.common.blocks.BlockLamp;
import steamcraft.common.blocks.BlockLeafPile;
import steamcraft.common.blocks.BlockLightSlate;
import steamcraft.common.blocks.BlockMeltingIce;
import steamcraft.common.blocks.BlockMetal;
import steamcraft.common.blocks.BlockMetalLattice;
import steamcraft.common.blocks.BlockMossyMetal;
import steamcraft.common.blocks.BlockMossyMetalLattice;
import steamcraft.common.blocks.BlockMotionSensor;
import steamcraft.common.blocks.BlockMud;
import steamcraft.common.blocks.BlockPlankStack;
import steamcraft.common.blocks.BlockPlating;
import steamcraft.common.blocks.BlockPolishedPlanks;
import steamcraft.common.blocks.BlockRustyMetal;
import steamcraft.common.blocks.BlockRustyMetalLattice;
import steamcraft.common.blocks.BlockSiren;
import steamcraft.common.blocks.BlockSkyrail;
import steamcraft.common.blocks.BlockSlate;
@ -130,6 +135,7 @@ import steamcraft.common.tiles.energy.TileTurbine;
*/
public class InitBlocks
{
public static Block blockArmorEditor;
public static Block blockBloomery;
@ -173,7 +179,9 @@ public class InitBlocks
public static Block blockMeltingIce, blockGhostIce;
// Metals
public static Block blockMetal, blockMossyMetal, blockRustyMetal, blockUranium, blockEtherium;
public static Block blockMetal, blockMossyMetal, blockRustyMetal, blockUranium;
public static Block blockMetalPlate, blockRustyMetalPlate, blockMossyMetalPlate;
public static Block blockMetalLattice, blockRustyMetalLattice, blockMossyMetalLattice;
public static Block blockMoltenZinc, blockMoltenBrass;
public static Block blockPath, blockMud, blockLeafCover, blockMoss;
@ -202,6 +210,9 @@ public class InitBlocks
// TODO Meta?
public static Block blockSlate, blockRawBlueSlateStairs, blockRawBlackSlateStairs, blockRawRedSlateStairs, blockCobbleBlueSlateStairs,
blockCobbleBlackSlateStairs, blockCobbleRedSlateStairs, blockBrickBlueSlateStairs, blockBrickBlackSlateStairs, blockBrickRedSlateStairs;
public static Block blockLightSlate, blockRawLightBlueSlateStairs, blockRawGreySlateStairs, blockRawLightRedSlateStairs,
blockCobbleLightBlueSlateStairs, blockCobbleGreySlateStairs, blockCobbleLightRedSlateStairs, blockBrickLightBlueSlateStairs,
blockBrickGreySlateStairs, blockBrickLightRedSlateStairs;
public static Block blockStandardSiren, blockStandardSirenOn, blockAllClearSiren, blockAllClearSirenOn, blockIntruderSiren, blockIntruderSirenOn,
blockNuclearSiren, blockNuclearSirenOn, blockMotionSensor, blockMotionSensorOn;
@ -297,6 +308,9 @@ public class InitBlocks
registerFluid("boilingwater", boilingWaterFluid, Material.lava, (BlockSteamcraftFluid) blockBoilingWater, false, 373, 900, 800, 0);
registerFluid("boilingmud", boilingMudFluid, Material.lava, (BlockSteamcraftFluid) blockBoilingMud, false, 373, 900, 800, 0);
registerFluid("whaleoil", whaleOilFluid, Material.water, (BlockSteamcraftFluid) blockWhaleOil, false, 300, 1100, 1100, 0);
registerFluid("moltenzinc", moltenZincFluid, Material.lava, (BlockSteamcraftFluid) blockMoltenZinc, false, 1300, 3000, 6000, 12);
registerFluid("moltenbrass", moltenBrassFluid, Material.lava, (BlockSteamcraftFluid) blockMoltenBrass, false, 1300, 3000, 6000, 12);
}
public static void registerFluid(String fluidName, Fluid fluid, Material material, BlockSteamcraftFluid fluidBlock, boolean isGaseous, int temp,
@ -394,6 +408,7 @@ public class InitBlocks
// Ores
blockCustomOre = new BlockSteamcraftOre().setBlockName("blockSteamcraftOre");
blockSlate = new BlockSlate().setBlockName("blockSlate");
blockLightSlate = new BlockLightSlate().setBlockName("blockLightSlate");
blockRawBlueSlateStairs = new BlockCustomStairs(blockSlate, 0).setBlockName("blockRawBlueSlateStairs");
registerBlock(blockRawBlueSlateStairs, "BlockRawBlueSlateStairs");
@ -414,8 +429,28 @@ public class InitBlocks
blockBrickRedSlateStairs = new BlockCustomStairs(blockSlate, 8).setBlockName("blockBrickRedSlateStairs");
registerBlock(blockBrickRedSlateStairs, "BlockBrickRedSlateStairs");
blockRawLightBlueSlateStairs = new BlockCustomStairs(blockSlate, 0).setBlockName("blockRawLightBlueSlateStairs");
registerBlock(blockRawLightBlueSlateStairs, "BlockRawLightBlueSlateStairs");
blockRawGreySlateStairs = new BlockCustomStairs(blockSlate, 1).setBlockName("blockRawGreySlateStairs");
registerBlock(blockRawGreySlateStairs, "BlockRawGreySlateStairs");
blockRawLightRedSlateStairs = new BlockCustomStairs(blockSlate, 2).setBlockName("blockRawLightRedSlateStairs");
registerBlock(blockRawLightRedSlateStairs, "BlockRawLightRedSlateStairs");
blockCobbleLightBlueSlateStairs = new BlockCustomStairs(blockSlate, 3).setBlockName("blockCobbleLightBlueSlateStairs");
registerBlock(blockCobbleLightBlueSlateStairs, "BlockCobbleLightBlueSlateStairs");
blockCobbleGreySlateStairs = new BlockCustomStairs(blockSlate, 4).setBlockName("blockCobbleGreySlateStairs");
registerBlock(blockCobbleGreySlateStairs, "BlockCobbleGreySlateStairs");
blockCobbleLightRedSlateStairs = new BlockCustomStairs(blockSlate, 5).setBlockName("blockCobbleLightRedSlateStairs");
registerBlock(blockCobbleLightRedSlateStairs, "BlockCobbleLightRedSlateStairs");
blockBrickLightBlueSlateStairs = new BlockCustomStairs(blockSlate, 6).setBlockName("blockBrickLightBlueSlateStairs");
registerBlock(blockBrickLightBlueSlateStairs, "BlockBrickLightBlueSlateStairs");
blockBrickGreySlateStairs = new BlockCustomStairs(blockSlate, 7).setBlockName("blockBrickGreySlateStairs");
registerBlock(blockBrickGreySlateStairs, "BlockBrickGreySlateStairs");
blockBrickLightRedSlateStairs = new BlockCustomStairs(blockSlate, 8).setBlockName("blockBrickLightRedSlateStairs");
registerBlock(blockBrickLightRedSlateStairs, "BlockBrickLightRedSlateStairs");
registerBlock(blockCustomOre, BaseItemBlockWithMetadata.class, "BlockSteamcraftOre", 7);
registerBlock(blockSlate, BaseItemBlockWithMetadata.class, "BlockSlate", 9);
registerBlock(blockLightSlate, BaseItemBlockWithMetadata.class, "BlockLightSlate", 9);
// Metals
blockMetal = new BlockMetal().setBlockName("blockMetal");
@ -425,6 +460,20 @@ public class InitBlocks
blockMossyMetal = new BlockMossyMetal().setBlockName("blockMossyMetal");
registerBlock(blockMossyMetal, BaseItemBlockWithMetadata.class, "BlockMossyMetal", 8);
blockMetalPlate = new BlockPlating(blockMetal).setBlockName("blockMetalPlate");
registerBlock(blockMetalPlate, BaseItemBlockWithMetadata.class, "BlockMetalPlating", 8);
blockRustyMetalPlate = new BlockPlating(blockRustyMetal).setBlockName("blockRustyMetalPlate");
registerBlock(blockRustyMetalPlate, BaseItemBlockWithMetadata.class, "BlockRustyMetalPlating", 8);
blockMossyMetalPlate = new BlockPlating(blockMossyMetal).setBlockName("blockMossyMetalPlate");
registerBlock(blockMossyMetalPlate, BaseItemBlockWithMetadata.class, "BlockMossyMetalPlating", 8);
blockMetalLattice = new BlockMetalLattice().setBlockName("blockMetalLattice");
registerBlock(blockMetalLattice, BaseItemBlockWithMetadata.class, "BlockMetalLattice", 8);
blockRustyMetalLattice = new BlockRustyMetalLattice().setBlockName("blockRustyMetalLattice");
registerBlock(blockRustyMetalLattice, BaseItemBlockWithMetadata.class, "BlockRustyMetalLattice", 8);
blockMossyMetalLattice = new BlockMossyMetalLattice().setBlockName("blockMossyMetalLattice");
registerBlock(blockMossyMetalLattice, BaseItemBlockWithMetadata.class, "BlockMossyMetalLattice", 8);
blockUranium = new BlockUranium(Material.iron).setBlockName("blockUranium");
registerBlock(blockUranium, "BlockUranium");
}

View File

@ -59,7 +59,7 @@ public class InitEntities
EntityRegistry.registerModEntity(EntitySpiderQueen.class, "SpiderQueen", entID++, Steamcraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityShroomZombie.class, "ShroomZombie", entID++, Steamcraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityShroomSkeleton.class, "ShroomSkeleton", entID++, Steamcraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityAbandonedGolem.class, "AbdandonedGolem", entID++, Steamcraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityAbandonedGolem.class, "AbandonedGolem", entID++, Steamcraft.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityWhale.class, "Whale", entID++, Steamcraft.instance, 64, 1, true);
EntityRegistry.addSpawn(EntityWhale.class, 1, 1, 1, EnumCreatureType.waterCreature,
BiomeDictionary.getBiomesForType(BiomeDictionary.Type.OCEAN));
@ -68,7 +68,7 @@ public class InitEntities
EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", entID++, Steamcraft.instance, 40, 1, true);
EntityRegistry.registerModEntity(EntityRocket.class, "Rocket", entID++, Steamcraft.instance, 40, 1, true);
EntityRegistry.registerModEntity(EntitySplashLightningBottle.class, "SplashLightningBottle", entID++, Steamcraft.instance, 40, 1, true);
EntityRegistry.registerModEntity(EntityFieldManipulator.class, "SplashLightningBottle", entID++, Steamcraft.instance, 40, 1, true);
EntityRegistry.registerModEntity(EntityFieldManipulator.class, "FieldManipulator", entID++, Steamcraft.instance, 40, 1, true);
// Block
EntityRegistry.registerModEntity(EntityTimeBomb.class, "TimeBomb", entID++, Steamcraft.instance, 40, 1, true);
EntityRegistry.registerModEntity(EntityFallingBoulder.class, "FallingBoulder", entID++, Steamcraft.instance, 40, 1, true);

View File

@ -12,21 +12,18 @@
*/
package steamcraft.common.init;
import boilerplate.common.utils.handlers.BucketHandler;
import boilerplate.common.utils.helpers.RegistryHelper;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import boilerplate.common.utils.handlers.BucketHandler;
import boilerplate.common.utils.helpers.RegistryHelper;
import steamcraft.common.Steamcraft;
import steamcraft.common.items.BaseItem;
import steamcraft.common.items.ItemCanister;
@ -47,6 +44,7 @@ import steamcraft.common.items.ItemMatch;
import steamcraft.common.items.ItemMobBottle;
import steamcraft.common.items.ItemMonsterSpawner;
import steamcraft.common.items.ItemNugget;
import steamcraft.common.items.ItemNuggetIron;
import steamcraft.common.items.ItemParts;
import steamcraft.common.items.ItemPowder;
import steamcraft.common.items.ItemResource;
@ -109,8 +107,7 @@ import steamcraft.common.lib.ModInfo;
* @author Surseance
*
*/
public class InitItems
{
public class InitItems {
// Tools
public static Item drillCore, drillBase, drillWood, drillStone, drillIron, drillDiamond, drillGold, drillSteam;
@ -124,12 +121,12 @@ public class InitItems
public static Item helmetWhalebone, chestplateWhalebone, legsWhalebone, bootsWhalebone;
// Modules
public static Item itemAqualung, itemPistonPlating, itemTank, itemWatchDisplay, itemClimbingSpikes, itemLegBraces, itemSpringHeels,
itemRollerSkates, itemParachute, itemFlippers, itemLifeVest, itemPistonBoots, itemSteelPlating, itemLastResort, itemGogglesModule,
itemWingpackModule, itemFreezeBoots, itemSuperFreezeBoots, itemAutofeeder;
public static Item itemAqualung, itemPistonPlating, itemTank, itemWatchDisplay, itemClimbingSpikes, itemLegBraces, itemSpringHeels, itemRollerSkates, itemParachute, itemFlippers, itemLifeVest, itemPistonBoots, itemSteelPlating, itemLastResort, itemGogglesModule, itemWingpackModule, itemFreezeBoots, itemSuperFreezeBoots, itemAutofeeder;
public static Item itemBoilingWaterBucket, itemBoilingMudBucket;
public static Item itemMoltenZincBucket, itemMoltenBrassBucket;
public static Item itemBrassGoggles, itemDivingHelmet, itemMonocle;
// Containers
@ -171,7 +168,7 @@ public class InitItems
public static Item itemRayGun, itemShrinkray;
public static Item itemRedwoodStick, itemWillowStick, itemMangroveStick, itemPetrifiedStick;
// Metals
public static Item itemResource, itemIngot, itemSheet, itemPowder, itemVanillaPowder, itemVanillaSheet, itemNugget;
public static Item itemResource, itemIngot, itemSheet, itemPowder, itemVanillaPowder, itemVanillaSheet, itemNugget, itemNuggetIron;
public static Item itemSlimeRubber;
public static Item itemSpanner, itemHammer, itemDrawplate, itemGrindstone, itemBugHammer;
@ -196,14 +193,12 @@ public class InitItems
public static Item itemEmptyMobBottle, itemMobBottle;
/* Init */
public static void init()
{
public static void init() {
InitMaterials.initializeMaterials();
initializeItems();
}
private static void initializeItems()
{
private static void initializeItems() {
initializeArmor();
initializeGuns();
initializeMetals();
@ -212,8 +207,7 @@ public class InitItems
initializeTools();
}
private static void initializeArmor()
{
private static void initializeArmor() {
// Jetpacks
itemSteamJetpack = new ItemSteamJetpack(InitMaterials.ARMOR_STEAM, 0, 1, (byte) 5).setUnlocalizedName("itemSteamJetpack");
itemClockworkWings = new ItemClockworkWings(InitMaterials.ARMOR_STEAM, 0, 1).setUnlocalizedName("itemClockworkWings");
@ -248,8 +242,7 @@ public class InitItems
RegistryHelper.registerArmorSet(helmetWhalebone, chestplateWhalebone, legsWhalebone, bootsWhalebone, "Whalebone", ModInfo.ID);
}
private static void initializeGuns()
{
private static void initializeGuns() {
// Ammo
itemMusketBall = new BaseItem().setUnlocalizedName("itemMusketBall");
itemRifleBullet = new BaseItem().setUnlocalizedName("itemRifleBullet");
@ -260,24 +253,15 @@ public class InitItems
registerItem(itemPercussionCap, "ItemPercussionCap");
// Guns
flintlockMusket = new ItemFirearm(5, 60, itemMusketBall, null, "steamcraft:musket", "steamcraft:reload")
.setUnlocalizedName("itemFlintlockMusket");
matchlockMusket = new ItemFirearm(6, 40, itemMusketBall, itemMatch, "steamcraft:musket", "steamcraft:reload")
.setUnlocalizedName("itemMatchlockMusket");
percussionCapMusket = new ItemFirearm(7, 20, itemMusketBall, itemPercussionCap, "steamcraft:musket", "steamcraft:reload")
.setUnlocalizedName("itemPercussionMusket");
flintlockRifle = new ItemFirearm(8, 60, itemRifleBullet, null, "steamcraft:rifle", "steamcraft:reload")
.setUnlocalizedName("itemFlintlockRifle");
matchlockRifle = new ItemFirearm(9, 40, itemRifleBullet, itemMatch, "steamcraft:rifle", "steamcraft:reload")
.setUnlocalizedName("itemMatchlockRifle");
percussionCapRifle = new ItemFirearm(10, 20, itemRifleBullet, itemPercussionCap, "steamcraft:rifle", "steamcraft:reload")
.setUnlocalizedName("itemPercussionRifle");
flintlockPistol = new ItemFirearm(3, 40, itemMusketBall, null, "steamcraft:Pistol", "steamcraft:reload")
.setUnlocalizedName("itemFlintlockPistol");
matchlockPistol = new ItemFirearm(3, 30, itemMusketBall, itemMatch, "steamcraft:pistol", "steamcraft:reload")
.setUnlocalizedName("itemMatchlockPistol");
percussionCapPistol = new ItemFirearm(3, 20, itemMusketBall, itemPercussionCap, "steamcraft:pistol", "steamcraft:reload")
.setUnlocalizedName("itemPercussionPistol");
flintlockMusket = new ItemFirearm(5, 60, itemMusketBall, null, "steamcraft:musket", "steamcraft:reload").setUnlocalizedName("itemFlintlockMusket");
matchlockMusket = new ItemFirearm(6, 40, itemMusketBall, itemMatch, "steamcraft:musket", "steamcraft:reload").setUnlocalizedName("itemMatchlockMusket");
percussionCapMusket = new ItemFirearm(7, 20, itemMusketBall, itemPercussionCap, "steamcraft:musket", "steamcraft:reload").setUnlocalizedName("itemPercussionMusket");
flintlockRifle = new ItemFirearm(8, 60, itemRifleBullet, null, "steamcraft:rifle", "steamcraft:reload").setUnlocalizedName("itemFlintlockRifle");
matchlockRifle = new ItemFirearm(9, 40, itemRifleBullet, itemMatch, "steamcraft:rifle", "steamcraft:reload").setUnlocalizedName("itemMatchlockRifle");
percussionCapRifle = new ItemFirearm(10, 20, itemRifleBullet, itemPercussionCap, "steamcraft:rifle", "steamcraft:reload").setUnlocalizedName("itemPercussionRifle");
flintlockPistol = new ItemFirearm(3, 40, itemMusketBall, null, "steamcraft:Pistol", "steamcraft:reload").setUnlocalizedName("itemFlintlockPistol");
matchlockPistol = new ItemFirearm(3, 30, itemMusketBall, itemMatch, "steamcraft:pistol", "steamcraft:reload").setUnlocalizedName("itemMatchlockPistol");
percussionCapPistol = new ItemFirearm(3, 20, itemMusketBall, itemPercussionCap, "steamcraft:pistol", "steamcraft:reload").setUnlocalizedName("itemPercussionPistol");
registerItem(flintlockMusket, "ItemFlintlockMusket");
registerItem(matchlockMusket, "ItemMatchlockMusket");
@ -303,10 +287,10 @@ public class InitItems
registerItem(itemClockworkRocketLauncher, "ItemClockworkRocketLauncher");
}
private static void initializeMetals()
{
private static void initializeMetals() {
itemIngot = new ItemIngot().setUnlocalizedName("itemIngot");
itemNugget = new ItemNugget().setUnlocalizedName("itemNugget");
itemNuggetIron = new ItemNuggetIron().setUnlocalizedName("itemNuggetIron");
itemSheet = new ItemSheet().setUnlocalizedName("itemSheet");
itemPowder = new ItemPowder().setUnlocalizedName("itemPowder");
itemVanillaPowder = new ItemVanillaPowder().setUnlocalizedName("itemVanillaPowder");
@ -314,6 +298,7 @@ public class InitItems
registerItem(itemIngot, "ItemIngot");
registerItem(itemNugget, "ItemMetalNugget");
registerItem(itemNuggetIron, "ItemIronNugget");
registerItem(itemSheet, "ItemMetalSheet");
registerItem(itemPowder, "ItemMetalPowder");
registerItem(itemVanillaPowder, "ItemVanillaMetalPowder");
@ -330,8 +315,7 @@ public class InitItems
registerItem(itemSteelParts, "ItemSteelParts");
}
public static void initializeModCompatItems()
{
public static void initializeModCompatItems() {
/**
* Registration of these are handled in @link={CompatibilityLayer.class}
*/
@ -340,18 +324,15 @@ public class InitItems
itemThaumicMonocle = new ItemThaumicMonocle().setUnlocalizedName("itemThaumicMonocle");
}
private static void initializeOthers()
{
private static void initializeOthers() {
// Containers
itemCanisterSteam = new ItemCanister(10000, 20).setUnlocalizedName("itemCanisterSteam");
registerItem(itemCanisterSteam, "ItemCanisterSteam");
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("steam"), 10000),
((ItemCanister) itemCanisterSteam).getFilledCanister(), new ItemStack(itemCanisterSteam));
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("steam"), 10000), ((ItemCanister) itemCanisterSteam).getFilledCanister(), new ItemStack(itemCanisterSteam));
itemReinforcedCanisterSteam = new ItemCanister(20000, 40).setUnlocalizedName("itemReinforcedCanisterSteam");
registerItem(itemReinforcedCanisterSteam, "ItemReinforcedCanisterSteam");
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("steam"), 20000),
((ItemCanister) itemReinforcedCanisterSteam).getFilledCanister(), new ItemStack(itemReinforcedCanisterSteam));
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("steam"), 20000), ((ItemCanister) itemReinforcedCanisterSteam).getFilledCanister(), new ItemStack(itemReinforcedCanisterSteam));
itemElectricJarSmall = new ElectricItem(80, 80, 40).setUnlocalizedName("itemElectricJarSmall");
itemElectricJarMedium = new ElectricItem(400, 400, 125).setUnlocalizedName("itemElectricJarMedium");
@ -481,9 +462,7 @@ public class InitItems
// TODO Add a version system to allow updates. Check version on right
// click
itemLoreBook = new ItemLoreBook(StatCollector.translateToLocal("lore.steamcraft2.0.author"),
StatCollector.translateToLocal("lore.steamcraft2.0.title"),
new String[] { StatCollector.translateToLocal("lore.steamcraft2.0.page1") }).setUnlocalizedName("itemLoreBook");
itemLoreBook = new ItemLoreBook(StatCollector.translateToLocal("lore.steamcraft2.0.author"), StatCollector.translateToLocal("lore.steamcraft2.0.title"), new String[] { StatCollector.translateToLocal("lore.steamcraft2.0.page1") }).setUnlocalizedName("itemLoreBook");
registerItem(itemLoreBook, "ItemLoreBook");
itemFieldManipulator = new ItemFieldManipulator().setUnlocalizedName("itemFieldManipulator");
@ -502,18 +481,23 @@ public class InitItems
itemBoilingWaterBucket = new ItemCustomBucket(FluidRegistry.getFluid("boilingwater").getBlock()).setUnlocalizedName("itemBoilingWaterBucket");
itemBoilingMudBucket = new ItemCustomBucket(FluidRegistry.getFluid("boilingmud").getBlock()).setUnlocalizedName("itemMudBucket");
itemWhaleOilBucket = new ItemCustomBucket(FluidRegistry.getFluid("whaleoil").getBlock()).setUnlocalizedName("itemWhaleOilBucket");
itemMoltenZincBucket = new ItemCustomBucket(FluidRegistry.getFluid("moltenzinc").getBlock()).setUnlocalizedName("itemMoltenZincBucket");
itemMoltenBrassBucket = new ItemCustomBucket(FluidRegistry.getFluid("moltenbrass").getBlock()).setUnlocalizedName("itemMoltenBrassBucket");
GameRegistry.registerItem(itemBoilingWaterBucket, "ItemBoilingWaterBucket");
GameRegistry.registerItem(itemBoilingMudBucket, "ItemBoilingBucket");
GameRegistry.registerItem(itemBoilingMudBucket, "ItemBoilingMudBucket");
GameRegistry.registerItem(itemWhaleOilBucket, "ItemWhaleOilBucket");
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("boilingwater", FluidContainerRegistry.BUCKET_VOLUME),
new ItemStack(itemBoilingWaterBucket), new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("boilingmud", FluidContainerRegistry.BUCKET_VOLUME),
new ItemStack(itemBoilingMudBucket), new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("whaleoil", FluidContainerRegistry.BUCKET_VOLUME),
new ItemStack(itemWhaleOilBucket), new ItemStack(Items.bucket));
GameRegistry.registerItem(itemMoltenZincBucket, "ItemMoltenZincBucket");
GameRegistry.registerItem(itemMoltenBrassBucket, "ItemMoltenBrassBucket");
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("boilingwater", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(itemBoilingWaterBucket), new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("boilingmud", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(itemBoilingMudBucket), new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("whaleoil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(itemWhaleOilBucket), new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("moltenzinc", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(itemMoltenZincBucket), new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("moltenbrass", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(itemMoltenBrassBucket), new ItemStack(Items.bucket));
BucketHandler.getInstance().bucketMap.put(InitBlocks.blockBoilingWater, itemBoilingWaterBucket);
BucketHandler.getInstance().bucketMap.put(InitBlocks.blockBoilingMud, itemBoilingMudBucket);
BucketHandler.getInstance().bucketMap.put(InitBlocks.blockWhaleOil, itemWhaleOilBucket);
BucketHandler.getInstance().bucketMap.put(InitBlocks.blockMoltenZinc, itemMoltenZincBucket);
BucketHandler.getInstance().bucketMap.put(InitBlocks.blockMoltenBrass, itemMoltenBrassBucket);
MinecraftForge.EVENT_BUS.register(BucketHandler.getInstance());
itemWhalebone = new BaseItem().setUnlocalizedName("itemWhalebone");
@ -550,8 +534,7 @@ public class InitItems
// registerItem(itemMobBottle, "ItemMobBottle");
}
private static void initializeTools()
{
private static void initializeTools() {
// Drills
drillCore = new BaseItem().setUnlocalizedName("itemDrillCore");
drillBase = new BaseItem().setUnlocalizedName("itemDrillBase");
@ -586,8 +569,7 @@ public class InitItems
registerItem(itemElectricSword, "ItemElectricSword");
}
private static void registerItem(Item item, String name)
{
private static void registerItem(Item item, String name) {
// TODO if(ConfigGeneral.nameBlacklist != null &&
// !ConfigGeneral.nameBlacklist.contains(item.getUnlocalizedName()))
GameRegistry.registerItem(item, name, ModInfo.ID);

View File

@ -15,7 +15,6 @@ package steamcraft.common.init;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;
import steamcraft.common.packets.CopperPipeFluidPacket;
import steamcraft.common.packets.CopperPipeFluidPacket.FluidNetworkPacketHandler;
import steamcraft.common.packets.CopperPipePacket;
@ -28,6 +27,8 @@ import steamcraft.common.packets.TimeBombPacket;
import steamcraft.common.packets.TimeBombPacket.TimeBombPacketHandler;
import steamcraft.common.packets.UpdateClientsideInventoryPacket;
import steamcraft.common.packets.UpdateClientsideInventoryPacket.UpdateClientsideInventoryPacketHandler;
import steamcraft.common.packets.UpdateExtractionPacket;
import steamcraft.common.packets.UpdateExtractionPacket.UpdateExtractionPacketHandler;
import steamcraft.common.packets.WirePacket;
import steamcraft.common.packets.WirePacket.WirePacketHandler;
@ -47,6 +48,7 @@ public class InitPackets
network.registerMessage(TimeBombPacketHandler.class, TimeBombPacket.class, packetId++, Side.SERVER);
network.registerMessage(OpenContainerFromClientPacketHandler.class, OpenContainerFromClientPacket.class, packetId++, Side.SERVER);
network.registerMessage(UpdateExtractionPacketHandler.class, UpdateExtractionPacket.class, packetId++, Side.SERVER);
network.registerMessage(CopperPipePacketHandler.class, CopperPipePacket.class, packetId++, Side.CLIENT);
network.registerMessage(FluidNetworkPacketHandler.class, CopperPipeFluidPacket.class, packetId++, Side.CLIENT);

View File

@ -14,19 +14,16 @@ package steamcraft.common.init;
import java.util.ArrayList;
import boilerplate.common.utils.recipe.RecipeUtils;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import boilerplate.common.utils.recipe.RecipeUtils;
import steamcraft.common.config.ConfigBalance;
import steamcraft.common.config.ConfigGeneral;
import steamcraft.common.lib.LibInfo;
@ -35,16 +32,13 @@ import steamcraft.common.lib.LibInfo;
* @author Surseance
*
*/
public class InitRecipes
{
public static void init()
{
public class InitRecipes {
public static void init() {
initializeCraftingRecipes();
initializeSmeltingRecipes();
}
private static void initializeCraftingRecipes()
{
private static void initializeCraftingRecipes() {
initMetalsRecipes();
initToolsRecipes();
initGunRecipes();
@ -54,8 +48,7 @@ public class InitRecipes
initOtherRecipes();
}
private static void initGunRecipes()
{
private static void initGunRecipes() {
// Gun Parts
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 0), "WWW", " WW", 'W', "plankWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 1), "III", " ", "III", 'I', "ingotIron"));
@ -63,68 +56,54 @@ public class InitRecipes
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 3), " I", " II", 'I', "ingotIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 4), "III", " II", 'I', "ingotBrass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 5), " II", " II", " I", 'I', "ingotCastIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 6), "IGI", "GSG", "IGI", 'I', "plateBrass", 'G',
Blocks.glass_pane, 'S', "gemEmerald"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 7), "IGI", "GSG", "IGI", 'I', "plateBrass", 'G',
"paneGlass", 'S', "gemDiamond"));
GameRegistry.addRecipe(new ItemStack(InitItems.itemGunPart, 1, 8), "SSS", "SJS", "SSS", 'J', InitItems.itemElectricJarSmall, 'S',
Blocks.obsidian);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 6), "IGI", "GSG", "IGI", 'I', "plateBrass", 'G', Blocks.glass_pane, 'S', "gemEmerald"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 7), "IGI", "GSG", "IGI", 'I', "plateBrass", 'G', "paneGlass", 'S', "gemDiamond"));
GameRegistry.addRecipe(new ItemStack(InitItems.itemGunPart, 1, 8), "SSS", "SJS", "SSS", 'J', InitItems.itemElectricJarSmall, 'S', Blocks.obsidian);
if (!ConfigBalance.cheaperCoreRecipe)
GameRegistry.addRecipe(new ItemStack(InitItems.itemGunPart, 1, 9), "SPS", "PNP", "SPS", 'S', Blocks.obsidian, 'P',
new ItemStack(InitItems.itemGunPart, 1, 8), 'N', Items.nether_star);
GameRegistry.addRecipe(new ItemStack(InitItems.itemGunPart, 1, 9), "SPS", "PNP", "SPS", 'S', Blocks.obsidian, 'P', new ItemStack(InitItems.itemGunPart, 1, 8), 'N', Items.nether_star);
else
GameRegistry.addRecipe(new ItemStack(InitItems.itemGunPart, 1, 9), "SPS", "PNP", "SPS", 'S', Blocks.obsidian, 'P',
new ItemStack(InitItems.itemGunPart, 1, 8), 'N', Items.nether_star);
GameRegistry.addRecipe(new ItemStack(InitItems.itemGunPart, 1, 9), "SPS", "PNP", "SPS", 'S', Blocks.obsidian, 'P', new ItemStack(InitItems.itemGunPart, 1, 8), 'N', Items.nether_star);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 10), " II", " ", " II", 'I', "ingotIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGunPart, 1, 11), " WW", " W", 'W', "plankWood"));
// Actual Guns
GameRegistry.addRecipe(new ItemStack(InitItems.flintlockMusket), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B',
new ItemStack(InitItems.itemGunPart, 1, 1), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', Items.flint);
GameRegistry.addRecipe(new ItemStack(InitItems.matchlockMusket), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B',
new ItemStack(InitItems.itemGunPart, 1, 1), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemMatch);
GameRegistry.addRecipe(new ItemStack(InitItems.percussionCapMusket), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0),
'B', new ItemStack(InitItems.itemGunPart, 1, 1), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemPercussionCap);
GameRegistry.addRecipe(new ItemStack(InitItems.flintlockRifle), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B',
new ItemStack(InitItems.itemGunPart, 1, 2), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', Items.flint);
GameRegistry.addRecipe(new ItemStack(InitItems.matchlockRifle), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B',
new ItemStack(InitItems.itemGunPart, 1, 2), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemMatch);
GameRegistry.addRecipe(new ItemStack(InitItems.percussionCapRifle), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B',
new ItemStack(InitItems.itemGunPart, 1, 2), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemPercussionCap);
GameRegistry.addRecipe(new ItemStack(InitItems.flintlockPistol), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 11), 'B',
new ItemStack(InitItems.itemGunPart, 1, 10), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', Items.flint);
GameRegistry.addRecipe(new ItemStack(InitItems.matchlockPistol), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 11), 'B',
new ItemStack(InitItems.itemGunPart, 1, 10), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemMatch);
GameRegistry.addRecipe(new ItemStack(InitItems.percussionCapPistol), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 11),
'B', new ItemStack(InitItems.itemGunPart, 1, 10), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemPercussionCap);
GameRegistry.addRecipe(new ItemStack(InitItems.flintlockMusket), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B', new ItemStack(InitItems.itemGunPart, 1, 1), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', Items.flint);
GameRegistry.addRecipe(new ItemStack(InitItems.matchlockMusket), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B', new ItemStack(InitItems.itemGunPart, 1, 1), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemMatch);
GameRegistry.addRecipe(new ItemStack(InitItems.percussionCapMusket), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B', new ItemStack(InitItems.itemGunPart, 1, 1), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemPercussionCap);
GameRegistry.addRecipe(new ItemStack(InitItems.flintlockRifle), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B', new ItemStack(InitItems.itemGunPart, 1, 2), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', Items.flint);
GameRegistry.addRecipe(new ItemStack(InitItems.matchlockRifle), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B', new ItemStack(InitItems.itemGunPart, 1, 2), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemMatch);
GameRegistry.addRecipe(new ItemStack(InitItems.percussionCapRifle), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 0), 'B', new ItemStack(InitItems.itemGunPart, 1, 2), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemPercussionCap);
GameRegistry.addRecipe(new ItemStack(InitItems.flintlockPistol), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 11), 'B', new ItemStack(InitItems.itemGunPart, 1, 10), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', Items.flint);
GameRegistry.addRecipe(new ItemStack(InitItems.matchlockPistol), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 11), 'B', new ItemStack(InitItems.itemGunPart, 1, 10), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemMatch);
GameRegistry.addRecipe(new ItemStack(InitItems.percussionCapPistol), " FL", " B ", " S ", 'S', new ItemStack(InitItems.itemGunPart, 1, 11), 'B', new ItemStack(InitItems.itemGunPart, 1, 10), 'L', new ItemStack(InitItems.itemGunPart, 1, 3), 'F', InitItems.itemPercussionCap);
// Ammo
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMusketBall, 4), "II", "II", 'I', "ingotIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRifleBullet, 4), " S ", " C ", " G ", 'S', "ingotSteel", 'C',
"plateBrass", 'G', Items.gunpowder));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMusketBall, 4), "II", "II", 'I', "nuggetIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRifleBullet, 4), " S ", " C ", " G ", 'S', "nuggetSteel", 'C', "plateBrass", 'G', Items.gunpowder));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPercussionCap), "GG", "II", 'I', "ingotBrass", 'G', Items.gunpowder));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRocket, 1, 0), " I ", "PTP", "PTP", 'I', "ingotIron", 'P',
"plateBrass", 'T', Blocks.tnt));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRocket, 1, 1), " F ", "PTP", "PTP", 'F', Items.flint_and_steel, 'P',
"plateBrass", 'T', Blocks.tnt));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRocket, 1, 2), " U ", "PTP", "PTP", 'U', "ingotUranium", 'P',
"plateBrass", 'T', Blocks.tnt));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRocket, 1, 0), " I ", "PTP", "PTP", 'I', "ingotIron", 'P', "plateBrass", 'T', Blocks.tnt));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRocket, 1, 1), " F ", "PTP", "PTP", 'F', Items.flint_and_steel, 'P', "plateBrass", 'T', Blocks.tnt));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRocket, 1, 2), " U ", "PTP", "PTP", 'U', "ingotUranium", 'P', "plateBrass", 'T', Blocks.tnt));
// Other Guns
GameRegistry.addRecipe(new ItemStack(InitItems.itemRayGun), "FSP", 'F', new ItemStack(InitItems.itemGunPart, 1, 6), 'S',
new ItemStack(InitItems.itemGunPart, 1, 4), 'P', new ItemStack(InitItems.itemGunPart, 1, 8));
GameRegistry.addRecipe(new ItemStack(InitItems.itemShrinkray), "FSP", 'F', new ItemStack(InitItems.itemGunPart, 1, 7), 'S',
new ItemStack(InitItems.itemGunPart, 1, 5), 'P', new ItemStack(InitItems.itemGunPart, 1, 9));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemClockworkRocketLauncher), "CCC", " S", "CCC", 'C', "plateCastIron",
'S', new ItemStack(InitItems.itemGunPart, 1, 5)));
GameRegistry.addRecipe(new ItemStack(InitItems.itemRayGun), "FSP", 'F', new ItemStack(InitItems.itemGunPart, 1, 6), 'S', new ItemStack(InitItems.itemGunPart, 1, 4), 'P', new ItemStack(InitItems.itemGunPart, 1, 8));
GameRegistry.addRecipe(new ItemStack(InitItems.itemShrinkray), "FSP", 'F', new ItemStack(InitItems.itemGunPart, 1, 7), 'S', new ItemStack(InitItems.itemGunPart, 1, 5), 'P', new ItemStack(InitItems.itemGunPart, 1, 9));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemClockworkRocketLauncher), "CCC", " S", "CCC", 'C', "plateCastIron", 'S', new ItemStack(InitItems.itemGunPart, 1, 5)));
}
private static void initMetalsRecipes()
{
private static void initMetalsRecipes() {
// Metal recipes and hammering ingots to plates
for (int meta = 0; meta < 8; meta++)
{
for (int meta = 0; meta < 8; meta++) {
RecipeUtils.addMetalRecipes(InitBlocks.blockMetal, InitItems.itemIngot, InitItems.itemNugget, meta);
GameRegistry
.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemSheet, 1, meta), "ingot" + LibInfo.metals[meta], "craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemNuggetIron, 9), "ingotIron"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemSheet, 1, meta), "ingot" + LibInfo.metals[meta], "craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockMossyMetal, 1, meta), "block" + LibInfo.metals[meta], Blocks.vine));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockRustyMetal, 1, meta), "block" + LibInfo.metals[meta], Items.water_bucket));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockMetal, 1, meta), new ItemStack(InitBlocks.blockMossyMetal, 1, meta), Blocks.sand));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockMetal, 1, meta), new ItemStack(InitBlocks.blockRustyMetal, 1, meta), Blocks.sand));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMetalPlate, 16, meta), "XX", 'X', "block" + LibInfo.metals[meta]));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockMetal, 2, meta), new ItemStack(InitBlocks.blockMetalPlate, 1, meta)));
}
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaSheet, 1, 0), "ingotIron", "craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaSheet, 1, 1), "ingotGold", "craftingHammer"));
@ -133,146 +112,96 @@ public class InitRecipes
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaSheet, 1, 1), "ingotGold", "craftingHammer"));
// Our Dusts
for (int meta = 0; meta < 4; meta++)
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, ConfigBalance.numberOfDustsFromOre, meta),
"ore" + LibInfo.metals[meta], "craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, ConfigBalance.numberOfDustsFromOre, meta), "ore" + LibInfo.metals[meta], "craftingHammer"));
// Vanilla Dusts
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromOre, 0), "oreIron",
"craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromOre, 1), "oreGold",
"craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromOre, 0), "oreIron", "craftingHammer"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromOre, 1), "oreGold", "craftingHammer"));
// Plates/Ingots back to dust
for (int meta = 0; meta < 8; meta++)
{
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, ConfigBalance.numberOfDustsFromMetal, meta),
"ingot" + LibInfo.metals[meta], new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, ConfigBalance.numberOfDustsFromMetal, meta),
"plate" + LibInfo.metals[meta], new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
for (int meta = 0; meta < 8; meta++) {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, ConfigBalance.numberOfDustsFromMetal, meta), "ingot" + LibInfo.metals[meta], new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, ConfigBalance.numberOfDustsFromMetal, meta), "plate" + LibInfo.metals[meta], new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
}
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 0),
"ingotIron", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 1),
"ingotGold", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 0),
"plateIron", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 1),
"plateGold", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 0), "ingotIron", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 1), "ingotGold", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 0), "plateIron", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVanillaPowder, ConfigBalance.numberOfDustsFromMetal, 1), "plateGold", new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
String[] oredictMetals = ConfigGeneral.oredictMetals;
for (String oredictMetal : oredictMetals)
{
if (OreDictionary.doesOreNameExist("dust" + oredictMetal))
{
for (String oredictMetal : oredictMetals) {
if (OreDictionary.doesOreNameExist("dust" + oredictMetal)) {
ItemStack stack = null;
ArrayList<ItemStack> list = OreDictionary.getOres("dust" + oredictMetal);
if (list.size() > 0)
stack = list.get(0);
if ((stack != null) && (stack.getItem() != null))
{
if (OreDictionary.doesOreNameExist("ingot" + oredictMetal))
{
GameRegistry.addRecipe(
new ShapelessOreRecipe(new ItemStack(stack.getItem(), ConfigBalance.numberOfDustsFromMetal, stack.getItemDamage()),
"ingot" + oredictMetal, new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
if ((stack != null) && (stack.getItem() != null)) {
if (OreDictionary.doesOreNameExist("ingot" + oredictMetal)) {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(stack.getItem(), ConfigBalance.numberOfDustsFromMetal, stack.getItemDamage()), "ingot" + oredictMetal, new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
}
if (OreDictionary.doesOreNameExist("plate" + oredictMetal))
{
GameRegistry.addRecipe(
new ShapelessOreRecipe(new ItemStack(stack.getItem(), ConfigBalance.numberOfDustsFromMetal, stack.getItemDamage()),
"plate" + oredictMetal, new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
if (OreDictionary.doesOreNameExist("plate" + oredictMetal)) {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(stack.getItem(), ConfigBalance.numberOfDustsFromMetal, stack.getItemDamage()), "plate" + oredictMetal, new ItemStack(InitItems.itemGrindstone, 1, OreDictionary.WILDCARD_VALUE)));
}
}
}
}
}
private static void initToolsRecipes()
{
private static void initToolsRecipes() {
// Drills
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.drillBase), " ", "IGI", "III", 'I', "ingotSteel", 'G', "gearSteel"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.drillCore), " D ", "DDD", " B ", 'B', InitItems.drillBase, 'D', "ingotAluminum"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.drillCore), " D ", "DDD", " B ", 'B', InitItems.drillBase, 'D', "ingotAluminum"));
String[] drillMaterials = new String[] { "gemDiamond", "ingotGold", "ingotIron", "ingotBrass", "stone", "plankWood" };
Item[] drills = new Item[] { InitItems.drillDiamond, InitItems.drillGold, InitItems.drillIron, InitItems.drillSteam, InitItems.drillStone,
InitItems.drillWood };
Item[] drills = new Item[] { InitItems.drillDiamond, InitItems.drillGold, InitItems.drillIron, InitItems.drillSteam, InitItems.drillStone, InitItems.drillWood };
for (int i = 0; i < drillMaterials.length; i++)
GameRegistry
.addRecipe(new ShapedOreRecipe(new ItemStack(drills[i]), " M ", "MMM", " C ", 'C', InitItems.drillCore, 'M', drillMaterials[i]));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(drills[i]), " M ", "MMM", " C ", 'C', InitItems.drillCore, 'M', drillMaterials[i]));
// Steam
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.swordSteam), "II ", "IP ", "CSC", 'I', "plateSteel", 'P', "ingotBrass",
'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.pickaxeSteam), "IPI", "CSC", " I ", 'R', "partCastIronRod", 'P',
"ingotBrass", 'I', "ingotSteel", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.shovelSteam), "CPC", " S ", " R ", 'R', "partCastIronRod", 'P',
"ingotBrass", 'I', "ingotSteel", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.axeSteam), "PIC", "PRC", " R ", 'R', "partCastIronRod", 'P', "ingotBrass",
'I', "ingotSteel", 'S', "stickWood", 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.hoeSteam), "PIC", " S ", " R ", 'R', "partCastIronRod", 'P', "ingotBrass",
'I', "ingotSteel", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.swordSteam), "II ", "IP ", "CSC", 'I', "plateSteel", 'P', "ingotBrass", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.pickaxeSteam), "IPI", "CSC", " I ", 'R', "partCastIronRod", 'P', "ingotBrass", 'I', "ingotSteel", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.shovelSteam), "CPC", " S ", " R ", 'R', "partCastIronRod", 'P', "ingotBrass", 'I', "ingotSteel", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.axeSteam), "PIC", "PRC", " R ", 'R', "partCastIronRod", 'P', "ingotBrass", 'I', "ingotSteel", 'S', "stickWood", 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.hoeSteam), "PIC", " S ", " R ", 'R', "partCastIronRod", 'P', "ingotBrass", 'I', "ingotSteel", 'S', Items.stick, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpanner), "P P", " P ", " P ", 'P', "plateBronze"));
}
private static void initArmorRecipes()
{
private static void initArmorRecipes() {
// Brass
RecipeUtils.addArmorSet(new ItemStack(InitItems.itemSheet, 1, 4), new ItemStack[] { new ItemStack(InitItems.helmetBrass),
new ItemStack(InitItems.chestplateBrass), new ItemStack(InitItems.legsBrass), new ItemStack(InitItems.bootsBrass) });
RecipeUtils.addArmorSet(new ItemStack(InitItems.itemSheet, 1, 4), new ItemStack[] { new ItemStack(InitItems.helmetBrass), new ItemStack(InitItems.chestplateBrass), new ItemStack(InitItems.legsBrass), new ItemStack(InitItems.bootsBrass) });
// Whalebone
RecipeUtils.addArmorSet(new ItemStack(InitItems.itemWhalebone), new ItemStack[] { new ItemStack(InitItems.helmetWhalebone),
new ItemStack(InitItems.chestplateWhalebone), new ItemStack(InitItems.legsWhalebone), new ItemStack(InitItems.bootsWhalebone) });
RecipeUtils.addArmorSet(new ItemStack(InitItems.itemWhalebone), new ItemStack[] { new ItemStack(InitItems.helmetWhalebone), new ItemStack(InitItems.chestplateWhalebone), new ItemStack(InitItems.legsWhalebone), new ItemStack(InitItems.bootsWhalebone) });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemClockworkWings), "BCB", "WCW", "W W", 'B',
new ItemStack(InitItems.itemIngot, 1, 4), 'C', "partClockworkMechanism", 'W', Blocks.wool));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteamJetpack), "CSC", "BSB", "B B", 'B',
new ItemStack(InitItems.itemIngot, 1, 4), 'S', new ItemStack(InitItems.itemIngot, 1, 6), 'C',
new ItemStack(InitItems.itemCanisterSteam, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteamWingpack), "LWL", "RBR", "SPS", 'P', InitItems.itemSteamJetpack,
'W', InitItems.itemClockworkWings, 'R', "partCastIronRod", 'B', new ItemStack(InitItems.itemGunPart, 1, 8), 'L', Items.leather, 'S',
Items.string));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemClockworkWings), "BCB", "WCW", "W W", 'B', new ItemStack(InitItems.itemIngot, 1, 4), 'C', "partClockworkMechanism", 'W', Blocks.wool));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteamJetpack), "CSC", "BSB", "B B", 'B', new ItemStack(InitItems.itemIngot, 1, 4), 'S', new ItemStack(InitItems.itemIngot, 1, 6), 'C', new ItemStack(InitItems.itemCanisterSteam, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteamWingpack), "LWL", "RBR", "SPS", 'P', InitItems.itemSteamJetpack, 'W', InitItems.itemClockworkWings, 'R', "partCastIronRod", 'B', new ItemStack(InitItems.itemGunPart, 1, 8), 'L', Items.leather, 'S', Items.string));
GameRegistry
.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBrassGoggles), "BBB", "GBG", "BBB", 'B', "ingotBrass", 'G', "paneGlass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMonocle), " B ", "BGB", " BS", 'B', "ingotBrass", 'G', "paneGlass",
'S', Items.string));
GameRegistry
.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDivingHelmet), "PPP", "PGP", "PPP", 'P', "plateBrass", 'G', "paneGlass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBrassGoggles), "BBB", "GBG", "BBB", 'B', "ingotBrass", 'G', "paneGlass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMonocle), " B ", "BGB", " BS", 'B', "ingotBrass", 'G', "paneGlass", 'S', Items.string));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDivingHelmet), "PPP", "PGP", "PPP", 'P', "plateBrass", 'G', "paneGlass"));
}
private static void initBlockRecipes()
{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteamBoiler), "PPP", "TCT", "PFP", 'F', Blocks.furnace, 'P',
"plateBrass", 'T', InitBlocks.blockCopperTank, 'C', InitBlocks.blockCopperPipe));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteamBoiler), "PPP", "TCT", "PFP", 'F', Blocks.furnace, 'P',
"plateSteel", 'T', InitBlocks.blockCopperTank, 'C', InitBlocks.blockCopperPipe));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockIntake), "PGP", "GBG", "PGP", 'G', "partGrating", 'P', "plateBrass",
'B', Items.bucket));
private static void initBlockRecipes() {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteamBoiler), "PPP", "TCT", "PFP", 'F', Blocks.furnace, 'P', "plateBrass", 'T', InitBlocks.blockCopperTank, 'C', InitBlocks.blockCopperPipe));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockNuclearBoiler), "PUP", "TCT", "PFP", 'F', Blocks.furnace, 'P', "plateBrass", 'T', InitBlocks.blockCopperTank, 'C', InitBlocks.blockCopperPipe, 'U', new ItemStack(InitItems.itemResource, 1, 3)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLiquidBoiler), "PBP", "TCT", "PFP", 'F', Blocks.furnace, 'P', "plateBrass", 'T', InitBlocks.blockCopperTank, 'C', InitBlocks.blockCopperPipe, 'B', Items.bucket));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRefinery), "PPP", "PTP", "FFF", 'F', Blocks.furnace, 'P', "plateBrass", 'T', InitBlocks.blockCopperTank, 'C', InitBlocks.blockCopperPipe));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockIntake), "PGP", "GBG", "PGP", 'G', "partGrating", 'P', "plateBrass", 'B', Items.bucket));
GameRegistry.addShapedRecipe(new ItemStack(InitBlocks.blockBloomery), "N N", "NFN", "NNN", 'F', Blocks.furnace, 'N', Blocks.nether_brick);
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperPipe, 2), "PPP", "GGG", "PPP", 'P', "plateCopper", 'G', "blockGlass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperPipe, 2), "PPP", "GGG", "PPP", 'P', "plateCopper", 'G', "blockGlass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteelPipe, 2), "PPP", "GGG", "PPP", 'P', "plateSteel", 'G', "blockGlass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperTank), "PPP", "P P", "PPP", 'P', "plateCopper"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBattery), "CCC", "WCW", "CCC", 'C', "ingotCastIron", 'W',
InitBlocks.blockCopperWire));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 9), "CRC", "CRC", "WAW", 'C', "plateSteel", 'W',
InitBlocks.blockCopperWire, 'R', new ItemStack(InitItems.itemMachinePart, 1, 8), 'A', new ItemStack(InitItems.itemResource, 1, 2)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCapacitor), "PPP", "CCC", "PPP", 'P', "plateSteel", 'C',
new ItemStack(InitItems.itemMachinePart, 1, 9)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTeslaCoil), "WRW", "WRW", "III", 'I', "ingotSteel", 'W',
"partWireCoil", 'R', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTurbine), "S S", "FGF", "SFS", 'S', "ingotIron", 'F', "partFan", 'G',
"partGenerator"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLightningRod), " R ", "CRC", "SSS", 'S', "ingotSteel", 'R',
"partCastIronRod", 'C', "plateCopper"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCharger), "PPP", "IWI", "PPP", 'I', "ingotSteel", 'P', "plateSteel",
'W', InitBlocks.blockCopperWire));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockArmorEditor), "PPP", "WWW", "PCP", 'W', Blocks.crafting_table, 'P',
"plateBrass", 'C', Blocks.chest));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBattery), "CCC", "WCW", "CCC", 'C', "ingotCastIron", 'W', InitBlocks.blockCopperWire));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 9), "CRC", "CRC", "WAW", 'C', "plateSteel", 'W', InitBlocks.blockCopperWire, 'R', new ItemStack(InitItems.itemMachinePart, 1, 8), 'A', new ItemStack(InitItems.itemResource, 1, 2)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCapacitor), "PPP", "CCC", "PPP", 'P', "plateSteel", 'C', new ItemStack(InitItems.itemMachinePart, 1, 9)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTeslaCoil), "WRW", "WRW", "III", 'I', "ingotSteel", 'W', "partWireCoil", 'R', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTurbine), "S S", "FGF", "SFS", 'S', "ingotIron", 'F', "partFan", 'G', "partGenerator"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLightningRod), " R ", "CRC", "SSS", 'S', "ingotSteel", 'R', "partCastIronRod", 'C', "plateCopper"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCharger), "PPP", "IWI", "PPP", 'I', "ingotSteel", 'P', "plateSteel", 'W', InitBlocks.blockCopperWire));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockArmorEditor), "PPP", "WWW", "PCP", 'W', Blocks.crafting_table, 'P', "plateBrass", 'C', Blocks.chest));
GameRegistry.addShapedRecipe(new ItemStack(InitBlocks.blockUranium), "UUU", "UUU", "UUU", 'U', new ItemStack(InitItems.itemResource, 1, 3));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCastIronFence, 12), "RRR", "RRR", 'R', "partCastIronRod"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitBlocks.blockCastIronGate), "RIR", "RIR", 'R', "partCastIronRod", 'I', "ingotCastIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCastIronGate), "RIR", "RIR", 'R', "partCastIronRod", 'I', "ingotCastIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCastIronRailing, 16), "III", "III", 'I', "ingotCastIron"));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockRedwoodPlanks, 4), new ItemStack(InitBlocks.blockRedwoodLog));
@ -300,36 +229,28 @@ public class InitRecipes
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockPetrifiedStairs, 4), "P ", "PP ", "PPP", 'P', InitBlocks.blockPetrifiedPlanks);
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockPetrifiedFence, 2), "SSS", "SSS", 'S', InitItems.itemPetrifiedStick);
GameRegistry.addShapedRecipe(new ItemStack(InitBlocks.blockPolishedPlanks, 8), "PPP", "PWP", "PPP", 'P', new ItemStack(Blocks.planks, 1, 0),
'W', new ItemStack(/* InitItems.itemWhaleOilBucket */Items.water_bucket));
GameRegistry.addShapedRecipe(new ItemStack(InitBlocks.blockPolishedPlanks, 8), "PPP", "PWP", "PPP", 'P', new ItemStack(Blocks.planks, 1, 0), 'W',
new ItemStack(/* InitItems.itemWhaleOilBucket */Items.water_bucket));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockPolishedPlanks, 1, 1), new ItemStack(InitBlocks.blockPolishedPlanks, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockPolishedPlanks, 1, 2), new ItemStack(InitBlocks.blockPolishedPlanks, 1, 1));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockPolishedPlanks, 1, 0), new ItemStack(InitBlocks.blockPolishedPlanks, 1, 2));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockStandardSiren, "CIC", "ISI", "CRC", 'S',
new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', "ingotIron", 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockNuclearSiren, "CIC", "ISI", "CRC", 'S',
new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', "ingotUranium", 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockAllClearSiren, "CIC", "ISI", "CRC", 'S',
new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', Blocks.wool, 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockIntruderSiren, "CIC", "ISI", "CRC", 'S',
new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', Items.gold_nugget, 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockStandardSiren, "CIC", "ISI", "CRC", 'S', new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', "ingotIron", 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockNuclearSiren, "CIC", "ISI", "CRC", 'S', new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', "ingotUranium", 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockAllClearSiren, "CIC", "ISI", "CRC", 'S', new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', Blocks.wool, 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockIntruderSiren, "CIC", "ISI", "CRC", 'S', new ItemStack(InitItems.itemMachinePart, 1, 7), 'I', Items.gold_nugget, 'C', "ingotCastIron", 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockStasisField, "PPP", "PCP", "PPP", 'P', "plateCastIron", 'C',
new ItemStack(InitItems.itemGunPart, 1, 8)));
GameRegistry.addRecipe(new ShapedOreRecipe(InitBlocks.blockStasisField, "PPP", "PCP", "PPP", 'P', "plateCastIron", 'C', new ItemStack(InitItems.itemGunPart, 1, 8)));
for (int i = 0; i < LibInfo.metals.length; i++)
{
for (int i = 0; i < LibInfo.metals.length; i++) {
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockMetal, 1, i), new ItemStack(InitBlocks.blockEngraved, 1, i));
}
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockUranium), new ItemStack(InitBlocks.blockEngraved, 1, 8));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockEtherium), new ItemStack(InitBlocks.blockEngraved, 1, 9));
Block[] unengravedV = { Blocks.diamond_block, Blocks.gold_block, Blocks.iron_block, Blocks.lapis_block, Blocks.stone };
for (int i = 0; i < unengravedV.length; i++)
{
for (int i = 0; i < unengravedV.length; i++) {
GameRegistry.addShapelessRecipe(new ItemStack(unengravedV[i]), new ItemStack(InitBlocks.blockEngravedVanilla, 1, i));
}
@ -340,41 +261,31 @@ public class InitRecipes
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockStoneslabWall, 6), "NNN", "NNN", 'N', new ItemStack(Blocks.stone_slab, 1, 0));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockBrickWall, 6), "NNN", "NNN", 'N', new ItemStack(Blocks.brick_block, 1, 0));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockSkyrail), " N ", "GGG", "R R", 'N', new ItemStack(Blocks.golden_rail, 1, 0), 'G',
Items.gold_ingot, 'R', Items.redstone);
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockSkyrail), " N ", "GGG", "R R", 'N', new ItemStack(Blocks.golden_rail, 1, 0), 'G', Items.gold_ingot, 'R', Items.redstone);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHatch), "PPP", " P ", "IBI", 'B', "blockSteel", 'I', "ingotSteel", 'P', "plateSteel"));
}
private static void initModuleRecipes()
{
private static void initModuleRecipes() {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemAqualung), "LLI", "L L", "LLL", 'L', Items.leather, 'I', "ingotIron"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.itemClimbingSpikes), " L ", "I I", 'L', Items.leather_boots, 'I', "ingotIron"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.itemTank), "GGG", "GWG", "GGG", 'G', Blocks.glass_pane, 'W', Items.water_bucket));
GameRegistry
.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFlippers), " B ", "L L", 'L', Items.leather, 'B', Items.leather_boots));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemClimbingSpikes), " L ", "I I", 'L', Items.leather_boots, 'I', "ingotIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTank), "GGG", "GWG", "GGG", 'G', Blocks.glass_pane, 'W', Items.water_bucket));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFlippers), " B ", "L L", 'L', Items.leather, 'B', Items.leather_boots));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLegBraces), "PPP", "P P", "P P", 'P', "plateCopper"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLifeVest), "W W", "WWW", "WWW", 'W', Blocks.wool));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemParachute), "WWW", "W W", "S S", 'W', Blocks.wool, 'S', Items.string));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPistonBoots), " ", "CBC", "P P", 'P', Blocks.piston, 'B',
Items.leather_boots, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPistonPlating), "RPR", "PCP", "RPR", 'C', Items.iron_chestplate, 'P',
Blocks.piston, 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRollerSkates), " ", " L ", "WRW", 'W', Blocks.log, 'L',
Items.leather_boots, 'R', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpringHeels), " ", " L ", "S S", 'S',
new ItemStack(InitItems.itemSteelParts, 1, 2), 'L', Items.leather_boots));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPistonBoots), " ", "CBC", "P P", 'P', Blocks.piston, 'B', Items.leather_boots, 'C', "partClockworkMechanism"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPistonPlating), "RPR", "PCP", "RPR", 'C', Items.iron_chestplate, 'P', Blocks.piston, 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemRollerSkates), " ", " L ", "WRW", 'W', Blocks.log, 'L', Items.leather_boots, 'R', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpringHeels), " ", " L ", "S S", 'S', new ItemStack(InitItems.itemSteelParts, 1, 2), 'L', Items.leather_boots));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteelPlating), "SSS", "SSS", "SSS", 'S', "plateSteel"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWatchDisplay), "GGG", "RCR", "III", 'I', "ingotIron", 'G', "paneGlass",
'R', Items.redstone, 'C', Items.clock));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWingpackModule),
new Object[] { "B B", " X ", "B B", 'X', InitItems.itemSteamWingpack, 'B', "plateBrass" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGogglesModule),
new Object[] { "BBB", " X ", "BBB", 'X', InitItems.itemBrassGoggles, 'B', "plateBrass" }));
// GameRegistry.addRecipe(new ShapedOreRecipe(new
// ItemStack(InitItems.itemLastResort), "TTT", "TCT", "TTT",
// 'T',
// Blocks.tnt, 'C', InitBlocks.blockCopperWire));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWatchDisplay), "GGG", "RCR", "III", 'I', "ingotIron", 'G', "paneGlass", 'R', Items.redstone, 'C', Items.clock));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWingpackModule), new Object[] { "B B", " X ", "B B", 'X', InitItems.itemSteamWingpack, 'B', "plateBrass" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGogglesModule), new Object[] { "BBB", " X ", "BBB", 'X', InitItems.itemBrassGoggles, 'B', "plateBrass" }));
// GameRegistry.addRecipe(new ShapedOreRecipe(new
// ItemStack(InitItems.itemLastResort), "TTT", "TCT", "TTT",
// 'T',
// Blocks.tnt, 'C', InitBlocks.blockCopperWire));
// GameRegistry.addShapedRecipe(new ItemStack(InitBlocks.blockTimeBomb),
// new Object[] { " W ", "PTP", " P ", 'W', InitItems.itemWatch, 'P',
@ -383,123 +294,84 @@ public class InitRecipes
}
private static void initOtherRecipes()
{
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemResource, 1, 2), new ItemStack(Items.potionitem),
new ItemStack(InitItems.itemResource, 1, 0), new ItemStack(InitItems.itemResource, 1, 0));
private static void initOtherRecipes() {
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemResource, 1, 2), new ItemStack(Items.potionitem), new ItemStack(InitItems.itemResource, 1, 0), new ItemStack(InitItems.itemResource, 1, 0));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.itemSteelParts, 1, 0), " P ", "PIP", " P ", 'P', "plateSteel", 'I', "ingotSteel"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteelParts, 1, 0), " P ", "PIP", " P ", 'P', "plateSteel", 'I', "ingotSteel"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteelParts, 1, 1), " P ", "P P", " P ", 'P', "plateSteel"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.itemSteelParts, 1, 2), "PPP", " I ", "PPP", 'P', "plateSteel", 'I', "ingotSteel"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.itemIronParts, 1, 0), " P ", "PIP", " P ", 'I', "ingotIron", 'P', "plateIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSteelParts, 1, 2), "PPP", " I ", "PPP", 'P', "plateSteel", 'I', "ingotSteel"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemIronParts, 1, 0), " P ", "PIP", " P ", 'I', "ingotIron", 'P', "plateIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemIronParts, 1, 1), " P ", "P P", " P ", 'P', "plateIron"));
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 0), " X ", "X ", 'X', new ItemStack(InitItems.itemIngot, 1, 7)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 1), "CPC", "G G", "CPC", 'P',
new ItemStack(InitItems.itemSheet, 1, 4), 'G', "gearIron", 'C', new ItemStack(InitItems.itemMachinePart, 1, 0)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 0), " X ", "X ", 'X', new ItemStack(InitItems.itemIngot, 1, 7)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 1), "CPC", "G G", "CPC", 'P', new ItemStack(InitItems.itemSheet, 1, 4), 'G', "gearIron", 'C', new ItemStack(InitItems.itemMachinePart, 1, 0)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 2), "P P", " P ", "P P", 'P', "plateIron"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 3), new ItemStack(Items.water_bucket), "ingotIron",
"ingotCopper", "ingotZinc"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 3), new ItemStack(Items.water_bucket), "ingotIron", "ingotCopper", "ingotZinc"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMachinePart, 2, 3), "partMagnet", "ingotIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 4), "PRP", "MWM", "PRP", 'P', "plateIron", 'W',
"partWireCoil", 'M', "partMagnet", 'R', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 4), "PRP", "MWM", "PRP", 'P', "plateIron", 'W', "partWireCoil", 'M', "partMagnet", 'R', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 5), " P ", "PPP", " P ", 'P', "plateIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 6), " W ", "WSW", " W ", 'S', "partCastIronRod", 'W',
new ItemStack(InitBlocks.blockCopperWire)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 7), "L L", " L ", "MCM", 'M', "partMagnet", 'C',
new ItemStack(InitBlocks.blockCopperWire), 'L', Items.leather));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 8), "XRX", 'X', "plateCopper", 'R',
new ItemStack(InitItems.itemSlimeRubber)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 6), " W ", "WSW", " W ", 'S', "partCastIronRod", 'W', new ItemStack(InitBlocks.blockCopperWire)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 7), "L L", " L ", "MCM", 'M', "partMagnet", 'C', new ItemStack(InitBlocks.blockCopperWire), 'L', Items.leather));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMachinePart, 1, 8), "XRX", 'X', "plateCopper", 'R', new ItemStack(InitItems.itemSlimeRubber)));
// Wires
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperWire, 1, 0), "CD", 'C', "ingotCopper", 'D',
new ItemStack(InitItems.itemDrawplate, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperWire, 3, 1), "WWW", "CCC", "WWW", 'C',
new ItemStack(InitBlocks.blockCopperWire, 1, 0), 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteelWire, 1, 0), "CD", 'C', "ingotSteel", 'D',
new ItemStack(InitItems.itemDrawplate, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteelWire, 3, 1), "WWW", "CCC", "WWW", 'C',
new ItemStack(InitBlocks.blockSteelWire, 1, 0), 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperWire, 1, 0), "CD", 'C', "ingotCopper", 'D', new ItemStack(InitItems.itemDrawplate, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCopperWire, 3, 1), "WWW", "CCC", "WWW", 'C', new ItemStack(InitBlocks.blockCopperWire, 1, 0), 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteelWire, 1, 0), "CD", 'C', "ingotSteel", 'D', new ItemStack(InitItems.itemDrawplate, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSteelWire, 3, 1), "WWW", "CCC", "WWW", 'C', new ItemStack(InitBlocks.blockSteelWire, 1, 0), 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrawplate), "S S", " S ", "S S", 'S', "plateCastIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCanisterSteam, 1, InitItems.itemCanisterSteam.getMaxDamage()), "PPP",
"GGG", "PPP", 'G', "paneGlass", 'P', "plateBrass"));
GameRegistry
.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemReinforcedCanisterSteam, 1, InitItems.itemCanisterSteam.getMaxDamage()),
"PPP", "CIC", "PPP", 'I', "ingotSteel", 'P', "plateSteel", 'C', InitItems.itemCanisterSteam));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCanisterSteam, 1, InitItems.itemCanisterSteam.getMaxDamage()), "PPP", "GGG", "PPP", 'G', "paneGlass", 'P', "plateBrass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemReinforcedCanisterSteam, 1, InitItems.itemCanisterSteam.getMaxDamage()), "PPP", "CIC", "PPP", 'I', "ingotSteel", 'P', "plateSteel", 'C', InitItems.itemCanisterSteam));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemHammer), "III", " H ", " C ", 'I', "ingotCastIron", 'H', Items.stick,
'C', "partCastIronRod"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemHammer), "III", " H ", " C ", 'I', "ingotCastIron", 'H', Items.stick, 'C', "partCastIronRod"));
// Brass Powder
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, 3, 4), "dustCopper", "dustCopper", "dustZinc"));
// Bronze Powder
GameRegistry
.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, 4, 5), "dustCopper", "dustCopper", "dustCopper", "dustTin"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPowder, 4, 5), "dustCopper", "dustCopper", "dustCopper", "dustTin"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMatch), new ItemStack(InitItems.itemResource, 1, 1), "stickWood"));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockSlate, 4, 6), "SS", "SS", 'S', new ItemStack(InitBlocks.blockSlate, 1, 0));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockSlate, 4, 7), "SS", "SS", 'S', new ItemStack(InitBlocks.blockSlate, 1, 1));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockSlate, 4, 8), "SS", "SS", 'S', new ItemStack(InitBlocks.blockSlate, 1, 2));
// Slate Stairs
Block[] stairs = new Block[] { InitBlocks.blockRawBlueSlateStairs, InitBlocks.blockRawBlackSlateStairs, InitBlocks.blockRawRedSlateStairs,
InitBlocks.blockCobbleBlueSlateStairs, InitBlocks.blockCobbleBlackSlateStairs, InitBlocks.blockCobbleRedSlateStairs,
InitBlocks.blockBrickBlueSlateStairs, InitBlocks.blockBrickBlackSlateStairs, InitBlocks.blockBrickRedSlateStairs };
Block[] stairs = new Block[] { InitBlocks.blockRawBlueSlateStairs, InitBlocks.blockRawBlackSlateStairs, InitBlocks.blockRawRedSlateStairs, InitBlocks.blockCobbleBlueSlateStairs, InitBlocks.blockCobbleBlackSlateStairs, InitBlocks.blockCobbleRedSlateStairs, InitBlocks.blockBrickBlueSlateStairs, InitBlocks.blockBrickBlackSlateStairs, InitBlocks.blockBrickRedSlateStairs };
for (int i = 0; i < 9; i++)
GameRegistry.addRecipe(new ItemStack(stairs[i], 4), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockSlate, 1, i));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemChisel), " I", " S", 'I', "ingotIron", 'S', "stickWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWatch), "SPS", "PMP", "SPS", 'P', "paneGlass", 'M',
"partClockworkMechanism", 'S', "plateBrass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTimeClock), "DGD", "GWG", "DGD", 'G', Items.ghast_tear, 'W',
InitItems.itemWatch, 'D', Items.diamond));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWatch), "SPS", "PMP", "SPS", 'P', "paneGlass", 'M', "partClockworkMechanism", 'S', "plateBrass"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTimeClock), "DGD", "GWG", "DGD", 'G', Items.ghast_tear, 'W', InitItems.itemWatch, 'D', Items.diamond));
GameRegistry.addRecipe(new ItemStack(InitItems.itemTeapot, 1, 0), "BB ", "B B", "BB ", 'B', Items.brick);
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemTeapot, 1, 1), Items.potionitem, new ItemStack(InitItems.itemTeapot, 1, 0));
GameRegistry.addRecipe(new ItemStack(InitItems.itemTeapot, 1, 12), "SLS", "LPL", "SLS", 'P', new ItemStack(InitItems.itemTeapot, 1, 2), 'L',
InitItems.itemTeaLeaf, 'S', Items.sugar);
GameRegistry.addRecipe(new ItemStack(InitItems.itemTeapot, 1, 12), "SLS", "LPL", "SLS", 'P', new ItemStack(InitItems.itemTeapot, 1, 2), 'L', InitItems.itemTeaLeaf, 'S', Items.sugar);
GameRegistry.addRecipe(new ItemStack(InitItems.itemTeacup), "B B", "BBB", 'B', Items.clay_ball);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarSmall), "SIS", "GIG", "GGG", 'S', InitItems.itemSlimeRubber,
'I', "ingotCopper", 'G', Blocks.glass));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarMedium), "I I", "IJI", "I I", 'S',
InitItems.itemSlimeRubber, 'I', "ingotGold", 'G', Blocks.glass, 'J', InitItems.itemElectricJarSmall));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarLarge), "CSC", "SJS", "CSC", 'S', "plateSteel", 'C',
"plateCastIron", 'G', Blocks.glass, 'J', InitItems.itemElectricJarMedium));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarHuge), "GGG", "GJG", "GGG", 'S', InitItems.itemSlimeRubber,
'I', "ingotSteel", 'G', Items.diamond, 'J', InitItems.itemElectricJarLarge));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarSmall), "SIS", "GIG", "GGG", 'S', InitItems.itemSlimeRubber, 'I', "ingotCopper", 'G', Blocks.glass));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarMedium), "I I", "IJI", "I I", 'S', InitItems.itemSlimeRubber, 'I', "ingotGold", 'G', Blocks.glass, 'J', InitItems.itemElectricJarSmall));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarLarge), "CSC", "SJS", "CSC", 'S', "plateSteel", 'C', "plateCastIron", 'G', Blocks.glass, 'J', InitItems.itemElectricJarMedium));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemElectricJarHuge), "GGG", "GJG", "GGG", 'S', InitItems.itemSlimeRubber, 'I', "ingotSteel", 'G', Items.diamond, 'J', InitItems.itemElectricJarLarge));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockFlesh), "ZZ", "ZZ", 'Z', Items.rotten_flesh);
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockCongealedSlime), "RRR", "RRR", "RRR", 'R', InitItems.itemSlimeRubber);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpyglass), "BGB", "W W", " G ", 'B', "ingotBrass", 'G', "paneGlass",
'W', "plankWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFieldManipulator, 4, 0), "BRB", "RER", "BRB", 'B', "nuggetBrass", 'E',
Items.ender_pearl, 'R', Items.redstone));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpyglass), "BGB", "W W", " G ", 'B', "ingotBrass", 'G', "paneGlass", 'W', "plankWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFieldManipulator, 4, 0), "BRB", "RER", "BRB", 'B', "nuggetBrass", 'E', Items.ender_pearl, 'R', Items.redstone));
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockPath, 6), "PPP", "XXX", 'P', Blocks.stone_slab, 'X', Blocks.stonebrick);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCastIronLamp),
new Object[] { "III", "PGP", "PRP", 'I', "ingotCastIron", 'P', "plateCastIron", 'G', Blocks.glowstone, 'R', "partCastIronRod" }));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockInvertedCastIronLamp),
new Object[] { InitBlocks.blockCastIronLamp, Blocks.redstone_torch });
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockCastIronLamp),
new Object[] { InitBlocks.blockInvertedCastIronLamp, Blocks.redstone_torch });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCastIronLamp), new Object[] { "III", "PGP", "PRP", 'I', "ingotCastIron", 'P', "plateCastIron", 'G', Blocks.glowstone, 'R', "partCastIronRod" }));
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockInvertedCastIronLamp), new Object[] { InitBlocks.blockCastIronLamp, Blocks.redstone_torch });
GameRegistry.addShapelessRecipe(new ItemStack(InitBlocks.blockCastIronLamp), new Object[] { InitBlocks.blockInvertedCastIronLamp, Blocks.redstone_torch });
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemSplashLightningBottle), InitItems.itemElectricJarSmall, Items.gunpowder);
GameRegistry.addRecipe(new ItemStack(InitItems.itemGrindstone), "FS", "SF", 'F', Items.flint, 'S', Blocks.stone);
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 2), "dustSulphur", new ItemStack(Items.coal, 1, 1),
"dustSulphur", new ItemStack(Items.coal, 1, 1)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.dye, 8, 15), "powderPhosphorus", Items.wheat_seeds, "powderPhosphorus",
Items.wheat_seeds));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 2), "dustSulphur", new ItemStack(Items.coal, 1, 1), "dustSulphur", new ItemStack(Items.coal, 1, 1)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.dye, 8, 15), "powderPhosphorus", Items.wheat_seeds, "powderPhosphorus", Items.wheat_seeds));
}
private static void initializeSmeltingRecipes()
{
private static void initializeSmeltingRecipes() {
// Ores ---> Ingots
for (int meta = 0; meta < 4; meta++)
{
for (int meta = 0; meta < 4; meta++) {
GameRegistry.addSmelting(new ItemStack(InitBlocks.blockCustomOre, 1, meta), new ItemStack(InitItems.itemIngot, 1, meta), 0.3F);
}
// Dusts ---> Ingots
@ -510,6 +382,7 @@ public class InitRecipes
// Misc
GameRegistry.addSmelting(Blocks.iron_block, new ItemStack(InitBlocks.blockMetal, 1, 7), 0.5F);
GameRegistry.addSmelting(Items.iron_ingot, new ItemStack(InitItems.itemIngot, 1, 7), 0.2F);
GameRegistry.addSmelting(InitItems.itemNuggetIron, new ItemStack(InitItems.itemNugget, 1, 7), 0.023F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemResource, 1, 3), new ItemStack(InitItems.itemResource, 1, 4), 0.5F);
GameRegistry.addSmelting(new ItemStack(InitBlocks.blockSlate, 1, 3), new ItemStack(InitBlocks.blockSlate, 1, 0), 0.3F);
@ -522,7 +395,7 @@ public class InitRecipes
GameRegistry.addSmelting(InitBlocks.blockBrassLog, new ItemStack(InitItems.itemIngot, 2, 4), 0);
GameRegistry.addSmelting(new ItemStack(InitItems.itemCookedWhaleMeat), new ItemStack(InitItems.itemWhaleMeat), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemWhaleMeat), new ItemStack(InitItems.itemCookedWhaleMeat), 1F);
}
}

View File

@ -0,0 +1,24 @@
package steamcraft.common.init;
import net.minecraft.item.ItemStack;
import tconstruct.TConstruct;
import tconstruct.library.crafting.FluidType;
import tconstruct.library.crafting.Smeltery;
public class InitTinkersSupport {
public static void init() {
initCastingRecipes();
initSmeltingRecipes();
}
public static void initCastingRecipes() {
}
public static void initSmeltingRecipes() {
FluidType.registerFluidType("Zinc", InitBlocks.blockMetal, 3, 400, InitBlocks.moltenZincFluid, true);
FluidType zinc = FluidType.getFluidType("Zinc");
Smeltery.addMelting(zinc, new ItemStack(InitItems.itemIngot, 1, 3), 0, TConstruct.ingotLiquidValue);
}
}

View File

@ -14,16 +14,14 @@ package steamcraft.common.items;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.api.block.IEngravable;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
@ -32,41 +30,44 @@ import steamcraft.common.lib.ModInfo;
* @author Surseance
*
*/
public class ItemChisel extends BaseItem
{
public class ItemChisel extends BaseItem {
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ir)
{
public void registerIcons(IIconRegister ir) {
this.itemIcon = ir.registerIcon(ModInfo.PREFIX + "itemChisel");
}
public ItemChisel()
{
public ItemChisel() {
this.setMaxStackSize(1);
this.setMaxDamage(20);
}
@Override
public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
Block block = world.getBlock(x, y, z);
if (block == Blocks.diamond_block)
if (block == Blocks.diamond_block) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 0, 2);
else if (block == Blocks.gold_block)
} else if (block == Blocks.gold_block) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 1, 2);
else if (block == Blocks.iron_block)
} else if (block == Blocks.iron_block) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 2, 2);
else if (block == Blocks.lapis_block)
} else if (block == Blocks.lapis_block) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 3, 2);
else if (block == Blocks.stone)
} else if (block == Blocks.stone) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 4, 2);
else if (block == Blocks.redstone_lamp)
} else if (block == Blocks.emerald_block) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 5, 2);
} else if (block == Blocks.redstone_block) {
world.setBlock(x, y, z, InitBlocks.blockEngravedVanilla, 6, 2);
} else if (block == Blocks.quartz_block) {
world.setBlock(x, y, z, Blocks.quartz_block, 1, 2);
} else if (block == Blocks.redstone_lamp) {
world.setBlock(x, y, z, InitBlocks.blockLamp, 0, 2);
else if (block == Blocks.lit_redstone_lamp)
} else if (block == Blocks.lit_redstone_lamp) {
world.setBlock(x, y, z, InitBlocks.blockLampOn, 0, 2);
else if (block instanceof IEngravable)
} else if (block instanceof IEngravable)
{
Block newBlock = ((IEngravable) block).getChiseledVariant();
int meta = ((IEngravable) block).getChiseledVariantMeta();

View File

@ -0,0 +1,34 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import steamcraft.common.lib.ModInfo;
/**
* @author warlordjones
*
*/
public class ItemNuggetIron extends BaseItem {
public ItemNuggetIron() {
super();
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister) {
this.itemIcon = par1IconRegister.registerIcon(ModInfo.PREFIX + "metals/itemNuggetIron");
}
}

View File

@ -12,24 +12,22 @@
*/
package steamcraft.common.items;
import net.minecraft.block.Block;
import boilerplate.api.IOpenableGUI;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.api.item.IUniversalWrench;
import steamcraft.api.tile.ISpannerTile;
import steamcraft.client.lib.GuiIDs;
import steamcraft.common.Steamcraft;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
import steamcraft.common.tiles.TileCopperPipe;
import steamcraft.common.tiles.energy.TileCopperWire;
/**
* @author warlordjones
@ -48,19 +46,16 @@ public class ItemSpanner extends BaseItem implements IUniversalWrench
{
if (!world.isRemote)
{
Block block = world.getBlock(x, y, z);
TileEntity tile = world.getTileEntity(x, y, z);
if ((block == InitBlocks.blockCopperPipe) || (block == InitBlocks.blockSteelPipe))
if (tile instanceof ISpannerTile)
{
TileCopperPipe pipe = (TileCopperPipe) world.getTileEntity(x, y, z);
ISpannerTile spannerTile = (ISpannerTile) tile;
pipe.changeExtracting();
}
else if ((block == InitBlocks.blockCopperWire) || (block == InitBlocks.blockSteelWire))
{
TileCopperWire wire = (TileCopperWire) world.getTileEntity(x, y, z);
wire.changeExtracting();
if (player.isSneaking() && tile instanceof IOpenableGUI)
player.openGui(Steamcraft.instance, GuiIDs.PIPES, world, x, y, z);
else
spannerTile.changeExtraction();
}
}
player.swingItem();

View File

@ -15,6 +15,7 @@ package steamcraft.common.items.electric;
import java.awt.Color;
import java.util.HashMap;
import boilerplate.common.utils.PlayerUtils;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -26,8 +27,6 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import boilerplate.common.utils.PlayerUtils;
import steamcraft.common.Steamcraft;
import steamcraft.common.lib.ModInfo;
@ -36,16 +35,14 @@ import steamcraft.common.lib.ModInfo;
*
*/
public class ItemRayGun extends ElectricItem
{
public class ItemRayGun extends ElectricItem {
public static short energyPerUse = 100;
static HashMap<String, Object> ray = new HashMap<String, Object>();
static HashMap<String, Long> soundDelay = new HashMap<String, Long>();
static final HashMap<Block, Block> meltables = new HashMap<Block, Block>();
public ItemRayGun(String raySound, int maxEnergy, int maxReceive)
{
public ItemRayGun(String raySound, int maxEnergy, int maxReceive) {
super(maxEnergy, maxReceive, 0);
this.setMaxStackSize(1);
this.setFull3D();
@ -59,10 +56,8 @@ public class ItemRayGun extends ElectricItem
@SuppressWarnings("all")
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
if (this.getEnergyStored(stack) >= ItemRayGun.energyPerUse)
{
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (this.getEnergyStored(stack) >= ItemRayGun.energyPerUse || player.capabilities.isCreativeMode) {
MovingObjectPosition mop = PlayerUtils.getTargetBlock(world, player, true, 50);
Vec3 vec3 = player.getLookVec();
@ -82,19 +77,15 @@ public class ItemRayGun extends ElectricItem
if (soundDelay.get(player) == null)
soundDelay.put(player.getCommandSenderName(), Long.valueOf(0L));
if (!world.isRemote && (soundDelay.get(player.getCommandSenderName()).longValue() < System.currentTimeMillis()))
{
if (!world.isRemote && (soundDelay.get(player.getCommandSenderName()).longValue() < System.currentTimeMillis())) {
world.playSoundEffect(tx, ty, tz, ModInfo.PREFIX + "raygun", 0.35F, 1.0F);
soundDelay.put(player.getCommandSenderName(), Long.valueOf(System.currentTimeMillis() + 1200L));
}
else
} else
soundDelay.put(player.getCommandSenderName(), Long.valueOf(0L));
if (world.isRemote)
ray.put(player.getCommandSenderName(),
Steamcraft.proxy.rayFX(world, player, tx, ty, tz, 2, false, impact > 0 ? 2.0F : 0.0F, ray.get(player), impact, Color.GREEN));
ray.put(player.getCommandSenderName(), Steamcraft.proxy.rayFX(world, player, tx, ty, tz, 2, false, impact > 0 ? 2.0F : 0.0F, ray.get(player), impact, Color.GREEN));
if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK))
{
if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) {
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
@ -102,14 +93,15 @@ public class ItemRayGun extends ElectricItem
if (!world.isRemote && !world.isAirBlock(x, y, z))
for (int i = x - Item.itemRand.nextInt(4); i < (x + Item.itemRand.nextInt(4)); i++)
for (int j = y - Item.itemRand.nextInt(4); j < (y + Item.itemRand.nextInt(4)); j++)
for (int k = z - Item.itemRand.nextInt(4); k < (z + Item.itemRand.nextInt(4)); k++)
{
for (int k = z - Item.itemRand.nextInt(4); k < (z + Item.itemRand.nextInt(4)); k++) {
if (world.isAirBlock(i, j, k))
world.setBlock(i, j, k, Blocks.fire);
else if (meltables.containsKey(world.getBlock(i, j, k)))
world.setBlock(i, j, k, meltables.get(world.getBlock(i, j, k)));
this.setEnergy(stack, this.getEnergyStored(stack) - energyPerUse);
if (!player.capabilities.isCreativeMode) {
this.setEnergy(stack, this.getEnergyStored(stack) - energyPerUse);
}
if (this.getEnergyStored(stack) < energyPerUse)
return stack;
@ -129,8 +121,7 @@ public class ItemRayGun extends ElectricItem
py += vec3d.yCoord * 0.5D;
pz += vec3d.zCoord * 0.5D;
if ((pointedEntity != null) && ((pointedEntity instanceof EntityLivingBase)))
{
if ((pointedEntity != null) && ((pointedEntity instanceof EntityLivingBase))) {
if (!world.isRemote)
pointedEntity.setFire(100);
}

View File

@ -22,7 +22,7 @@ public class ModInfo
{
public static final String ID = "steamcraft2";
public static final String NAME = "Steamcraft 2";
public static final String VERSION = "B4.5";
public static final String VERSION = "B5.0.0";
public static final String CLIENT_PROXY = "steamcraft.client.ClientProxy";
public static final String COMMON_PROXY = "steamcraft.common.CommonProxy";

View File

@ -0,0 +1,33 @@
package steamcraft.common.lib.events;
import java.util.Random;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import steamcraft.common.config.ConfigGeneral;
import steamcraft.common.init.InitItems;
public class EventHandlerMobDrop {
public Random rand = new Random();
@SubscribeEvent
public void onMobDrops(LivingDropsEvent event) {
if (event.entity instanceof EntityIronGolem && event.entity.isBurning() && ConfigGeneral.golemFireDrop) {
event.drops.clear();
ItemStack ingot = new ItemStack(InitItems.itemIngot, 3 + this.rand.nextInt(3), 7);
ItemStack poppy = new ItemStack(Item.getItemFromBlock(Blocks.red_flower), this.rand.nextInt(3), 0);
EntityItem ingotDrop = new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, ingot);
EntityItem poppyDrop = new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, poppy);
event.drops.add(ingotDrop);
event.drops.add(poppyDrop);
}
}
}

View File

@ -34,19 +34,19 @@ public class CopperPipePacket implements IMessage
{
private int x, y, z;
ForgeDirection[] connections;
ForgeDirection extract;
ForgeDirection[] extractions;
public CopperPipePacket()
{
} // REQUIRED
public CopperPipePacket(int x, int y, int z, ForgeDirection[] connections, ForgeDirection extract)
public CopperPipePacket(int x, int y, int z, ForgeDirection[] connections, ForgeDirection[] extractions)
{
this.x = x;
this.y = y;
this.z = z;
this.connections = connections;
this.extract = extract;
this.extractions = extractions;
}
@Override
@ -66,9 +66,15 @@ public class CopperPipePacket implements IMessage
this.connections[i] = null;
}
this.extract = ForgeDirection.getOrientation(buf.readByte());
if (this.extract == ForgeDirection.UNKNOWN)
this.extract = null;
this.extractions = new ForgeDirection[6];
for (int i = 0; i < 6; i++)
{
this.extractions[i] = ForgeDirection.getOrientation(buf.readByte());
if (this.extractions[i] == ForgeDirection.UNKNOWN)
this.extractions[i] = null;
}
}
@Override
@ -77,9 +83,12 @@ public class CopperPipePacket implements IMessage
buf.writeInt(this.x);
buf.writeInt(this.y);
buf.writeInt(this.z);
for (int i = 0; i < 6; i++)
buf.writeByte(directionToByte(this.connections[i]));
buf.writeByte(directionToByte(this.extract));
for (int i = 0; i < 6; i++)
buf.writeByte(directionToByte(this.extractions[i]));
}
public static byte directionToByte(ForgeDirection dir)
@ -128,7 +137,7 @@ public class CopperPipePacket implements IMessage
TileCopperPipe pipe = (TileCopperPipe) world.getTileEntity(message.x, message.y, message.z);
pipe.connections = message.connections;
pipe.extract = message.extract;
pipe.extractions = message.extractions;
}
return null;

View File

@ -0,0 +1,82 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.packets;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import io.netty.buffer.ByteBuf;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import steamcraft.api.tile.ISpannerTile;
/**
* @author decebaldecebal
*
*/
public class UpdateExtractionPacket implements IMessage
{
private int x, y, z, worldId;
private byte dirIndex;
public UpdateExtractionPacket()
{
} // REQUIRED
public UpdateExtractionPacket(int worldId, int x, int y, int z, int dirIndex)
{
this.worldId = worldId;
this.x = x;
this.y = y;
this.z = z;
this.dirIndex = (byte) dirIndex;
}
@Override
public void fromBytes(ByteBuf buf)
{
this.worldId = buf.readInt();
this.x = buf.readInt();
this.y = buf.readInt();
this.z = buf.readInt();
this.dirIndex = buf.readByte();
}
@Override
public void toBytes(ByteBuf buf)
{
buf.writeInt(worldId);
buf.writeInt(this.x);
buf.writeInt(this.y);
buf.writeInt(this.z);
buf.writeByte(this.dirIndex);
}
public static class UpdateExtractionPacketHandler implements IMessageHandler<UpdateExtractionPacket, IMessage>
{
@Override
public IMessage onMessage(UpdateExtractionPacket message, MessageContext ctx)
{
World world = DimensionManager.getWorld(message.worldId);
if (world.getTileEntity(message.x, message.y, message.z) instanceof ISpannerTile)
{
ISpannerTile tile = (ISpannerTile) world.getTileEntity(message.x, message.y, message.z);
tile.changeExtraction(message.dirIndex);
}
return null;
}
}
}

View File

@ -34,19 +34,19 @@ public class WirePacket implements IMessage
{
private int x, y, z;
ForgeDirection[] connections;
ForgeDirection extract;
ForgeDirection[] extractions;
public WirePacket()
{
} // REQUIRED
public WirePacket(int x, int y, int z, ForgeDirection[] connections, ForgeDirection extract)
public WirePacket(int x, int y, int z, ForgeDirection[] connections, ForgeDirection[] extractions)
{
this.x = x;
this.y = y;
this.z = z;
this.connections = connections;
this.extract = extract;
this.extractions = extractions;
}
@Override
@ -65,9 +65,16 @@ public class WirePacket implements IMessage
if (this.connections[i] == ForgeDirection.UNKNOWN)
this.connections[i] = null;
}
this.extract = ForgeDirection.getOrientation(buf.readByte());
if (this.extract == ForgeDirection.UNKNOWN)
this.extract = null;
this.extractions = new ForgeDirection[6];
for (int i = 0; i < 6; i++)
{
this.extractions[i] = ForgeDirection.getOrientation(buf.readByte());
if (this.extractions[i] == ForgeDirection.UNKNOWN)
this.extractions[i] = null;
}
}
@Override
@ -79,7 +86,9 @@ public class WirePacket implements IMessage
for (int i = 0; i < 6; i++)
buf.writeByte(CopperPipePacket.directionToByte(this.connections[i]));
buf.writeByte(CopperPipePacket.directionToByte(this.extract));
for (int i = 0; i < 6; i++)
buf.writeByte(CopperPipePacket.directionToByte(this.extractions[i]));
}
@ -96,7 +105,7 @@ public class WirePacket implements IMessage
TileCopperWire wire = (TileCopperWire) world.getTileEntity(message.x, message.y, message.z);
wire.connections = message.connections;
wire.extract = message.extract;
wire.extractions = message.extractions;
}
return null;

View File

@ -14,6 +14,11 @@ package steamcraft.common.tiles;
import java.util.ArrayList;
import boilerplate.api.IOpenableGUI;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.NetworkManager;
@ -21,31 +26,28 @@ import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import steamcraft.api.tile.ISpannerTile;
import steamcraft.client.gui.GuiChangeExtractions;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.init.InitPackets;
import steamcraft.common.packets.CopperPipeFluidPacket;
import steamcraft.common.packets.CopperPipePacket;
import steamcraft.common.tiles.container.ContainerChangeExtractions;
/**
* @author decebaldecebal
*
*/
public class TileCopperPipe extends TileEntity implements IFluidHandler
public class TileCopperPipe extends TileEntity implements IFluidHandler, ISpannerTile, IOpenableGUI
{
private static int ticksTillFluidUpdate = 200; // update the fluid in pipe
// every 10 seconds
private static int ticksTillFluidUpdate = 200; // update the fluid in pipe every 10 seconds
private static int copperPipeCapacity = 500;
private static int copperPipeExtract = 50;
@ -60,11 +62,10 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
public Fluid fluidInPipe;
public float fluidScaled = 0;
private int ticksSinceUpdate = ticksTillFluidUpdate / 2; // first time
// update faster
private int ticksSinceUpdate = ticksTillFluidUpdate / 2; // first time update faster
public ForgeDirection extract = null;
public ForgeDirection[] connections = new ForgeDirection[6];
public ForgeDirection[] extractions = new ForgeDirection[6];
private Coords masterCoords = null;
private static float pixel = 1F / 16f;
@ -123,8 +124,19 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
{
super.writeToNBT(tag);
writeDirectionToNBT(tag, this.extract);
NBTTagList extractions = new NBTTagList();
for (int i = 0; i < 6; i++)
if (this.extractions[i] != null)
{
NBTTagCompound conn = new NBTTagCompound();
conn.setByte("index", (byte) i);
writeDirectionToNBT(conn, this.extractions[i]);
extractions.appendTag(conn);
}
tag.setTag("extractions", extractions);
tag.setBoolean("master", this.isMaster);
if (this.isMaster)
@ -169,7 +181,16 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
{
super.readFromNBT(tag);
this.extract = readDirectionFromNBT(tag);
this.extractions = new ForgeDirection[6];
NBTTagList extractions = tag.getTagList("extractions", Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < extractions.tagCount(); i++)
{
NBTTagCompound dirTag = extractions.getCompoundTagAt(i);
this.extractions[dirTag.getByte("index")] = readDirectionFromNBT(dirTag);
}
this.isMaster = tag.getBoolean("master");
@ -197,7 +218,17 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
{
NBTTagCompound tag = new NBTTagCompound();
writeDirectionToNBT(tag, this.extract);
NBTTagList extractions = new NBTTagList();
for (int i = 0; i < 6; i++)
if (this.extractions[i] != null)
{
NBTTagCompound conn = new NBTTagCompound();
conn.setByte("index", (byte) i);
writeDirectionToNBT(conn, this.extractions[i]);
extractions.appendTag(conn);
}
NBTTagList connections = new NBTTagList();
@ -211,6 +242,7 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
connections.appendTag(conn);
}
tag.setTag("extractions", extractions);
tag.setTag("connections", connections);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tag);
@ -219,11 +251,20 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
{
this.extract = readDirectionFromNBT(packet.func_148857_g());
this.extractions = new ForgeDirection[6];
NBTTagList extractions = packet.func_148857_g().getTagList("extractions", Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < extractions.tagCount(); i++)
{
NBTTagCompound tag = extractions.getCompoundTagAt(i);
this.extractions[tag.getByte("index")] = readDirectionFromNBT(tag);
}
this.connections = new ForgeDirection[6];
NBTTagList connections = (NBTTagList) packet.func_148857_g().getTag("connections");
NBTTagList connections = packet.func_148857_g().getTagList("connections", Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < connections.tagCount(); i++)
{
@ -233,40 +274,103 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
}
}
public void changeExtracting()
@Override
public void changeExtraction()
{
if (!this.worldObj.isRemote)
{
if (this.extract != null)
for (int i = 0; i < 6; i++)
{
Coords temp = new Coords(this.xCoord + this.extract.offsetX, this.yCoord + this.extract.offsetY, this.zCoord + this.extract.offsetZ,
this.extract.getOpposite());
ForgeDirection dir = this.connections[i];
this.network.inputs.remove(temp);
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
if ((dir != null) && this.isFluidHandler(dir))
{
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY,
this.zCoord + dir.offsetZ, dir.getOpposite());
this.extract = null;
}
else
for (ForgeDirection dir : this.connections)
if ((dir != null) && this.isFluidHandler(dir))
if (this.extractions[i] == null)
{
this.extract = dir;
Coords temp = new Coords(this.xCoord + this.extract.offsetX, this.yCoord + this.extract.offsetY,
this.zCoord + this.extract.offsetZ, this.extract.getOpposite());
this.extractions[i] = dir;
this.network.outputs.remove(temp);
if (!this.network.inputs.contains(temp))
this.network.inputs.add(temp);
break;
}
else
{
this.extractions[i] = null;
this.network.inputs.remove(temp);
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
}
}
}
this.updateClientConnections();
}
}
@Override
public void changeExtraction(int dirIndex)
{
if (!this.worldObj.isRemote)
{
ForgeDirection dir = this.connections[dirIndex];
if (dir != null)
{
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY,
this.zCoord + dir.offsetZ, dir.getOpposite());
if (this.extractions[dirIndex] == null)
{
this.extractions[dirIndex] = this.connections[dirIndex];
this.network.outputs.remove(temp);
if (!this.network.inputs.contains(temp))
this.network.inputs.add(temp);
}
else
{
this.extractions[dirIndex] = null;
this.network.inputs.remove(temp);
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
}
this.updateClientConnections();
}
}
}
@Override
public ForgeDirection[] getExtractableConnections()
{
ForgeDirection[] extractableConnections = new ForgeDirection[6];
for(int i = 0;i < 6;i++)
{
ForgeDirection dir = this.connections[i];
if (dir != null && this.isFluidHandler(dir))
extractableConnections[i] = dir;
}
return extractableConnections;
}
@Override
public ForgeDirection[] getExtractions()
{
return this.extractions;
}
private void removeConnections(int i)
{
if ((this.connections[i] != null) && !this.worldObj.isRemote)
@ -276,15 +380,11 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ, dir.getOpposite());
this.network.outputs.remove(temp);
this.network.inputs.remove(temp);
if (this.connections[i] == this.extract)
this.network.inputs.remove(temp);
this.extractions[i] = null;
this.connections[i] = null;
}
if (this.extract == this.connections[i])
this.extract = null;
this.connections[i] = null;
}
public void updateConnections()
@ -364,12 +464,14 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
this.setMaster(this);
}
for (ForgeDirection dir : this.connections)
if ((dir != null) && this.isFluidHandler(dir))
for (int i = 0;i < 6;i++)
{
ForgeDirection dir = this.connections[i];
if (dir != null && this.isFluidHandler(dir))
{
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ, dir.getOpposite());
if (this.extract != dir)
if (this.extractions[i] == null)
{
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
@ -377,6 +479,7 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
else if (!this.network.inputs.contains(temp))
this.network.inputs.add(temp);
}
}
this.updateClientConnections();
}
@ -386,7 +489,7 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
{
if (this.network != null)
{
InitPackets.network.sendToAllAround(new CopperPipePacket(this.xCoord, this.yCoord, this.zCoord, this.connections, this.extract),
InitPackets.network.sendToAllAround(new CopperPipePacket(this.xCoord, this.yCoord, this.zCoord, this.connections, this.extractions),
new TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 100));
}
}
@ -618,21 +721,34 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
@Override
public boolean canDrain(ForgeDirection from, Fluid fluid)
{
return (from != this.extract) && (this.network != null)
for (ForgeDirection dir : this.extractions)
if (dir == from)
return false;
return (this.network != null)
&& ((this.network.tank.getFluid() == null) || (this.network.tank.getFluid().getFluid() == fluid));
}
@Override
public boolean canFill(ForgeDirection from, Fluid fluid)
{
return (from == this.extract) && (this.network != null)
for (ForgeDirection dir : this.extractions)
if (dir == from)
return false;
return (this.network != null)
&& ((this.network.tank.getFluid() == null) || (this.network.tank.getFluid().getFluid() == fluid));
}
@Override
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain)
{
if ((from != this.extract) && (this.network != null) && (this.network.tank.getFluid() != null)
for (ForgeDirection dir : this.extractions)
if (dir == from)
return null;
if ((this.network != null) && (this.network.tank.getFluid() != null)
&& this.network.tank.getFluid().isFluidEqual(resource))
{
int amount = Math.min(resource.amount, this.pipeTransfer);
@ -646,7 +762,11 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
@Override
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
{
if ((from != this.extract) && (this.network != null) && (this.network.tank.getFluid() != null))
for (ForgeDirection dir : this.extractions)
if (dir == from)
return null;
if ((this.network != null) && (this.network.tank.getFluid() != null))
{
int amount = Math.min(maxDrain, this.pipeTransfer);
@ -659,7 +779,11 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
@Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
{
if ((this.extract == from) && (this.network != null))
for (ForgeDirection dir : this.extractions)
if (dir == from)
return 0;
if ((this.network != null))
{
int amount = Math.min(resource.amount, this.pipeExtract);
@ -678,6 +802,18 @@ public class TileCopperPipe extends TileEntity implements IFluidHandler
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return new GuiChangeExtractions(world.getTileEntity(x, y, z), player.dimension);
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return new ContainerChangeExtractions();
}
public static class FluidNetwork
{
private int capacityPerPipe;

View File

@ -55,7 +55,7 @@ public class TileLiquidBoiler extends TileBaseBoiler implements IOpenableGUI
// TODO Allow things to be added to this via imc
public HashMap<Fluid, Integer> fuels = RecipeAPI.addedFuels;
public int defaultFuelValue = 500;
public int defaultFuelValue = 100;
public TileLiquidBoiler()
{
@ -161,13 +161,15 @@ public class TileLiquidBoiler extends TileBaseBoiler implements IOpenableGUI
}
}
// Burn fuel
if ((this.furnaceBurnTime == 0) && (this.waterTank.getFluidAmount() >= waterPerTick)
&& (this.steamTank.fill(new FluidStack(FluidRegistry.getFluid("steam"), steamPerTick), false) > 0)
&& (this.fuelTank.getFluidAmount() >= fuelPerTick))
if ((this.furnaceBurnTime == 0) && this.fuelTank.getFluid() != null)
{
this.furnaceBurnTime = this.getFuelBurnTime(this.fuelTank.getFluid().getFluid());
this.fuelTank.drain(fuelPerTick, true);
}
if (this.furnaceBurnTime != 0 && (this.waterTank.getFluidAmount() >= waterPerTick)
&& (this.steamTank.fill(new FluidStack(FluidRegistry.getFluid("steam"), steamPerTick), false) > 0)
&& (this.fuelTank.getFluidAmount() >= fuelPerTick))
this.fuelTank.drain(fuelPerTick, true);
// Produce steam
if ((this.furnaceBurnTime > 0) && (this.waterTank.getFluidAmount() >= waterPerTick) && (this.fuelTank.getFluidAmount() >= fuelPerTick)
&& (this.steamTank.getFluidAmount() < this.steamTank.getCapacity()))

View File

@ -46,6 +46,7 @@ public class TileRefinery extends BaseTileWithInventory implements IFluidHandler
public int furnaceBurnTime = 0;
public int currentItemBurnTime = 0;
public int cookTime = 0;
public int totalCookTime = 700;
public FluidTank oilTank;
@ -126,7 +127,7 @@ public class TileRefinery extends BaseTileWithInventory implements IFluidHandler
{
if (this.inventory[1].getItem() == InitItems.itemWhaleBlubber)
{
if (this.cookTime < 700)
if (this.cookTime < totalCookTime)
this.cookTime++;
else
{
@ -246,6 +247,6 @@ public class TileRefinery extends BaseTileWithInventory implements IFluidHandler
public int getCookTimeRemainingScaled(int i)
{
return (this.cookTime * i) / 200;
return (this.cookTime * i) / 400;
}
}

View File

@ -0,0 +1,34 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.tiles.container;
import boilerplate.common.baseclasses.blocks.BaseContainer;
import net.minecraft.entity.player.EntityPlayer;
/**
* @author decebaldecebal
*
*/
public class ContainerChangeExtractions extends BaseContainer
{
public ContainerChangeExtractions()
{
}
@Override
public boolean canInteractWith(EntityPlayer p_75145_1_)
{
return true;
}
}

View File

@ -130,8 +130,8 @@ public class ContainerLiquidBoiler extends BaseContainer
this.tileent.furnaceBurnTime = par2;
else if (par1 == 1)
this.tileent.steamTank.setFluid(new FluidStack(FluidRegistry.getFluid("steam"), par2));
else if (par1 == 2 && this.tileent.fuelTank.getFluid() != null)
this.tileent.fuelTank.getFluid().amount = par2;
else if (par1 == 2)
this.tileent.fuelTank.setFluid(new FluidStack(FluidRegistry.getFluid("whaleoil"), par2));
else if (par1 == 3)
this.tileent.waterTank.setFluid(new FluidStack(FluidRegistry.getFluid("water"), par2));
}

View File

@ -42,6 +42,7 @@ public class ContainerRefinery extends BaseContainer
private int lastBurnTime = 0;
private int lastItemBurnTime = 0;
private int lastSteamLevel = 0;
private int lastCookTime = 0;
public ContainerRefinery(InventoryPlayer player, TileRefinery tile)
{
@ -49,7 +50,7 @@ public class ContainerRefinery extends BaseContainer
this.setTile(this.tileent);
this.addSlotToContainer(new Slot(tile, 0, 16, 58));
this.addSlotToContainer(new Slot(tile, 1, 16, 23));
this.addSlotToContainer(new Slot(tile, 1, 16, 24));
this.addSlotToContainer(new Slot(tile, 2, 132, 57)
{
@Override
@ -76,6 +77,7 @@ public class ContainerRefinery extends BaseContainer
par1ICrafting.sendProgressBarUpdate(this, 0, this.tileent.furnaceBurnTime);
par1ICrafting.sendProgressBarUpdate(this, 1, this.tileent.currentItemBurnTime);
par1ICrafting.sendProgressBarUpdate(this, 2, this.tileent.oilTank.getFluidAmount());
par1ICrafting.sendProgressBarUpdate(this, 3, this.tileent.cookTime);
}
@Override
@ -96,11 +98,15 @@ public class ContainerRefinery extends BaseContainer
if (this.lastSteamLevel != this.tileent.oilTank.getFluidAmount())
var2.sendProgressBarUpdate(this, 2, this.tileent.oilTank.getFluidAmount());
if (this.lastCookTime != this.tileent.cookTime)
var2.sendProgressBarUpdate(this, 3, this.tileent.cookTime);
}
this.lastBurnTime = this.tileent.furnaceBurnTime;
this.lastItemBurnTime = this.tileent.currentItemBurnTime;
this.lastSteamLevel = this.tileent.oilTank.getFluidAmount();
this.lastCookTime = this.tileent.cookTime;
}
@Override
@ -113,6 +119,8 @@ public class ContainerRefinery extends BaseContainer
this.tileent.currentItemBurnTime = par2;
else if (par1 == 2)
this.tileent.oilTank.setFluid(new FluidStack(FluidRegistry.getFluid("steam"), par2));
else if (par1 == 3)
this.tileent.cookTime = par2;
}
@Override

View File

@ -14,6 +14,14 @@ package steamcraft.common.tiles.energy;
import java.util.ArrayList;
import boilerplate.api.IOpenableGUI;
import cofh.api.energy.EnergyStorage;
import cofh.api.energy.IEnergyConnection;
import cofh.api.energy.IEnergyHandler;
import cofh.api.energy.IEnergyProvider;
import cofh.api.energy.IEnergyReceiver;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.NetworkManager;
@ -21,26 +29,21 @@ import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
import cofh.api.energy.EnergyStorage;
import cofh.api.energy.IEnergyConnection;
import cofh.api.energy.IEnergyHandler;
import cofh.api.energy.IEnergyProvider;
import cofh.api.energy.IEnergyReceiver;
import steamcraft.api.tile.ISpannerTile;
import steamcraft.client.gui.GuiChangeExtractions;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.init.InitPackets;
import steamcraft.common.packets.WirePacket;
import steamcraft.common.tiles.TileCopperPipe.Coords;
import steamcraft.common.tiles.container.ContainerChangeExtractions;
/**
* @author decebaldecebal
*
*/
public class TileCopperWire extends TileEntity implements IEnergyHandler
public class TileCopperWire extends TileEntity implements IEnergyHandler, ISpannerTile, IOpenableGUI
{
private static int copperWireCapacity = 5000;
private static int copperWireTransfer = 1000;
@ -51,8 +54,8 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
public EnergyNetwork network;
private boolean isMaster = false;
public ForgeDirection extract = null;
public ForgeDirection[] connections = new ForgeDirection[6];
public ForgeDirection[] extractions = new ForgeDirection[6];
private Coords masterCoords = null;
@Override
@ -62,8 +65,7 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
if (this.isMaster)
{
if (this.network.updateNetworkForWires) // Update network on
// world load
if (this.network.updateNetworkForWires)
{
this.network.updateNetworkForWires = false;
this.updateConnections();
@ -79,8 +81,19 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
super.writeToNBT(tag);
writeDirectionToNBT(tag, this.extract);
NBTTagList extractions = new NBTTagList();
for (int i = 0; i < 6; i++)
if (this.extractions[i] != null)
{
NBTTagCompound conn = new NBTTagCompound();
conn.setByte("index", (byte) i);
writeDirectionToNBT(conn, this.extractions[i]);
extractions.appendTag(conn);
}
tag.setTag("extractions", extractions);
tag.setBoolean("master", this.isMaster);
if (this.isMaster)
@ -125,7 +138,16 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
super.readFromNBT(tag);
this.extract = readDirectionFromNBT(tag);
this.extractions = new ForgeDirection[6];
NBTTagList extractions = tag.getTagList("extractions", Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < extractions.tagCount(); i++)
{
NBTTagCompound dirTag = extractions.getCompoundTagAt(i);
this.extractions[dirTag.getByte("index")] = readDirectionFromNBT(dirTag);
}
this.isMaster = tag.getBoolean("master");
@ -153,7 +175,17 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
NBTTagCompound tag = new NBTTagCompound();
writeDirectionToNBT(tag, this.extract);
NBTTagList extractions = new NBTTagList();
for (int i = 0; i < 6; i++)
if (this.extractions[i] != null)
{
NBTTagCompound conn = new NBTTagCompound();
conn.setByte("index", (byte) i);
writeDirectionToNBT(conn, this.extractions[i]);
extractions.appendTag(conn);
}
NBTTagList connections = new NBTTagList();
@ -167,6 +199,7 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
connections.appendTag(conn);
}
tag.setTag("extractions", extractions);
tag.setTag("connections", connections);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tag);
@ -175,7 +208,16 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
{
this.extract = readDirectionFromNBT(packet.func_148857_g());
this.extractions = new ForgeDirection[6];
NBTTagList extractions = packet.func_148857_g().getTagList("extractions", Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < extractions.tagCount(); i++)
{
NBTTagCompound tag = extractions.getCompoundTagAt(i);
this.extractions[tag.getByte("index")] = readDirectionFromNBT(tag);
}
this.connections = new ForgeDirection[6];
@ -189,61 +231,114 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
}
}
public void changeExtracting()
@Override
public void changeExtraction()
{
if (!this.worldObj.isRemote)
{
if (this.extract != null)
for (int i = 0; i < 6; i++)
{
Coords temp = new Coords(this.xCoord + this.extract.offsetX, this.yCoord + this.extract.offsetY, this.zCoord + this.extract.offsetZ,
this.extract.getOpposite());
ForgeDirection dir = this.connections[i];
this.network.inputs.remove(temp);
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
if ((dir != null) && this.isEnergyHandler(dir))
{
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY,
this.zCoord + dir.offsetZ, dir.getOpposite());
this.extract = null;
}
else
for (ForgeDirection dir : this.connections)
if ((dir != null) && this.isEnergyHandler(dir))
if (this.extractions[i] == null)
{
this.extract = dir;
Coords temp = new Coords(this.xCoord + this.extract.offsetX, this.yCoord + this.extract.offsetY,
this.zCoord + this.extract.offsetZ, this.extract.getOpposite());
this.extractions[i] = dir;
this.network.outputs.remove(temp);
if (!this.network.inputs.contains(temp))
this.network.inputs.add(temp);
break;
}
else
{
this.extractions[i] = null;
this.network.inputs.remove(temp);
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
}
}
}
this.updateClientConnections();
}
}
@Override
public void changeExtraction(int dirIndex)
{
if (!this.worldObj.isRemote)
{
ForgeDirection dir = this.connections[dirIndex];
if (dir != null)
{
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY,
this.zCoord + dir.offsetZ, dir.getOpposite());
if (this.extractions[dirIndex] == null)
{
this.extractions[dirIndex] = this.connections[dirIndex];
this.network.outputs.remove(temp);
if (!this.network.inputs.contains(temp))
this.network.inputs.add(temp);
}
else
{
this.extractions[dirIndex] = null;
this.network.inputs.remove(temp);
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
}
this.updateClientConnections();
}
}
}
@Override
public ForgeDirection[] getExtractableConnections()
{
ForgeDirection[] extractableConnections = new ForgeDirection[6];
for(int i = 0;i < 6;i++)
{
ForgeDirection dir = this.connections[i];
if (dir != null && this.isEnergyHandler(dir))
extractableConnections[i] = dir;
}
return extractableConnections;
}
@Override
public ForgeDirection[] getExtractions()
{
return this.extractions;
}
private void removeConnections(int i)
{
if (this.connections[i] != null)
if (this.connections[i] != null && !this.worldObj.isRemote)
{
System.out.println("Removing connections 1...");
ForgeDirection dir = this.connections[i];
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ, dir.getOpposite());
this.network.outputs.remove(temp);
this.network.inputs.remove(temp);
if (this.connections[i] == this.extract)
{
this.network.inputs.remove(temp);
System.out.println("Removing extract...");
this.extract = null;
}
System.out.println("Removing connections 2...");
this.extractions[i] = null;
this.connections[i] = null;
}
}
@ -252,9 +347,6 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
if (!this.worldObj.isRemote)
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Updating connections...");
if (this.canConnect(ForgeDirection.DOWN))
{
if (!this.updateNetwork(ForgeDirection.DOWN))
@ -309,24 +401,20 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
else
this.removeConnections(5);
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Connections updated");
if (this.network == null)
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("This network null, creating a new one.");
this.network = new EnergyNetwork(1, this.wireCapacity, this.wireTransfer);
this.setMaster(this);
}
for (ForgeDirection dir : this.connections)
if ((dir != null) && this.isEnergyHandler(dir))
for (int i = 0;i < 6;i++)
{
ForgeDirection dir = this.connections[i];
if (dir != null && this.isEnergyHandler(dir))
{
Coords temp = new Coords(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ, dir.getOpposite());
if ((this.extract != dir) && (this.worldObj.getTileEntity(temp.x, temp.y, temp.z) instanceof IEnergyReceiver))
if (this.extractions[i] == null && (this.worldObj.getTileEntity(temp.x, temp.y, temp.z) instanceof IEnergyReceiver))
{
if (!this.network.outputs.contains(temp))
this.network.outputs.add(temp);
@ -334,9 +422,7 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
else if (!this.network.inputs.contains(temp) && (this.worldObj.getTileEntity(temp.x, temp.y, temp.z) instanceof IEnergyProvider))
this.network.inputs.add(temp);
}
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("This network" + this.network.toString());
}
this.updateClientConnections();
}
@ -344,9 +430,9 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
private void updateClientConnections()
{
if ((this.network != null) && !this.worldObj.isRemote)
if (this.network != null && !this.worldObj.isRemote)
{
InitPackets.network.sendToAllAround(new WirePacket(this.xCoord, this.yCoord, this.zCoord, this.connections, this.extract),
InitPackets.network.sendToAllAround(new WirePacket(this.xCoord, this.yCoord, this.zCoord, this.connections, this.extractions),
new TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 100));
}
}
@ -361,16 +447,10 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
if (wire.network != null) // Is null only on world load
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Wire network not null.");
if (!wire.network.equals(this.network))
{
if (this.network == null)
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Network null.");
this.setMaster(wire.getMaster());
this.network.changeSize(1);
@ -380,13 +460,8 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
int energy = this.network.buffer.getEnergyStored() + wire.network.buffer.getEnergyStored();
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Network not null.");
if (this.network.size > wire.network.size)
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("This network bigger.");
wire.setMaster(this.getMaster());
this.network.buffer.setEnergyStored(energy);
@ -396,8 +471,6 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
}
else
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("This network smaller.Updating connections again.");
this.setMaster(wire.getMaster());
this.network.buffer.setEnergyStored(energy);
@ -411,17 +484,11 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
}
else
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Same network.");
wire.updateOneConnection(dir.getOpposite());
}
}
else if (this.network != null)
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Wire network null, this network not null.");
wire.setMaster(this.getMaster());
this.network.changeSize(1);
wire.updateConnections();
@ -468,9 +535,6 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
{
if (this.network != null)
{
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Removing network.");
this.network.changeSize(-1);
if (this.network.size != 0)
@ -484,9 +548,6 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
TileCopperWire wire = (TileCopperWire) this.worldObj.getTileEntity(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY,
this.zCoord + dir.offsetZ);
System.out.print(this.xCoord + " " + this.yCoord + " " + this.zCoord);
System.out.println("Updating neighbors.");
wire.network.setSize(0);
wire.network = new EnergyNetwork(1, this.wireCapacity, this.wireTransfer);
@ -562,12 +623,11 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
@Override
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate)
{
if ((from != this.extract) && (this.network != null)) // should actively
// receive
// energy from
// where it is
// not actively
// pulling
for (ForgeDirection dir : this.extractions)
if (dir == from)
return 0;
if ((this.network != null)) // should actively receive energy from where it is not actively pulling
{
int amount = Math.min(maxReceive, this.wireTransfer);
@ -580,7 +640,11 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
@Override
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate)
{
if ((from != this.extract) && (this.network != null))
for (ForgeDirection dir : this.extractions)
if (dir == from)
return 0;
if ((this.network != null))
{
int amount = Math.min(maxExtract, this.wireTransfer);
@ -608,6 +672,18 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
return 0;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return new GuiChangeExtractions(world.getTileEntity(x, y, z), player.dimension);
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return new ContainerChangeExtractions();
}
private static class EnergyNetwork
{
private int capacityPerWire;
@ -640,9 +716,7 @@ public class TileCopperWire extends TileEntity implements IEnergyHandler
}
this.updateInputs(wire.worldObj);
// System.out.println("Buffer before: " + buffer.getEnergyStored());
this.updateOutputs(wire);
// System.out.println("Buffer after: " + buffer.getEnergyStored());
}
private void updateInputs(World world)

View File

@ -85,9 +85,12 @@ public class WorldGenSteamcraft implements IWorldGenerator
if (ConfigWorldGen.slateGenEnabled)
{
this.generateOre(world, random, chunkX, chunkZ, 1, 40, 70, ConfigWorldGen.slateCluster, InitBlocks.blockSlate, 0, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 40, 70, ConfigWorldGen.slateCluster, InitBlocks.blockSlate, 1, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 40, 70, ConfigWorldGen.slateCluster, InitBlocks.blockSlate, 2, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 10, 40, ConfigWorldGen.slateCluster, InitBlocks.blockSlate, 0, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 10, 40, ConfigWorldGen.slateCluster, InitBlocks.blockSlate, 1, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 10, 40, ConfigWorldGen.slateCluster, InitBlocks.blockSlate, 2, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 40, 70, ConfigWorldGen.slateCluster, InitBlocks.blockLightSlate, 0, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 40, 70, ConfigWorldGen.slateCluster, InitBlocks.blockLightSlate, 1, Blocks.stone);
this.generateOre(world, random, chunkX, chunkZ, 1, 40, 70, ConfigWorldGen.slateCluster, InitBlocks.blockLightSlate, 2, Blocks.stone);
}
if (ConfigWorldGen.brassTreeGenEnabled)

View File

@ -9,6 +9,7 @@ tile.blockMetal.4.name=Brass Block
tile.blockMetal.5.name=Bronze Block
tile.blockMetal.6.name=Steel Block
tile.blockMetal.7.name=Cast Iron Block
tile.blockMossyMetal.0.name=Mossy Aluminum Block
tile.blockMossyMetal.1.name=Mossy Copper Block
tile.blockMossyMetal.2.name=Mossy Tin Block
@ -17,6 +18,7 @@ tile.blockMossyMetal.4.name=Mossy Brass Block
tile.blockMossyMetal.5.name=Mossy Bronze Block
tile.blockMossyMetal.6.name=Mossy Steel Block
tile.blockMossyMetal.7.name=Mossy Cast Iron Block
tile.blockRustyMetal.0.name=Rusty Aluminum Block
tile.blockRustyMetal.1.name=Rusty Copper Block
tile.blockRustyMetal.2.name=Rusty Tin Block
@ -25,27 +27,67 @@ tile.blockRustyMetal.4.name=Rusty Brass Block
tile.blockRustyMetal.5.name=Rusty Bronze Block
tile.blockRustyMetal.6.name=Rusty Steel Block
tile.blockRustyMetal.7.name=Rusty Cast Iron Block
tile.blockMetalPlate.0.name=Aluminum Plating
tile.blockMetalPlate.1.name=Copper Plating
tile.blockMetalPlate.2.name=Tin Plating
tile.blockMetalPlate.3.name=Zinc Plating
tile.blockMetalPlate.4.name=Brass Plating
tile.blockMetalPlate.5.name=Bronze Plating
tile.blockMetalPlate.6.name=Steel Plating
tile.blockMetalPlate.7.name=Cast Iron Plating
tile.blockMossyMetalPlate.0.name=Mossy Aluminum Plating
tile.blockMossyMetalPlate.1.name=Mossy Copper Plating
tile.blockMossyMetalPlate.2.name=Mossy Tin Plating
tile.blockMossyMetalPlate.3.name=Mossy Zinc Plating
tile.blockMossyMetalPlate.4.name=Mossy Brass Plating
tile.blockMossyMetalPlate.5.name=Mossy Bronze Plating
tile.blockMossyMetalPlate.6.name=Mossy Steel Plating
tile.blockMossyMetalPlate.7.name=Mossy Cast Iron Plating
tile.blockRustyMetalPlate.0.name=Rusty Aluminum Plating
tile.blockRustyMetalPlate.1.name=Rusty Copper Plating
tile.blockRustyMetalPlate.2.name=Rusty Tin Plating
tile.blockRustyMetalPlate.3.name=Rusty Zinc Plating
tile.blockRustyMetalPlate.4.name=Rusty Brass Plating
tile.blockRustyMetalPlate.5.name=Rusty Bronze Plating
tile.blockRustyMetalPlate.6.name=Rusty Steel Plating
tile.blockRustyMetalPlate.7.name=Rusty Cast Iron Plating
tile.blockUranium.name=Uranium Block
tile.blockMetalLattice.0.name=Aluminum Lattice
tile.blockMetalLattice.1.name=Copper Lattice
tile.blockMetalLattice.2.name=Tin Lattice
tile.blockMetalLattice.3.name=Zinc Lattice
tile.blockMetalLattice.4.name=Brass Lattice
tile.blockMetalLattice.5.name=Bronze Lattice
tile.blockMetalLattice.6.name=Steel Lattice
tile.blockMetalLattice.7.name=Cast Iron Lattice
tile.blockBrassLog.name=Brass Plated Log
tile.blockBrassLeaves.name=Brass Leaves
tile.blockLamp.name=Lamp
tile.blockCastIronFence.name=Cast Iron Fence
tile.blockCastIronGate.name=Cast Iron Gate
tile.blockCastIronRailing.name=Cast Iron Railing
tile.blockEngravedSolid.0.name=Engraved Aluminum
tile.blockEngravedSolid.1.name=Engraved Copper
tile.blockEngravedSolid.2.name=Engraved Tin
tile.blockEngravedSolid.3.name=Engraved Zinc
tile.blockEngravedSolid.4.name=Engraved Brass
tile.blockEngravedSolid.5.name=Engraved Bronze
tile.blockEngravedSolid.6.name=Engraved Steel
tile.blockEngravedSolid.7.name=Engraved Cast Iron
tile.blockEngravedSolid.8.name=Engraved Uranium
tile.blockEngravedVanilla.0.name=Engraved Diamond
tile.blockEngravedVanilla.1.name=Engraved Gold
tile.blockEngravedVanilla.2.name=Engraved Iron
tile.blockEngravedVanilla.3.name=Engraved Lapis
tile.blockEngravedSolid.0.name=Engraved Aluminum Block
tile.blockEngravedSolid.1.name=Engraved Copper Block
tile.blockEngravedSolid.2.name=Engraved Tin Block
tile.blockEngravedSolid.3.name=Engraved Zinc Block
tile.blockEngravedSolid.4.name=Engraved Brass Block
tile.blockEngravedSolid.5.name=Engraved Bronze Block
tile.blockEngravedSolid.6.name=Engraved Steel Block
tile.blockEngravedSolid.7.name=Engraved Cast Iron Block
tile.blockEngravedSolid.8.name=Engraved Uranium Block
tile.blockEngravedVanilla.0.name=Engraved Diamond Block
tile.blockEngravedVanilla.1.name=Engraved Gold Block
tile.blockEngravedVanilla.2.name=Engraved Iron Block
tile.blockEngravedVanilla.3.name=Engraved Lapis Lazuli Block
tile.blockEngravedVanilla.4.name=Engraved Stone
tile.blockEngravedVanilla.5.name=Engraved Emerald Block
tile.blockEngravedVanilla.6.name=Engraved Redstone Block
tile.blockCastIronFence.name=Cast Iron Fence
tile.blockCastIronGate.name=Cast Iron Gate
tile.blockTeaPlant.name=Tea Plant
@ -54,6 +96,8 @@ tile.blockCastIronLampOn.name=Cast Iron Lamp (On)
tile.blockInvertedCastIronLampOff.name=Inverted Cast Iron Lamp
tile.blockInvertedCastIronLamp.name=Inverted Cast Iron Lamp (On)
tile.blockHatch.name=Steel Hatch
tile.blockMeltingIce.name=Melting Ice
tile.blockGhostIce.name=Ghost Ice
tile.blockSlate.0.name=Blue Slate
tile.blockSlate.1.name=Black Slate
tile.blockSlate.2.name=Red Slate
@ -72,6 +116,24 @@ tile.blockCobbleRedSlateStairs.name=Red Slate Cobblestone Stairs
tile.blockBrickBlueSlateStairs.name=Blue Slate Brick Stairs
tile.blockBrickBlackSlateStairs.name=Black Slate Brick Stairs
tile.blockBrickRedSlateStairs.name=Red Slate Brick Stairs
tile.blockLightSlate.0.name=Light Blue Slate
tile.blockLightSlate.1.name=Grey Slate
tile.blockLightSlate.2.name=Light Red Slate
tile.blockLightSlate.3.name=Light Blue Slate Cobblestone
tile.blockLightSlate.4.name=Grey Slate Cobblestone
tile.blockLightSlate.5.name=Light Red Slate Cobblestone
tile.blockLightSlate.6.name=Light Blue Slate Bricks
tile.blockLightSlate.7.name=Grey Slate Bricks
tile.blockLightSlate.8.name=Light Red Slate Bricks
tile.blockRawLightBlueSlateStairs.name=Light Blue Slate Raw Stairs
tile.blockRawGreySlateStairs.name=Grey Slate Raw Stairs
tile.blockRawLightRedSlateStairs.name=Light Red Slate Raw Stairs
tile.blockCobbleLightBlueSlateStairs.name=Light Blue Slate Cobblestone Stairs
tile.blockCobbleGreySlateStairs.name=Grey Slate Cobblestone Stairs
tile.blockCobbleLightRedSlateStairs.name=Light Red Slate Cobblestone Stairs
tile.blockBrickLightBlueSlateStairs.name=Light Blue Slate Brick Stairs
tile.blockBrickGreySlateStairs.name=Grey Slate Brick Stairs
tile.blockBrickLightRedSlateStairs.name=Light Red Slate Brick Stairs
tile.blockTimeBomb.name=Time Bomb
tile.blockFlesh.name=Block of Flesh
tile.blockCongealedSlime.name=Congealed Slime Block
@ -198,6 +260,7 @@ tile.blockRefinery.name=Refinery
tile.blockRefinery.desc=Refines blubber into whale oil.
tile.blockStasisField.name=Stasis Field
tile.blockStasisField.desc=Holds items within one block of it in a stasis field, preventing them despawning, consuming 10 RF/t per item. Warning! Items will almost instantly despawn when the field is removed.|Holds 50k RF.Transfer (in): 80 RF/t
tile.blockInjector.name=Injector/Extractor
#Fluids
tile.steamFluidBlock.name=Steam
@ -206,6 +269,13 @@ tile.boilingwaterFluidBlock.name=Boiling Water
fluid.boilingwaterFluid=Boiling Water
tile.boilingmudFluidBlock.name=Boiling Mud
fluid.boilingmudFluid=Boiling Mud
tile.whaleoilFluidBlock.name=Whale Oil
fluid.whaleoilFluid=Whale Oil
tile.moltenzincFluidBlock.name=Molten Zinc
fluid.moltenzincFluid=Molten Zinc
tile.moltenbrassFluidBlock.name=Molten Brass
fluid.moltenbrassFluid=Molten Brass
#Items
@ -257,11 +327,14 @@ item.itemNugget.4.name=Brass Nugget
item.itemNugget.5.name=Bronze Nugget
item.itemNugget.6.name=Steel Nugget
item.itemNugget.7.name=Cast Iron Nugget
item.itemNuggetIron.name=Iron Nugget
item.itemEmptyShieldedCanister.name=Empty Shielded Canister
item.itemFullShieldedCanister.name=Shielded Canister
item.itemBoilingWaterBucket.name=Boiling Water Bucket
item.itemMudBucket.name=Liquid Mud Bucket
item.itemWhaleOilBucket.name=Whale Oil Bucket
item.itemMoltenZincBucket.name=Molten Zinc Bucket
item.itemMoltenBrassBucket.name=Molten Brass Bucket
item.itemDimPocket.name=Transpatial Pouch
item.itemDimPocket.desc=Shove your items into the folds amidst space and time. Nothing can possibly go wrong...probably.
item.itemWhalebone.name=Whalebone
@ -582,13 +655,6 @@ biome.steamcraft2.innerearth.jungle.name=Dense Jungle
biome.steamcraft2.innerearth.swamp.name=Swampy Forest
biome.steamcraft2.innerearth.scorched.name=Scorched Lands
#Entities
entity.steamcraft2.grub.name=Grub
entity.steamcraft2.lostminer.name=Lost Miner
entity.steamcraft2.ghostspider.name=Ghost Spider
entity.steamcraft2.vampirebat.name=Vampire Bat
entity.steamcraft2.boar.name=Boar
#Keys
key.steamcraft.category=
key.vanity.desc=Open Vanity Inventory
@ -626,3 +692,25 @@ item.itemDrillSteam.documentation=This is a drill that runs on Steam provided by
item.itemSwordSteam.documentation=A powerful sword that runs on Steam Canisters.
item.itemShovelSteam.documentation=A quick shovel that runs on Steam Canisters.
#Entities
entity.steamcraft2.FleshGolem.name=Flesh Golem
entity.steamcraft2.Grub.name=Grub
entity.steamcraft2.LostMiner.name=Lost Miner
entity.steamcraft2.Boar.name=Boar
entity.steamcraft2.VampireBat.name=Vampire Bat
entity.steamcraft2.GhostSpider.name=Ghost Spider
entity.steamcraft2.GiantSpider.name=Giant Spider
entity.steamcraft2.SpiderQueen.name=Spider Queen
entity.steamcraft2.ShroomZombie.name=Zombishroom
entity.steamcraft2.ShroomSkeleton.name=Skeleshroom
entity.steamcraft2.AbandonedGolem.name=Abandoned Golem
entity.steamcraft2.Whale.name=Whale
entity.steamcraft2.Bullet.name=Bullet
entity.steamcraft2.Rocket.name=Rocket
entity.steamcraft2.SplashLightningBottle.name=Lightning Bottle
entity.steamcraft2.FieldManipulator.name=Field Manipulator
entity.steamcraft2.TimeBomb.name=Time Bomb
entity.steamcraft2.FallingBoulder.name=Falling Boulder

View File

@ -1,116 +1,97 @@
{
"drill.steam":
{
"drill.steam": {
"category": "block",
"sounds":
[
"sounds": [
"drill"
]
},
"raygun":
{
"raygun": {
"category": "block",
"sounds":
[
"sounds": [
"raygun"
]
},
"musket":
{
"musket": {
"category": "block",
"sounds":
[
"sounds": [
"musket"
]
},
"rifle":
{
"rifle": {
"category": "block",
"sounds":
[
"sounds": [
"rifle"
]
},
"reload":
{
"reload": {
"category": "block",
"sounds":
[
"sounds": [
"reload"
]
},
"rocket":
{
"rocket": {
"category": "block",
"sounds":
[
"sounds": [
"rocket"
]
},
"hitflesh":
{
"hitflesh": {
"category": "block",
"sounds":
[
"sounds": [
"hitflesh"
]
},
"hitblock":
{
"hitblock": {
"category": "block",
"sounds":
[
"sounds": [
"hitblock"
]
},
"warp":
{
"warp": {
"category": "block",
"sounds":
[
"sounds": [
"warp"
]
},
"allclear":
{
"allclear": {
"category": "block",
"sounds":
[
"sounds": [
"allclear"
]
},
"intruderalert":
{
"intruderalert": {
"category": "block",
"sounds":
[
"sounds": [
"intruderalert"
]
},
"nuclearalarm":
{
"nuclearalarm": {
"category": "block",
"sounds":
[
"sounds": [
"nuclearalarm"
]
},
"standard":
{
"standard": {
"category": "block",
"sounds":
[
"sounds": [
"standard"
]
},
"intake": {
"category": "block",
"sounds": [
"intake"
]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Some files were not shown because too many files have changed in this diff Show More