mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
#520 Alloy Smelter upgrade breaks ME interface 'blocking mode'
#519 Can't shift-wrench to pick up certain TE blocks Mereged from 1.6,4
This commit is contained in:
commit
3ed9e6c399
3 files changed
+12
-4
No files matched your search
@@ -47,7 +47,7 @@ public class ItemYetaWrench extends Item implements IToolWrench {
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if(block != null && block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side))) {
|
||||
if(block != null && block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)) && !player.isSneaking()) {
|
||||
player.swingItem();
|
||||
return !world.isRemote;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,13 @@ public abstract class AbstractPoweredTaskEntity extends AbstractMachineEntity im
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int var1) {
|
||||
int[] res = new int[inventory.length];
|
||||
for (int i = 0; i < res.length; i++) {
|
||||
res[i] = i;
|
||||
int[] res = new int[inventory.length - slotDefinition.getNumUpgradeSlots()];
|
||||
int index = 0;
|
||||
for (int i = 0; i < inventory.length; i++) {
|
||||
if(!slotDefinition.isUpgradeSlot(i)) {
|
||||
res[index] = i;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,10 @@ public class SlotDefinition {
|
||||
return slot >= minOutputSlot && slot <= maxOutputSlot;
|
||||
}
|
||||
|
||||
public int getNumUpgradeSlots() {
|
||||
return Math.max(0, maxUpgradeSlot - minUpgradeSlot + 1);
|
||||
}
|
||||
|
||||
public int getNumInputSlots() {
|
||||
return Math.max(0, maxInputSlot - minInputSlot + 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user