Carpet

Carpet

2M Downloads

Suggestion: [1.16] __on_tick support for custom dimensions

James103 opened this issue ยท 2 comments

commented

According to the documentation, __on_tick is not directly supported with custom dimensions; it is only supported for the Overworld, the Nether, and the End.

This is problematic because of said custom dimensions - they may not be able to be properly assessed in all cases.

Workaround: Use /execute in custom:dimension run script run __on_tick()

Possible Fix: Add a new event function __on_tick_custom(dimension). This is called once per custom dimension per tick, with each call passing in the (namespaced:)name of the dimension as the argument and being within that dimension's context.

In the documentation:
__on_tick_custom(dimension) // called once for each custom dimension, can access blocks and entities in that custom dimension

commented

__on_tick_ender/ nether was a mistake

if you want a specific action to be happening in the different dimension you would call

__on_tick() -> in_dimension('nether',
   ... code
)
commented

having said that up until now in_dimension didn't support well custom dimensions, but I already pushed a commit to do that.