Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. I meant this part Automatically Registering Static Event Handlers
  2. Then instead of registering the event in preInit use the static way of registering it was in the link Dracos provided.
  3. Sorry, pasted the code wrong. The subscribe event is over the method Did you re paste the code or just fix that one error? And also are you registering something into the ore dictionary after registering the event? I went back to my post to edit it and add the class part, but accidentally put the subscribe event before the class. My actual code never had that. I am trying to register something into the oredict when the event is called (it won't loop infinitely, I have it set up right), but the event doesn't get called yet The event is fired when something is registered to the OreDictionary it is not used to register something to the OreDictionary specifically.
  4. Sorry, pasted the code wrong. The subscribe event is over the method Did you re paste the code or just fix that one error? And also are you registering something into the ore dictionary after registering the event?
  5. The @SubscribeEvent goes over the method not the class.
  6. I dont think this is possible because items must be registered in there event which is called prior to preInit. Or it is done during preInit...And typically ore dictionary is done in init or postInit from my experience with it.
  7. Use the model system instead of the TESR system. Use something like cubik pro to create the model i have a vanilla blockstate generator file on my github if you would like to use that aswell.
  8. I don't think there is a reason to limit item IDs, but block ids are limited, and it makes for clearer code.
  9. You can watch and leave a request on my currently two videos (school has been taking up most of my time).
  10. You will want to use the RenderSpecificHandEvent, and actually render the item/hand how you want to. I would do this by rendering it and canceling the event for the animation. Look at ItemRenderer for how vanilla does this.
  11. No not all animation would be dynamic, well at least not dynamic enough. When used here dynamic is more of a changing every few frames based on a rotation variable a great example would be the animations in Immersive Engineering. BlockModelRenderer renders an IBakedModel which is the render data in this case.
  12. The ModelBakery is just a class that takes jsons or obj models and compiles them into render data. *Note: If you do not know much about JSONs you should look up what they are, how they are formated then continue as they can be a little tricky at first. You do not need to look anything up about it unless you need non dynamic animation. IE for a simple block "parent": "blocks/cube_all", "textures": { "all": "modid:block/fileName" } That will give you a simple cube block model. For more custom models I like to use Cubik Pro, but they can be made manually. Now you will also need a blockstate json which will typically look like. "inventory": { "model": "modid:modelFileName" } That is for a block with no custom properties ie Directional, or metadata related. Now if you want an item for your block or an item you also need a Json file. They will typically look like this. For a ItemBlock "parent": "modid:blocks/blockModelFileName" For a Item item "parent": "item/generated", "textures": { "layer0": "modid:textureFileName" } And that is all...
  13. What she meant was indeed most likely the ModelBakery. And by dynamically I mean it is animated with moving parts. I knew it off of the top of my head because I really dived into the information on the new model system before I did anything with it.
  14. Here are the screenshots: http://imgur.com/a/1p9Rv And here's the log I don't see how this didn't come to my mind earlier, but the thing is you didn't apply the directional properties to your block because you used your BasicBlocks class instead of a custom one that applies those properties. You need to implement Block#getMetaFromState(...), Block#getStateFromMeta(...), and Block#createBlockState().
  15. It is more efficient because it just takes up ram, and it only ever "re-renders" when there was a block update(others feel free to correct me if that explanation was sub-par). While you have TESRs which get rendered to the string every single frame. And we also have the ModelBakery which has IBakedModels which made not only TESRs almost pointless, it also removed the old system of IItemRenderers. TESRs are still useful for dynamically rendering a block. Overall The ability to create the model aspect of the block instead of rendering it with a Tesselator is why it is better.
  16. Could you share a screenshot of your assets folders in your IDE. And post the console log.
  17. I'm pretty sure, because I put the treeTap files where I usually have the rest of my blocks Is the name of your blockModel the same as the name it is looking for. As the pictures you posted makes me think that they are not even getting the model. But the item model is.
  18. Ok your problem is that you are trying to implement two different things. You either use an IInventory or a IItemHandler. Not both. In your container you are trying to use IInventory without setting up all required methods IE getSizeInventory, decrStackSize, and removeStackFromSlot.
  19. Nope, added it but that one doesnt even have shift click so i cant get it out at all Show your Gui code.
  20. What is your animation supposed to do? Is the item going to have an animation? Is the player going to be animated?
  21. Normal item jsons should look like this. "parent": "item/generated", "textures": { "layer0": "modid:textureName" }, #if you said "inventory" when registering your model with #ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), "inventory") otherwise use "normal" "inventory":{ #dont need anything in here }
  22. Forge's documentation has an introduction to blockstates here. Use your IDE to find the subclasses of net.minecraftforge.fml.common.eventhandler.Event . First of all, your answer helped a lot. However I'm still having some trouble. I replaced the event.block with event.state.getBlock(). However I can't figure out how to get the coordinates of the block (what currently is event.x etc). Any chance you can help me with that? EDIT: I noticed a getBlockBoundsMaxX() (also for Y, Z and min) method. Does that have anything to do with it? Not event state.getBlock() but event .getState().getBlock()
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.