-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add test for org.bukkit.craftbukkit.entity.CraftMinecart#minecartEntityTypeToMaterial #11536
Add test for org.bukkit.craftbukkit.entity.CraftMinecart#minecartEntityTypeToMaterial #11536
Conversation
The whole point of the test is to ensure that the hardcoded values in the function are still correct. |
Alright, I will try to fix it to use the Item registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also merge this into the respective patch that introduces the method under test.
No need for a new patch here.
I've fixed it to not be hard-coded, except for |
Thanks! |
I'll probably also make a PR for changing it to a switch statement, as that's a better choice then 7 if/else statements. |
Will do |
EntityType fields are not constants, you won't find much luck in making that a switch statement. |
I've added it, so it should be good to go. |
I've removed the empty lines. If it's to aggressive, just let me know. |
Ok, that's not what I meant lol. Just revert it and forget what I said please. |
Alright. |
This reverts commit b148245.
Hi, I was just wondering, are there any specific things holding the merge back? |
The fact that no developer had time to review this yet. |
Alright, thanks for the update |
Can you reopen the PR to master please :) |
Hi, I hope you're having a wonderful day.
I've added a test for org.bukkit.craftbukkit.entity.CraftMinecart#minecartEntityTypeToMaterial, as requested in #11511.
In the current approach I've hardcoded the Minecart types, as is done in the function.