Fixed issue with TransactorSided.java.

This commit is contained in:
SirSengir 2012-09-08 17:58:53 +02:00
parent 2df33ac081
commit 6576f72cb4
2 changed files with 6 additions and 3 deletions

View file

@ -18,7 +18,7 @@
<property name="mcp.version" value="72"/>
<property name="forge.version" value="4.0.0.232"/>
<property name="bc.version" value="3.2.0"/>
<property name="bc.version.full" value="${bc.version}pre3"/>
<property name="bc.version.full" value="${bc.version}pre4"/>
<echo message="Starting build for ${bc.version.full}"/>

View file

@ -16,8 +16,11 @@ public class TransactorSided extends TransactorSimple {
@Override
protected int getPartialSlot(ItemStack stack, Orientations orientation, int skipAhead) {
if(skipAhead < sided.getStartInventorySide(orientation.toDirection())
|| skipAhead > sided.getStartInventorySide(orientation.toDirection()) + sided.getSizeInventorySide(orientation.toDirection()))
// If skipAhead is below the minimum required, we skip ahead to the first valid slot.
if(skipAhead < sided.getStartInventorySide(orientation.toDirection()))
skipAhead = sided.getStartInventorySide(orientation.toDirection());
if(skipAhead > sided.getStartInventorySide(orientation.toDirection()) + sided.getSizeInventorySide(orientation.toDirection()))
return -1;
return getPartialSlot(stack, skipAhead, sided.getStartInventorySide(orientation.toDirection()) + sided.getSizeInventorySide(orientation.toDirection()));