Posted March 9, 20169 yr Good evening, I'm trying to make more wall blocks (from BlockWall class), for now it does work but I feel I am doing it the wrong way. Here is a screenshot of what I accomplished from now : http://s11.postimg.org/ptxdoyv83/2016_03_09_19_56_27.png[/img] At first thoughts, I felt that I had to extend the BlockWall class to get a full compatibility between my custom walls and the basic ones (regarding blocks connections for example). When I did this, I encountered some problems : I couldn't add values to the EnumType inside the BlockWall class. So I decided to make my own PropertyEnum but then it crashed because it obivously waited for the default EnumType and not my custom one. On second thoughts, I decided to copy the BlockWall class and I changed the EnumType class to implement my own one, changing some values moreover. There I dunno why but I couldn't access to some protected final variable from Block class (yet, I extended my custom one from Block) so I had to put some "default" values for hardness or resistance (if you don't know what I mean, take a look at the BlockWall constructor for setHardness and setResistance, etc). It does work for now, but I feel that this way is not the right one, furthermore the maintainability or the .json blockstates is awful (see the file). Did everyone achieve this with an easier way ? Do you have some tips to give me to facilitate the work I've already done and so make it more maintainable ? Oh and for last, I have a little problem here that I encountered with another block (BlockCrop) too : when registering the models, it can't find the model definition for inventory : Model definition for location questsystem:block_wall_custom#inventory not found But it registers the other models sucessfully. I saw in some codes that I can manually put the "inventory" variant in the .json file but I was wondering if it was the right way ? BlockWallCustom.java ItemBlockMeta.java BlockWallCustomVariants.java block_wall_custom.json Thank you in advance for your help UPDATE1: fixed inventory registration, I just forgot the .json file in the models/item folder, I'm a bit ashamed. Finally, it does not work, lel. Squirrel ! Squirrel ! Squirrel !
March 10, 20169 yr I've made this exact mod (except that I did not use netherbrick, which is too dark for my taste). BTW, Netherbrick in the crafting shape of a vanilla wall will craft a vanilla netherbrick fence. What were you planning for your recipes? Another irritating feature of vanilla walls is that they won't join up with subclassed walls (the test is for '== BlockWall', not 'instanceof'). Likewise subclassed gates. I ended up adding my own cobble and mossy-cobble walls after distinguishing my recipe to make 7 walls from 7 blocks (I added a cap to the top center). In addition, if you try to vary hardness by metadata, you may need to guard against having your hardness method called against an air block (when breaking blocks, vanilla seems to make one last call to get hardness after replacing a block with air). Take a look at uncle jeff's anystone walls (my extra walls mod). There are two sets of 16 walls in the version for 1.8. I ported to 1.8.9 but haven't uploaded that yet because I ran into problems moving my world from 1.8 to 1.8.9 for client-server final testing. However, I could stick it on Curse Forge as an alpha if you want to try it. The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
March 10, 20169 yr Author Thank you for your reply jeffryfisher, It seems that Minecraft has a non-dev-friendly side in there. About the recipes, I think I will just use 1.9 fence patterns to make my walls recipes, and when i will update to 1.9, I will reverse the process. Squirrel ! Squirrel ! Squirrel !
March 10, 20169 yr It seems that Minecraft has a non-dev-friendly side in there. If you think walls are unfriendly, just try adding a new horse armor It's almost as if Mojang's coders didn't plan for future modders when they wrote the vanilla code The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.