Merge branch 'nightly' of github.com:BuildCraft/BuildCraft into nightly

This commit is contained in:
SpaceToad 2014-01-11 10:47:32 +01:00
commit 7e4b66c127

View file

@ -115,7 +115,9 @@ public class ContainerGateInterface extends BuildCraftContainer {
}
@Override
public boolean canInteractWith(EntityPlayer entityplayer) {
public boolean canInteractWith(EntityPlayer player) {
if (pipe == null || pipe.gate == null)
return false;
return true;
}
@ -176,14 +178,14 @@ public class ContainerGateInterface extends BuildCraftContainer {
setAction(position, ActionManager.actions.get(data.readUTF()), notify);
ItemStack parameter = Packet.readItemStack(data);
if(parameter != null) {
if (parameter != null) {
ITriggerParameter param = new TriggerParameter();
param.set(parameter);
setTriggerParameter(position, param, notify);
} else {
setTriggerParameter(position, null, notify);
}
} catch(IOException e) {
} catch (IOException e) {
e.printStackTrace();
}
}
@ -389,10 +391,14 @@ public class ContainerGateInterface extends BuildCraftContainer {
}
public boolean isNearbyTriggerActive(ITrigger trigger, ITriggerParameter parameter) {
if (pipe.gate == null)
return false;
return pipe.gate.isNearbyTriggerActive(trigger, parameter);
}
public void setTrigger(int position, ITrigger trigger, boolean notify) {
if (pipe.gate == null)
return;
pipe.gate.setTrigger(position, trigger);
if (CoreProxy.proxy.isRenderWorld(pipe.container.worldObj) && notify) {
sendSelectionChange(position);
@ -400,6 +406,8 @@ public class ContainerGateInterface extends BuildCraftContainer {
}
public void setTriggerParameter(int position, ITriggerParameter parameter, boolean notify) {
if (pipe.gate == null)
return;
pipe.gate.setTriggerParameter(position, parameter);
if (CoreProxy.proxy.isRenderWorld(pipe.container.worldObj) && notify) {
sendSelectionChange(position);