backport potential bugfix from 7.2.x branch
This commit is contained in:
parent
b429080afc
commit
e853ceb5d6
|
@ -1,4 +1,5 @@
|
|||
Bugs fixed:
|
||||
|
||||
* [#3839] Attempt to work around potential world corruption?
|
||||
* [#3837] Oil spawn in mid-air on superflat, f
|
||||
* [#3837] Oil spawn in mid-air on superflat
|
||||
* Potential direction statement parameter crash in gate GUI
|
|
@ -50,7 +50,12 @@ public class StatementParameterDirection implements IStatementParameter {
|
|||
public void onClick(IStatementContainer source, IStatement stmt, ItemStack stack, StatementMouseClick mouse) {
|
||||
if (source.getTile() instanceof IPipeTile) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
direction = ForgeDirection.getOrientation((direction.ordinal() + (mouse.getButton() > 0 ? -1 : 1)) % 6);
|
||||
int dir = (direction.ordinal() + (mouse.getButton() > 0 ? -1 : 1)) % 6;
|
||||
if (dir < 0) {
|
||||
dir += 6;
|
||||
}
|
||||
|
||||
direction = ForgeDirection.getOrientation(dir);
|
||||
if (((IPipeTile) source.getTile()).isPipeConnected(direction)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue