Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block tick method names #872

Closed
liach opened this issue Sep 25, 2019 · 10 comments · Fixed by #886
Closed

Block tick method names #872

liach opened this issue Sep 25, 2019 · 10 comments · Fixed by #886

Comments

@liach
Copy link
Contributor

liach commented Sep 25, 2019

Here is a vote on block's tick methods' names on whether to have an on prefix.

onScheduledTick(), onRandomDisplayTick(), onRandomTick() 👍
scheduledTick(), randomDisplayTick(), randomTick() 👎

The on prefix exists for most methods, but randomDisplayTick exists previously as well in Block mappings. See #871.

My personal opinion

I personally support no on prefix, which is the 👎 option. When we sum up, count extra 1 to the 👎

@i509VCB
Copy link
Contributor

i509VCB commented Sep 25, 2019

Since it isn't an event for say and closer to an actual implementation the on prefix doesn't make as much sense.

Also what does randomDisplayTick specifically do? Is it similar to the sand particles from floating sand or lava dripping?

@liach
Copy link
Contributor Author

liach commented Sep 25, 2019

Random display tick is like lava dripping particles or lit redstone particles if I recall correctly

@Juuxel
Copy link
Member

Juuxel commented Sep 25, 2019

Yep, it's the client-sided block tick used for rendering block effects.

@natanfudge
Copy link
Contributor

Can we get activate changed to onActivate?

@Juuxel
Copy link
Member

Juuxel commented Sep 25, 2019

I'd say use/onUse would be better to match the item method and the keybinding name.

@ghost
Copy link

ghost commented Sep 25, 2019

I would also prefer use over activate

@natanfudge
Copy link
Contributor

natanfudge commented Sep 25, 2019

Either way it needs to be prefixed with on to match all of the other block events.

@liach
Copy link
Contributor Author

liach commented Sep 25, 2019

In the gui code, mojang has keyPressed mouseMoved instead of onKeyPressed onMouseMoved etc.

@liach
Copy link
Contributor Author

liach commented Sep 29, 2019

Up to now, people support no on prefix dominantly and #871 has changed to use no on prefix as well.

@modmuss50 modmuss50 reopened this Sep 29, 2019
@liach
Copy link
Contributor Author

liach commented Sep 29, 2019

sure, my mistake. sorry juuz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants