sebinside / CraftBlock

CraftBlock stands for "Craft Attack 3 Skyblock" and is an expert skyblock modpack for Minecraft.
GNU Lesser General Public License v2.1
41 stars 17 forks source link

Remove Pebbles once and for all #130

Closed J0B10 closed 2 years ago

J0B10 commented 2 years ago

grafik

J0B10 commented 2 years ago

be carefull tough. You can add items to pebbles ore-dic using <ore:pebble>.add(item). Any item with this entry will vanish in the blink of an eye when dropped in the world.

voruti commented 2 years ago

Does this have an impact on performance?

J0B10 commented 2 years ago

I observed none.

Theoretically it should not have one as the event listener is only called if an entity is spawned and everything is O(1)

J0B10 commented 2 years ago

I did some further testing & profiling to verify that it has no big impact on performance:

This house is build from command blocks, each one spawning 20 pebbles per second
Event Handling of all command blocks still took only 7% of server tick time while keeping the server at 3.4ms/tick
(which is extremely low, 50ms/tick is maximum for a stable tick rate)

Therefore performance of event handlers such as this one should be of no concern.