Skip to content

Instantly share code, notes, and snippets.

@dha-lo-jd
Last active January 1, 2016 00:49
Show Gist options
  • Save dha-lo-jd/8069429 to your computer and use it in GitHub Desktop.
Save dha-lo-jd/8069429 to your computer and use it in GitHub Desktop.
マイクラのコードのこういうとこが許せない的な
protected Slot addSlotToContainer(Slot par1Slot)
{
par1Slot.slotNumber = this.inventorySlots.size();
this.inventorySlots.add(par1Slot); // !?
this.inventoryItemStacks.add((Object)null);
return par1Slot;
}
public Slot getSlot(int par1)
{
/*
* 見た目同じ場所のスロットを取り出す時にチェストとかまどでスロット番号が違う!死ね!
*/
return (Slot)this.inventorySlots.get(par1);
}
this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17));
this.addSlotToContainer(new Slot(par2TileEntityFurnace, 1, 56, 53));
this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 2, 116, 35));
int i;
for (i = 0; i < 3; ++i)
{
for (int j = 0; j < 9; ++j)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for (l = 0; l < 3; ++l)
{
for (i1 = 0; i1 < 3; ++i1)
{
this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 3, 30 + i1 * 18, 17 + l * 18));
}
}
for (l = 0; l < 3; ++l)
{
for (i1 = 0; i1 < 9; ++i1)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment