jackokring Posted July 30, 2020 Posted July 30, 2020 Hi So I managed to build without module errors. In test I found the potion registered custom potion (singular) shows up as a complete set of potions in the creative inventory (on the custom item group). This is unexpected. Did I use the correct parent model? Also I added a written book with text json. I seem to be unable to open it to read it. It displays as the default brown book. No open to open it, but it does destroy blocks. I changed into survival mode too but it operates more like a hammer than a readable book. https://github.com/jackokring/MinecraftMod for source. Quote
Draco18s Posted July 30, 2020 Posted July 30, 2020 Pretty sure the "complete set" in the creative tab is expected behavior. As for the book: https://github.com/jackokring/MinecraftMod/blob/master/src/main/java/uk/co/kring/mc/Jacko.java#L267-L271 I don't see where you are setting its text. 33 minutes ago, jackokring said: but it does destroy blocks As do most items in creative mode... Quote 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.
Beethoven92 Posted July 30, 2020 Posted July 30, 2020 Offtopic: may i suggest you to organize better your mod code in different packages and classes? Right now its pretty messy, and its really small right now, but if you'll expand it and add more stuff i am 100% sure you won't be able to even remember where some things are placed or which portions of code are related to others. Just a suggestion, feel free to accept it or not 😉 Quote Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
jackokring Posted July 30, 2020 Author Posted July 30, 2020 Custom tab itemGroup, so all mod items appear, but all potions I just added a PotionItem() with the model having a CustomPotionEffects in the json. The four redstone blocks appear with no functionality yet (will do this later). I'm not sure where to set it's text, it's in the item model at the moment (an assumption). Do I have to sub class WrittenBookItem? Is it possible to make it readable by using a json file or does it need code to load the book content? I managed to fix 1 more error on in achievement recipes as i had a bad item name or 2. Quote
Draco18s Posted July 30, 2020 Posted July 30, 2020 9 minutes ago, jackokring said: I'm not sure where to set it's text, it's in the item model at the moment (an assumption). What. This makes zero sense. Models are 3D models, which are client files. 10 minutes ago, jackokring said: or does it need code to load the book content? Written book content is NBT data. Go look at WrittenBookItem. Quote 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.
jackokring Posted July 30, 2020 Author Posted July 30, 2020 data/jacko/tags/items/book.json might be a suitable location for book text? I assume one of those functions loads an NBT and checks for pages ... and https://minecraft.gamepedia.com/Data_Pack seems to have some info but I last coded mods about minecraft 1.7. Quote
Draco18s Posted July 30, 2020 Posted July 30, 2020 18 minutes ago, jackokring said: data/jacko/tags/items/book.json might be a suitable location for book text? No, that's where tags go. 18 minutes ago, jackokring said: and https://minecraft.gamepedia.com/Data_Pack seems to have some info Dude: https://minecraft.gamepedia.com/Written_Book#Item_data Quote 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.
jackokring Posted July 30, 2020 Author Posted July 30, 2020 itemP = new WrittenBookItem.Properties().group(customItemGroup); //.maxStackSize(BOOK_STACK_SIZE); WrittenBookItem bookItem = new WrittenBookItem(itemP); //the following 2 look like a read and write function pair //bookItem.readShareTag(); //bookItem.getShareTag(); //perhaps it's bool false and a place where tags are for following 2 methods ... //bookItem.shouldSyncTag(); //bookItem.getTags(); bookItem.setRegistryName(Jacko.MOD_ID, "book"); event.getRegistry().register(bookItem); That's it for today as the "source" I've found is of the P_124141413413_?? variety. Quote
Recommended Posts
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.