Civcraft / Citadel

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/Citadel
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

Adds a better method for dropping items in the world #171

Closed ghost closed 8 years ago

ghost commented 8 years ago

This prevents reinforcement items from unnaturally jumping around.

This method should also be used for dropped mine ores, otherwise the ores have a tendency to float up to the surface or into nearby void spaces instead of where the player expects it.

CivcraftBot commented 8 years ago

Can one of the admins verify this patch? Type 'ok to test' to test.

ProgrammerDan commented 8 years ago

Nice. Have you had any trouble with concurrency causing the bouncing -- e.g. the block state hasn't fully updated before the drop is spawned, so the drop shoots off into no-where.

Because I tried something similar with HiddenOre and actively made things worse ...

Maxopoly commented 8 years ago

This will make it worse, schedule the drop for one tick later instead and you wont have any problems.

ghost commented 8 years ago

I haven't had any problems with this code. I've had it running for a while.

Maxopoly commented 8 years ago

This might still bounce the drop somewhere upwards. Scheduling it so the block is gone and it can't bounce is the safest way to go.

ghost commented 8 years ago

meh, ok. if I add this scheduling is this something you would merge?

Maxopoly commented 8 years ago

yes

ghost commented 8 years ago

Added the scheduler. Can confirm this works.