Add test for org.bukkit.craftbukkit.entity.CraftMinecart#minecartEntityTypeToMaterial#11536
Add test for org.bukkit.craftbukkit.entity.CraftMinecart#minecartEntityTypeToMaterial#11536Abelkrijgtalles wants to merge 6 commits into
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 |
lynxplay
left a comment
There was a problem hiding this comment.
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.