Posted September 7, 20187 yr I have a strange problem when creating a new world. I recently changed all my tree logs to use block variants instead of being individual blocks, and it worked out at first but now it crashes. Any ideas? Crash: https://pastebin.com/nsXbmrNx EnumType class: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/util/enums/EnumTypeLogs.java Tree class: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/dimension/corba/gen/trees/WorldGenCorbaMediumTree.java From what I can tell, it can't apply the 'corbalog' variant to the block for some reason, but it can apply 'euca' and 'sizzler'. Any ideas?
September 7, 20187 yr Quote Caused by: java.lang.IllegalArgumentException: Cannot set property PropertyEnum{name=variant, clazz=class net.journey.util.enums.EnumTypeLogs$EnumType, values=[sizzlerlog, eucalog]} to corbalog on block journey:logs, it is not an allowed value Your blockstatecontainer only allows for 2 variants. If we look at your enum class, there are 9 total variants. This can't fit in 4 bits of metadata along with 2 bits used for log axis. Which we see: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/slayer/api/block/BlockModLog.java#L55 https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/slayer/api/block/BlockModLog.java#L96 BTW, your API has references to your non-API. This means your API cannot be packaged separately. https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/slayer/api/block/BlockModLog.java#L7-L15 Also, IHasModel is stupid. All items need models and none of the information necessary to register a model is protected or private. Edited September 7, 20187 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 7, 20187 yr Author 6 minutes ago, Draco18s said: Your blockstatecontainer only allows for 2 variants. If we look at your enum class, there are 9 total variants. This can't fit in 4 bits of metadata along with 2 bits used for log axis. Which we see: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/slayer/api/block/BlockModLog.java#L55 https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/slayer/api/block/BlockModLog.java#L96 Also, IHasModel is stupid. All items need models and none of the information necessary to register a model is protected or private. Thanks so much, I don't know how I didn't realize this.
September 7, 20187 yr Author So now it no longer crashes, but the only log variants that generate are the eucalog and sizzlerlog types. In addition to this, the trees in the Euca dimension that are supposed to use the eucalog type are generating with the sizzerlog type, like it's completely random and it's not applying the variant specified. All variants show up in the creative inventory, though. Edited September 7, 20187 yr by Dizzlepop12
September 7, 20187 yr Nine Log Types * 3 axis of orientation = 27 possible state variants. Metadata is strictly limited to 16 possible state variants. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 8, 20187 yr Author 11 hours ago, Draco18s said: Nine Log Types * 3 axis of orientation = 27 possible state variants. Metadata is strictly limited to 16 possible state variants. Oh shucks, so I can't have that many variants?
September 8, 20187 yr 17 minutes ago, Dizzlepop12 said: Oh shucks, so I can't have that many variants? Well you can, you can use an ExtendedState and save the log type to a TileEntity. You just can't save it in metadata. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
September 8, 20187 yr 7 hours ago, Animefan8888 said: Well you can, you can use an ExtendedState and save the log type to a TileEntity. You just can't save it in metadata. ActualState In either case, I do not recommend TEs for logs. Use multiple blocks like Vanilla does. Edited September 8, 20187 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 8, 20187 yr This is a classic issue that people making logs run into. Because logs have orientation it uses up some precious bits of meta data. People often try to be clever and combine all their variants them realize you need to break them up again. That is why vanilla has 2 log blocks, 2 leaves blocks, etc. Note also that 1.13.x is moving even farther away by making every variant a separate block. This is called "the flattening". Edited September 8, 20187 yr by jabelar Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.