Posted March 27, 20205 yr Im trying to learn how to add blocks to minecraft,i want to add a cake block, i dont care if at first its a full block like cobblestone or wood, i just want to add it to the game succesfully, but i cant manage to create the block object in my BlockBase class. i do have a RegistryHandler, althought i dont really know how it works as i started with a video guide that helped me set everything up. I created succesfully the item TARTA_FRESA but i cant manage to create the block (im trying to create a food item that you can place on the floor like a cake). Help is apreciated.
March 27, 20205 yr 3 hours ago, CapuchasPlz said: Uh...have you tried fixing that error right there? Also, don't use BlockBase (Code Style #4). 3 hours ago, CapuchasPlz said: I created succesfully the item TARTA_FRESA but i cant manage to create the block (im trying to create a food item that you can place on the floor like a cake). You do realize that your item needs to know about your block in order to place it, right? 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.
March 28, 20205 yr Author 19 hours ago, Draco18s said: Uh...have you tried fixing that error right there? Also, don't use BlockBase (Code Style #4). You do realize that your item needs to know about your block in order to place it, right? hello thank you for your reply, i was asking myself how would i create other items like materials if i make the constructor for items always drop em in food. i fixed that, but my problem persist, i tried to do numerous stuff to get the constructor working but i cant, it wask me to adda material, but then says the constructor Block(Block) is undefined what should i do. Right now i have null inside the constructor, but i have tried things like Block(.material.cake) or Block(.properties.sethardnesslevel) but nothing works and keeps giving me the same error Help is much apreciated
March 28, 20205 yr Hi You might find this working example useful; see mbe01 https://github.com/TheGreyGhost/MinecraftByExample -TGG
March 28, 20205 yr Author 20 hours ago, Draco18s said: Uh...have you tried fixing that error right there? Also, don't use BlockBase (Code Style #4). You do realize that your item needs to know about your block in order to place it, right? and how do i code that, i tried to find a tutorial or search in the api and docs, but its hard to understand what classes, functions or atributes i have to use.
March 28, 20205 yr Author 4 minutes ago, TheGreyGhost said: Hi You might find this working example useful; see mbe01 https://github.com/TheGreyGhost/MinecraftByExample -TGG THANKS it worked i love you, how could i do that when i right click with the item it places that block?, is there a place i can search more examples like that one?
March 28, 20205 yr 3 hours ago, CapuchasPlz said: how could i do that when i right click with the item it places that block? Vanilla already has this item. Its called BlockItem or NamedBlockItem (both have slightly different features). 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.
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.