mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
scream for cream
This commit is contained in:
parent
32df415e58
commit
d75c6dee13
BIN
src/main/java/assets/hbm/textures/items/tablet.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/tablet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 246 B |
@ -747,7 +747,7 @@ public class ModBlocks {
|
||||
public static final int guiID_keyforge = 67;
|
||||
|
||||
public static Block machine_armor_table;
|
||||
public static final int guiID_armor_taable = 67;
|
||||
public static final int guiID_armor_table = 102;
|
||||
|
||||
public static Block machine_reactor_small;
|
||||
public static final int guiID_reactor_small = 65;
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -44,6 +47,7 @@ public class BlockArmorTable extends Block {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_armor_table, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -914,6 +914,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_armor_table:
|
||||
{
|
||||
if(world.getBlock(x, y, z) == ModBlocks.machine_armor_table)
|
||||
{
|
||||
return new ContainerArmorTable(player.inventory);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//NON-TE CONTAINERS
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryBasic;
|
||||
import net.minecraft.inventory.InventoryCraftResult;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerArmorTable extends Container {
|
||||
|
||||
public InventoryBasic upgrades = new InventoryBasic("Upgrades", false, 8);
|
||||
public IInventory armor = new InventoryCraftResult();
|
||||
|
||||
public ContainerArmorTable(InventoryPlayer inventory) {
|
||||
|
||||
this.addSlotToContainer(new Slot(upgrades, 0, 26, 27)); //helmet only
|
||||
this.addSlotToContainer(new Slot(upgrades, 1, 62, 27)); //chestplate only
|
||||
this.addSlotToContainer(new Slot(upgrades, 2, 98, 27)); //leggins only
|
||||
this.addSlotToContainer(new Slot(upgrades, 3, 134, 45)); //boots only
|
||||
this.addSlotToContainer(new Slot(upgrades, 4, 134, 81)); //servos/frame
|
||||
this.addSlotToContainer(new Slot(upgrades, 5, 98, 99)); //radiation cladding
|
||||
this.addSlotToContainer(new Slot(upgrades, 6, 62, 99)); //kevlar/sapi/(ERA? :) )
|
||||
this.addSlotToContainer(new Slot(upgrades, 7, 26, 99)); //explosive/heavy plating
|
||||
|
||||
this.addSlotToContainer(new Slot(armor, 0, 44, 36) {
|
||||
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return stack.getItem() instanceof ItemArmor;
|
||||
}
|
||||
});
|
||||
|
||||
this.onCraftMatrixChanged(this.upgrades);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user