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)
This commit is contained in:
parent
e10eaf9b66
commit
51c9ee0716
@ -56,6 +56,10 @@ public class LinkedBeaconTeleporterItem extends LinkedBeaconTeleporter {
|
|||||||
|
|
||||||
// Block from item
|
// Block from item
|
||||||
LinkedBeaconTeleporterBlock lbtBlock = new LinkedBeaconTeleporterBlock(this.teleporterId(), block);
|
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
|
// Add to list
|
||||||
this.linkedBeaconTeleporters.add(lbtBlock);
|
this.linkedBeaconTeleporters.add(lbtBlock);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user