コード例 #1
0
 public GuiHotBarSpace(int index, ItemStack selectedTile, Keys trigger)
     : base(1, 1)
 {
     this.index = index;
     this.trigger = trigger;
     setItemStack(selectedTile, 0, 0);
 }
コード例 #2
0
 public void setItemStack(ItemStack stack, int x, int y)
 {
     if (x < 0 || x >= width || y < 0 || y >= height)
     {
         Console.WriteLine("Cannot set itemstack! Coordinates, " + x + ", " + y + " out of bounds!");
         return;
     }
     spaces[x + y * width] = stack;
 }