Fixed a Shift Clicking Bug with the Fermenting Barrel.

Whoops!
This commit is contained in:
Ellpeck 2015-08-02 18:04:09 +02:00
parent 3aee77ad01
commit a622690939

View file

@ -43,7 +43,7 @@ public class ContainerFermentingBarrel extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 3; final int inventoryStart = 4;
final int inventoryEnd = inventoryStart+26; final int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; final int hotbarEnd = hotbarStart+8;
@ -57,11 +57,11 @@ public class ContainerFermentingBarrel extends Container{
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if(slot >= inventoryStart){ if(slot >= inventoryStart){
//Shift from Inventory //Shift from Inventory
if(FluidContainerRegistry.getContainerCapacity(new FluidStack(InitBlocks.fluidOil, 1), newStack) > 0){ if(FluidContainerRegistry.containsFluid(newStack, new FluidStack(InitBlocks.fluidCanolaOil, 1))){
if(!this.mergeItemStack(newStack, 3, 4, false)) return null; if(!this.mergeItemStack(newStack, 0, 1, false)) return null;
} }
else if(FluidContainerRegistry.containsFluid(newStack, new FluidStack(InitBlocks.fluidCanolaOil, 1))){ else if(FluidContainerRegistry.getContainerCapacity(new FluidStack(InitBlocks.fluidOil, 1), newStack) > 0){
if(!this.mergeItemStack(newStack, 1, 2, false)) return null; if(!this.mergeItemStack(newStack, 2, 3, false)) return null;
} }
// //