Skip to content

Update Forge, Fix elevator platform stuck in endless loop, i18n works#47

Open
hammer354 wants to merge 4 commits intoSlimeVoid:masterfrom
hammer354:master
Open

Update Forge, Fix elevator platform stuck in endless loop, i18n works#47
hammer354 wants to merge 4 commits intoSlimeVoid:masterfrom
hammer354:master

Conversation

@hammer354
Copy link

No description provided.

@Tarig0
Copy link
Member

Tarig0 commented Oct 4, 2017

how does the check flag work?

@hammer354
Copy link
Author

The way the elevator run is master elevator moving part elevators, but which parts need to move is only saved in memory, when info in memory lost (e.g. chunk unload, player offline, game crash), master won't know which parts need to move, and parts that losing master will stuck forever.
So I added code of saving parts' locations into save, and I added a flag, the flag can be understand as "create manually". When entity create manually, flag is true and nothing will happen, but when entity load from save, the default construct method will be invoke and flag is false. First remove old parts that losing master and place blocks, then master will re-spawn parts, the new parts will get camo items and remove blocks, finally master will continue moving with new parts.

@Tarig0 Tarig0 added the to do label Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants