Merge fixes
This commit is contained in:
@@ -34,7 +34,6 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.api.implementations.TransitionResult;
|
||||
import appeng.api.implementations.items.ISpatialStorageCell;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.IGrid;
|
||||
@@ -137,14 +136,18 @@ public class SpatialIOPortBlockEntity extends AENetworkInvBlockEntity implements
|
||||
if (Math.abs(pr - req) < req * 0.001) {
|
||||
final MENetworkEvent res = gi.postEvent(new MENetworkSpatialEvent(this, req));
|
||||
if (!res.isCanceled()) {
|
||||
int playerId = -1;
|
||||
// Prefer player id from security system, but if unavailable, use the
|
||||
// player who placed the grid node (if any)
|
||||
int playerId;
|
||||
if (this.getProxy().getSecurity().isAvailable()) {
|
||||
playerId = this.getProxy().getSecurity().getOwner();
|
||||
} else {
|
||||
playerId = this.getProxy().getNode().getPlayerID();
|
||||
}
|
||||
|
||||
final TransitionResult tr = sc.doSpatialTransition(cell, serverWorld, spc.getMin(),
|
||||
spc.getMax(), playerId);
|
||||
if (tr.success) {
|
||||
boolean success = sc.doSpatialTransition(cell, serverWorld, spc.getMin(), spc.getMax(),
|
||||
playerId);
|
||||
if (success) {
|
||||
energy.extractAEPower(req, Actionable.MODULATE, PowerMultiplier.CONFIG);
|
||||
this.inv.setInvStack(0, ItemStack.EMPTY, Simulation.ACTION);
|
||||
this.inv.setInvStack(1, cell, Simulation.ACTION);
|
||||
|
||||
Reference in New Issue
Block a user