Skip to content

Make TemplateDoorItem and TemplateDoorBlock Actually Usable #195

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

calmilamsy
Copy link
Member

As mentioned in #191, these templates are entirely useless right now, and require you to still do basically everything besides opening and closing the door yourself.

So this fixes that. You can now define a whole new door in five-ish lines of code.

Includes a testmod implementation.

image

@AITYunivers
Copy link

I feel like this breaks the conventions of every block template, no? Block Templates typically don't implement any actual logic.

@calmilamsy
Copy link
Member Author

True, though it's either this or removing the template cause it just... doesn't work well at all in it's current state.

@AITYunivers
Copy link

Mod developers should be expected to write their own door templates, just like with every other block. Doors aren't the only block that doesn't work straight out of the box.

@calmilamsy
Copy link
Member Author

And what would that be? I currently don't see anything that wouldn't at a glance.

@mineLdiver
Copy link
Member

Custom pressure plates are wonky on server, for example

@calmilamsy
Copy link
Member Author

That sounds like an API issue to me, considering there aren't any hardcoded IDs in there.

@calmilamsy
Copy link
Member Author

A reminder to those who don't have access to the code: You currently would have to override DoorItem's useOnBlock. The only method in the entire class.

Without this, I argue we should remove the entire item template because it has no salvageable code otherwise.

@calmilamsy
Copy link
Member Author

Said method is also ~60 lines long too, including whitespace.

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 this pull request may close these issues.

Suggestion: TemplateDoorItem should have ability to define door block
3 participants