mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-29 18:28:34 +01:00
Fixed Shift Click Duplication Bugs.
Closes https://github.com/Ellpeck/ActuallyAdditions/issues/10
This commit is contained in:
parent
1f9ce8cc77
commit
36d3d7f79f
4 changed files with 9 additions and 8 deletions
|
@ -54,7 +54,7 @@ public class ContainerBreaker 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(!this.mergeItemStack(newStack, 0, 10, false)){
|
if(!this.mergeItemStack(newStack, 0, 9, false)){
|
||||||
//
|
//
|
||||||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class ContainerDropper 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(!this.mergeItemStack(newStack, 0, 10, false)){
|
if(!this.mergeItemStack(newStack, 0, 9, false)){
|
||||||
//
|
//
|
||||||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ContainerGrinder extends Container{
|
||||||
ItemStack currentStack = newStack.copy();
|
ItemStack currentStack = newStack.copy();
|
||||||
|
|
||||||
//Slots in Inventory to shift from
|
//Slots in Inventory to shift from
|
||||||
if(slot == TileEntityGrinder.SLOT_OUTPUT_1_1 || slot == TileEntityGrinder.SLOT_OUTPUT_1_2 || slot == TileEntityGrinder.SLOT_OUTPUT_2_1 || slot == TileEntityGrinder.SLOT_OUTPUT_2_2){
|
if(slot == TileEntityGrinder.SLOT_OUTPUT_1_1 || slot == TileEntityGrinder.SLOT_OUTPUT_1_2 || (this.isDouble && (slot == TileEntityGrinder.SLOT_OUTPUT_2_1 || slot == TileEntityGrinder.SLOT_OUTPUT_2_2))){
|
||||||
if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, true)) return null;
|
if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, true)) return null;
|
||||||
theSlot.onSlotChange(newStack, currentStack);
|
theSlot.onSlotChange(newStack, currentStack);
|
||||||
}
|
}
|
||||||
|
@ -68,9 +68,10 @@ public class ContainerGrinder extends Container{
|
||||||
//Shift from Inventory
|
//Shift from Inventory
|
||||||
if(CrusherRecipeManualRegistry.getOutput(newStack, false) != null){
|
if(CrusherRecipeManualRegistry.getOutput(newStack, false) != null){
|
||||||
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_1, TileEntityGrinder.SLOT_INPUT_1+1, false)){
|
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_1, TileEntityGrinder.SLOT_INPUT_1+1, false)){
|
||||||
if(this.tileGrinder.isDouble){
|
if(this.isDouble){
|
||||||
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_2, TileEntityGrinder.SLOT_INPUT_2+1, false)) return null;
|
if(!this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_2, TileEntityGrinder.SLOT_INPUT_2+1, false)) return null;
|
||||||
}
|
}
|
||||||
|
else return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class ContainerPhantomPlacer 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(!this.mergeItemStack(newStack, 0, 10, false)){
|
if(!this.mergeItemStack(newStack, 0, 9, false)){
|
||||||
//
|
//
|
||||||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)) return null;
|
||||||
|
|
Loading…
Reference in a new issue