Skip to content

Commit

Permalink
Initial exosuit recipes and modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
mDiyo committed Jan 2, 2014
1 parent 37f48e6 commit 79e46cb
Show file tree
Hide file tree
Showing 45 changed files with 1,534 additions and 348 deletions.
45 changes: 45 additions & 0 deletions resources/assets/tinker/lang/en_US.lang
Expand Up @@ -6,6 +6,7 @@ crafters.ToolStation=Tool Station
crafters.ToolForge=Tool Forge
crafters.PartBuilder=Part Builder
crafters.PatternShaper=Stencil Table
crafters.TinkerTable=Tinker Table
inventory.PatternChest=Pattern Chest
crafters.Smeltery=Smeltery
crafters.Frypan=Frying Pan
Expand Down Expand Up @@ -604,6 +605,8 @@ achievement.tconstruct.preparedFight.desc=Create your first weapon
achievement.tconstruct.enemySlayer.desc=Slay a mob
achievement.tconstruct.dualConvenience.desc=Kill a mob with a frying pan, and then cook their meat in it

armortype.ExoArmor=Exosuit

knapsack.tooltip=A Knapsack to hold your things.
strangefood1.tooltip=It smells terrible, but if you
strangefood2.tooltip=have nothing else to eat...
Expand Down Expand Up @@ -670,3 +673,45 @@ smeltery.drain.tooltip1=Works both as input and output for
smeltery.drain.tooltip2=fluids in the Smeltery
smeltery.brick.tooltip1=Smeltery structure block
smeltery.brick.tooltip2=(Safe for decoration)

gui.smeltery1=Fuel
gui.landmine=Landmine
gui.partcrafter1=Tool Part Crafting
gui.partcrafter2=Tool Part Building
gui.partcrafter3=Place a pattern and a material on the left to get started.
gui.partcrafter4=Base Durability:
gui.partcrafter5=Handle Modifier:
gui.partcrafter6=Mining Speed:
gui.partcrafter7=Mining Level:
gui.partcrafter8=Mining Level:
gui.partcrafter9= Heart
gui.partcrafter10= Hearts
gui.partcrafter11=Attack:
gui.partcrafter.mining1=Stone
gui.partcrafter.mining2=Iron
gui.partcrafter.mining3=Redstone
gui.partcrafter.mining4=Obsidian
gui.partcrafter.mining5=Cobalt
gui.partcrafter.mining6=Manyullyn
gui.stenciltable1=Next Pattern
gui.stenciltable2=Previous Pattern
gui.toolforge1=Repair and Modification
gui.toolforge2=The main way to repair or change your tools. Place a tool and a material on the left to get started.
gui.toolstation1=Durability:
gui.toolstation2=Durability:
gui.toolstation3=Attack:
gui.toolstation4=Bonus:
gui.toolstation5=Loss:
gui.toolstation6=Draw Speed:
gui.toolstation7=Arrow Speed:
gui.toolstation8=Weight:
gui.toolstation9=Accuracy:
gui.toolstation10=Base Attack:
gui.toolstation11=Shortbow Attack:
gui.toolstation12=Mining Speeds:
gui.toolstation13=Harvest Levels:
gui.toolstation14=Mining Speed:
gui.toolstation15=Mining Level:
gui.toolstation16=Usage Speed:
gui.toolstation17=Modifiers
gui.toolstation18=Modifiers remaining:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/tconstruct/TConstruct.java
Expand Up @@ -32,7 +32,7 @@
* @author mDiyo
*/

@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.X_1.5.2.1", dependencies = "required-after:Forge@[8.9,);after:ForgeMultipart;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.X_1.5.3dev", dependencies = "required-after:Forge@[8.9,);after:ForgeMultipart;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tconstruct.util.network.TPacketHandler.class)
public class TConstruct
{
Expand Down
5 changes: 3 additions & 2 deletions src/tconstruct/blocks/CraftingStationBlock.java
Expand Up @@ -82,13 +82,14 @@ public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, in
@Override
public TileEntity createTileEntity (World world, int metadata)
{
switch (metadata)
return new CraftingStationLogic();
/*switch (metadata)
{
case 0:
return new CraftingStationLogic();
default:
return null;
}
}*/
}

@Override
Expand Down
62 changes: 55 additions & 7 deletions src/tconstruct/blocks/logic/CraftingStationLogic.java
@@ -1,32 +1,80 @@
package tconstruct.blocks.logic;

import net.minecraft.item.ItemStack;

import net.minecraft.inventory.ISidedInventory;
import java.lang.ref.WeakReference;

import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.world.World;
import tconstruct.inventory.CraftingStationContainer;
import tconstruct.library.blocks.InventoryLogic;

public class CraftingStationLogic extends InventoryLogic implements ISidedInventory
{
public WeakReference<IInventory> chest; //TODO: These are prototypes
public WeakReference<IInventory> doubleChest;
public WeakReference<IInventory> patternChest;
public WeakReference<IInventory> furnace;
public boolean tinkerTable;
public boolean stencilTable;

public CraftingStationLogic()
{
super(11); //9 for crafting, 1 for output, 1 for plans
super(17); //9 for crafting, 1 for output, 6 for extensions, 1 for plans
}

@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z)
{
chest = null;
doubleChest = null;
patternChest = null;
furnace = null;
tinkerTable = false;
for (int yPos = y - 1; yPos <= y + 1; yPos++)
{
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
TileEntity tile = world.getBlockTileEntity(xPos, yPos, zPos);
if (chest == null && tile instanceof TileEntityChest)
{
chest = new WeakReference(tile);
checkForChest(world, xPos + 1, yPos, zPos);
checkForChest(world, xPos - 1, yPos, zPos);
checkForChest(world, xPos, yPos, zPos + 1);
checkForChest(world, xPos, yPos, zPos - 1);
}
else if (patternChest == null && tile instanceof PatternChestLogic)
patternChest = new WeakReference(tile);
else if (furnace == null && (tile instanceof TileEntityFurnace || tile instanceof FurnaceLogic))
furnace = new WeakReference(tile);
else if (tinkerTable == false && tile instanceof ToolStationLogic)
tinkerTable = true;
}
}
}

return new CraftingStationContainer(inventoryplayer, this, x, y, z);
}

void checkForChest (World world, int x, int y, int z)
{
TileEntity tile = world.getBlockTileEntity(x, y, z);
if (tile instanceof TileEntityChest)
doubleChest = new WeakReference(tile);
}

@Override
protected String getDefaultName ()
{
return "crafters.craftingstation";
return "crafters.CraftingStation";
}

public boolean canDropInventorySlot (int slot)
Expand All @@ -39,7 +87,7 @@ public boolean canDropInventorySlot (int slot)
@Override
public int[] getAccessibleSlotsFromSide (int var1)
{
return new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
return new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
}

@Override
Expand All @@ -51,6 +99,6 @@ public boolean canInsertItem (int i, ItemStack itemstack, int j)
@Override
public boolean canExtractItem (int i, ItemStack itemstack, int j)
{
return i != 0;
return true;
}
}
2 changes: 1 addition & 1 deletion src/tconstruct/client/TProxyClient.java
Expand Up @@ -85,7 +85,7 @@ public Object getClientGuiElement (int ID, EntityPlayer player, World world, int
if (ID == landmineID)
return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.getBlockTileEntity(x, y, z)));
if (ID == craftingStationID)
return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), x, y, z);
return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);

if (ID == furnaceID)
return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z));
Expand Down

0 comments on commit 79e46cb

Please sign in to comment.