OSDN Git Service

guiの微調整 タブの同期
[chemicraft/chemicraft.git] / common / chemicraft / TileEntityScienceCraftingTable.java
index 428b675..243ddd2 100644 (file)
@@ -12,137 +12,130 @@ import net.minecraftforge.common.ISidedInventory;
 
 public class TileEntityScienceCraftingTable extends TileEntity implements IInventory, ISidedInventory {
 
 
 public class TileEntityScienceCraftingTable extends TileEntity implements IInventory, ISidedInventory {
 
-       /**
-        * InventorySlotのItemStack配列
-        */
-       private ItemStack[] inventory = new ItemStack[17];
+    /**
+     * InventorySlotのItemStack配列
+     */
+    private ItemStack[] inventory = new ItemStack[17];
 
 
+    /**
+     * ActiveなTabの名前
+     */
+    private String activeTab;
 
 
-       /**
-        * ActiveなTabの名前
-        */
-       private String activeTab;
 
 
+    public TileEntityScienceCraftingTable() {
+       super();
+       // ActiveTabのデフォルトを設定
+       this.activeTab = "Decomposition";
+    }
 
 
 
 
-       public TileEntityScienceCraftingTable() {
-               super();
-               //ActiveTabのデフォルトを設定
-               this.activeTab = "Decomposition";
-       }
+    @Override
+    public void updateEntity() {
+       super.updateEntity();
+    }
 
 
 
 
-       @Override
-       public void updateEntity() {
-               super.updateEntity();
-               System.out.println(this.activeTab);
-       }
+    @Override
+    public void readFromNBT(NBTTagCompound par1) {
+       super.readFromNBT(par1);
+       this.activeTab = par1.getString("activeTab");
+    }
 
 
 
 
-       @Override
-       public void readFromNBT(NBTTagCompound par1) {
-               super.readFromNBT(par1);
-               this.activeTab = par1.getString("activeTab");
-       }
+    @Override
+    public void writeToNBT(NBTTagCompound par1) {
+       super.writeToNBT(par1);
+       par1.setString("activeTab", this.activeTab);
+    }
 
 
 
 
-       @Override
-       public void writeToNBT(NBTTagCompound par1) {
-               super.writeToNBT(par1);
-               par1.setString("activeTab", this.activeTab);
-       }
+    public String getActiveTab() {
+       return this.activeTab;
+    }
 
 
 
 
-       public String getActiveTab(){
-               return this.activeTab;
-       }
+    public void setActiveTab(String activeTab) {
+       this.activeTab = activeTab;
+    }
 
 
 
 
-       public void setActiveTab(String activeTab){
-               PacketDispatcher.sendPacketToServer(this.getDescriptionPacket());
-               this.activeTab = activeTab;
-       }
+    @Override
+    public int getSizeInventory() {
+       return inventory.length;
+    }
 
 
 
 
-       @Override
-       public int getSizeInventory() {
-               return inventory.length;
-       }
+    @Override
+    public ItemStack getStackInSlot(int var1) {
+       return inventory[var1];
+    }
 
 
 
 
-       @Override
-       public ItemStack getStackInSlot(int var1) {
-               return inventory[var1];
-       }
+    @Override
+    public ItemStack decrStackSize(int var1, int var2) {
+       return null;
+    }
 
 
 
 
-       @Override
-       public ItemStack decrStackSize(int var1, int var2) {
-               return null;
-       }
+    @Override
+    public ItemStack getStackInSlotOnClosing(int var1) {
+       return null;
+    }
 
 
 
 
-       @Override
-       public ItemStack getStackInSlotOnClosing(int var1) {
-               return null;
-       }
+    @Override
+    public void setInventorySlotContents(int var1, ItemStack var2) {
+    }
 
 
 
 
-       @Override
-       public void setInventorySlotContents(int var1, ItemStack var2) {
-       }
+    @Override
+    public String getInvName() {
+       return null;
+    }
 
 
 
 
-       @Override
-       public String getInvName() {
-               return null;
-       }
+    @Override
+    public int getInventoryStackLimit() {
+       return 64;
+    }
 
 
 
 
-       @Override
-       public int getInventoryStackLimit() {
-               return 64;
-       }
+    @Override
+    public boolean isUseableByPlayer(EntityPlayer var1) {
+       return false;
+    }
 
 
 
 
-       @Override
-       public boolean isUseableByPlayer(EntityPlayer var1) {
-               return false;
-       }
+    @Override
+    public void openChest() {
+    }
 
 
 
 
-       @Override
-       public void openChest() {
-       }
+    @Override
+    public void closeChest() {
+    }
 
 
 
 
-       @Override
-       public void closeChest() {
-       }
+    @Override
+    public Packet getDescriptionPacket() {
+       return PacketHandler.getPacket(this);
+    }
 
 
 
 
-       @Override
-       public Packet getDescriptionPacket() {
-               return PacketHandler.getPacket(this);
-       }
+    public void handlePacket(Object[] data) {
+       this.activeTab = (String) data[0];
+    }
 
 
 
 
-<<<<<<< HEAD
-=======
-       public void handlePacket(Object[] data) {
-           this.activeTab = (String) data[0];
-       }
+    @Override
+    public int getStartInventorySide(ForgeDirection side) {
+       return 0;
+    }
 
 
->>>>>>> 820e884ca2933199d4be03f7de49a491a7f9e93e
 
 
-       @Override
-       public int getStartInventorySide(ForgeDirection side) {
-               return 0;
-       }
-
-
-       @Override
-       public int getSizeInventorySide(ForgeDirection side) {
-               return 0;
-       }
+    @Override
+    public int getSizeInventorySide(ForgeDirection side) {
+       return 0;
+    }
 }
 }