Use BlockStates instead of many different blocks
magneticflux- opened this issue ยท 6 comments
Using unique blocks for each color of teleporter is redundant, since color functionality is available through properties. Wool uses the color property, and you can learn more about them here.
I'm new to Minecraft modding, so I'm not entirely confident yet, but I could try my hand at fixing it and allow worlds to be migrated using the MissingMappings event. If you want, I'll make a pull request with my attempts so you can look over it.
EDIT: I'm also using the Minecraft Modding plugin for Intellij IDEA, which highlights a bunch of common errors and speeds up modding a lot, so if you use Intellij you should definitely check that out.
Nevermind; after a few hours of trawling through Google and various forums, I have come to the conclusion that registering items for blocks that have variants is really difficult when it probably shouldn't be.
@VsnGamer I might keep experimenting with it, but I'm pretty new to modding and there isn't a whole lot of documentation at all unfortunately. I'm going to base my attempts off of how Rockwool is made in Thermal Foundation, located here.
Looking at all of the CoFH Core stuff, it looks really useful. This class in particular stands out. What do you think about adding a dependency on CoFH Core? It's already used by tons of other mods, so users will probably already have it installed.
@VsnGamer I've got it working locally! I'll push my changes to a branch tonight if all goes well. I pretty much based everything off of Thermal Foundation, and I used CoFHCore to reduce redundant stuff for registering things.
Nice, I think I can make the mod independent after that, (also giving the proper credits)