コード例 #1
0
 @Override
 public void rotateGrid(EntityPlayer entityPlayer, Container container, int id) {
   try {
     IInventory craftMatrix = (IInventory) crafterField.get(container);
     defaultProvider.rotateGrid(
         entityPlayer, container, craftMatrix, 0, 9, defaultProvider.getRotationHandler());
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   }
 }
コード例 #2
0
 @Override
 public void balanceGrid(EntityPlayer entityPlayer, Container container, int id) {
   try {
     IInventory craftMatrix = (IInventory) craftMatrixField.get(container);
     defaultProvider.balanceGrid(entityPlayer, container, craftMatrix);
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   }
 }
コード例 #3
0
 @Override
 public ItemStack putIntoGrid(
     EntityPlayer entityPlayer, Container container, int id, ItemStack itemStack, int index) {
   try {
     IInventory craftMatrix = (IInventory) craftMatrixField.get(container);
     return defaultProvider.putIntoGrid(entityPlayer, container, craftMatrix, itemStack, index);
   } catch (IllegalAccessException e) {
     e.printStackTrace();
     return itemStack;
   }
 }
コード例 #4
0
 @Override
 public ItemStack transferIntoGrid(
     EntityPlayer entityPlayer, Container container, int id, ItemStack itemStack) {
   try {
     IInventory craftMatrix =
         (IInventory) getCraftingInventory.invoke(tileEntityField.get(container));
     return defaultProvider.transferIntoGrid(entityPlayer, container, craftMatrix, itemStack);
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   } catch (InvocationTargetException e) {
     e.printStackTrace();
   }
   return itemStack;
 }