Fix legacy Gate code on the Pipe
Why does NO ONE ever test builds on old worlds? Compatibility between MC versions is a huge priority!
This commit is contained in:
parent
54677904f0
commit
a3565c71c6
1 changed files with 10 additions and 8 deletions
|
@ -185,14 +185,16 @@ public abstract class Pipe<T extends PipeTransport> implements IPipe, IDropContr
|
|||
}
|
||||
|
||||
// Legacy update code
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
if (data.hasKey("trigger[" + i + "]"))
|
||||
gate.triggers[i] = ActionManager.getTriggerFromLegacyId(data.getInteger("trigger[" + i + "]"));
|
||||
if (data.hasKey("action[" + i + "]"))
|
||||
gate.actions[i] = ActionManager.getActionFromLegacyId(data.getInteger("action[" + i + "]"));
|
||||
if (data.hasKey("triggerParameters[" + i + "]")) {
|
||||
gate.triggerParameters[i] = new TriggerParameter();
|
||||
gate.triggerParameters[i].readFromNBT(data.getCompoundTag("triggerParameters[" + i + "]"));
|
||||
if (hasGate()) {
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
if (data.hasKey("trigger[" + i + "]"))
|
||||
gate.triggers[i] = ActionManager.getTriggerFromLegacyId(data.getInteger("trigger[" + i + "]"));
|
||||
if (data.hasKey("action[" + i + "]"))
|
||||
gate.actions[i] = ActionManager.getActionFromLegacyId(data.getInteger("action[" + i + "]"));
|
||||
if (data.hasKey("triggerParameters[" + i + "]")) {
|
||||
gate.triggerParameters[i] = new TriggerParameter();
|
||||
gate.triggerParameters[i].readFromNBT(data.getCompoundTag("triggerParameters[" + i + "]"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue