Fix first placed block having a different list leading to new linked-blocks being out-of-sync

(teleport not working and breaking leading to unexpected and undesired states)
master
Ruakij 4 years ago
parent e10eaf9b66
commit 51c9ee0716

@ -56,6 +56,10 @@ public class LinkedBeaconTeleporterItem extends LinkedBeaconTeleporter {
// Block from item
LinkedBeaconTeleporterBlock lbtBlock = new LinkedBeaconTeleporterBlock(this.teleporterId(), block);
// Both objects have different lists (as both are new), overwrite block-list with item-list
// FIXME: This seems like a bad design.. maybe only create the list when necessary? (e.g. keep null if no linked objects found)
lbtBlock.linkedBeaconTeleporters = this.linkedBeaconTeleporters;
// Add to list
this.linkedBeaconTeleporters.add(lbtBlock);

Loading…
Cancel
Save