Jump to content

Jay Avery

Members
  • Posts

    884
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Jay Avery

  1. That means the method signature doesn't match the one in the superclass. Take a look in the Item class (net.minecraft.item.Item) and search for "onItemRightClick", and make sure you have exactly the same parameters and return type. The parameters and return type changed around a lot in the last few minecraft versions, so if you've looked at a different version it probably won't match.
  2. The annotation is still in the wrong place! Not on your proxy class, on the proxy field in your main class. Like this: @SidedProxy(..etc) public CommonProxy proxy;
  3. Post your updated code. Is the error the same?
  4. @SidedProxy doesn't go on your main mod class, it goes on your proxy field itself.
  5. For an item you've coded, it's easier to override the onItemRightClick method in your item class. Otherwise you can use PlayerInteractEvent.RightClickItem. I don't know if there's a place in the docs website with all the events, but the event classes in the code have doc comments explaining how and when they are called.
  6. There are various events and methods used in different situations. What particular case do you want to use? E.g. using an item, right-clicking a block, interacting with an entity? Is it with something you control (i.e. you added the code in your own mod), or not (i.e. something from vanilla or another mod)? In general, you can look through events in the net.minecraftforge.events package - most of them have good documentation and you can also use your IDE to find the places where a particular event is used.
  7. The docs say registry events are fired before preInit.
  8. You seem to have the right ideas! You might find it easiest to simply put the registration events directly inside your main mod class, to keep everything in one place. Then inside those events, you can redirect to methods inside other classes if you don't want to keep all the code in @Mod.
  9. Ah, for ModelRegistryEvent the method needs to be annotated with @SubscribeEvent and the class annotated with @Mod.EventBusSubscriber. @Mod.EventHandler is only for lifecycle events like preInit, init, postInit.
  10. Post the latest log, it will contain rendering errors.
  11. Give it a try and see what happens!
  12. Yes, you have the right idea. It should be in common code (common proxy or your main mod class), and it should be in a class annotated with @Mod.EventBusSubscriber. What happened when you tried it?
  13. Yes, except remove the modid from the ModelResourceLocation - your modid is already part of the registry name by default.
  14. You can simply replace Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register with ModelLoader.setCustomModelResourceLocation - the methods take the same parameters. And call that method in either FMLPreInitializationEvent or ModelRegistryEvent.
  15. That'll be the problem then...
  16. Like V0idWa1k3r said, there are two versions of this method. You need to use the version which takes an Entity Class and an IRenderFactory as parameters. Your RenderDogOne constructor should take a RenderManager parameter and pass this to super, instead of using Minecraft.getMinecraft().getRenderManager(). Then you can use this constructor for your IRenderFactory by passing the RenderManager from the IRenderFactory to the constructor and returning the new instance.
  17. From this picture, it looks like the blockstates directory is directly inside the assets directory, rather than inside assets.modid alongside lang, models, and textures like it should be.
  18. Where do you call and use your CutManager class? Where do you open the containers?
  19. You need to make an IGuiHandler to control opening both the server-side container and the client-side gui. Then call player#openGui to open them both as needed.
  20. Where in the code do you open the container?
  21. When you say block, do you mean inventory slot?
  22. What exactly do you mean?
  23. Well, I found the foolishly obvious solution. I had screwed up my getMetaFromState/getStateFromMeta so the state wasn't being stored or sent server->client correctly.
  24. Please post your code so it can be read online - either in spoilers (eye icon) and code tags (<> icon) on this forum, or on a site like pastebin, or ideally as a full github repository.
  25. Always post the whole log when you have rendering issues, it will contains errors explaining the problem. "up": "mainmod:blocks/blockeleven1" "down": "mainmod:blocks/blockeleven1" "north": "mainmod:blocks/blockeleven" "south": "mainmod:blocks/blockeleven" "west": "mainmod:blocks/blockeleven" "east": "mainmod:blocks/blockeleven" You have no commas between any of these, which is invalid json syntax. To avoid issues like this, use a json plugin for your IDE, or run your file through an online validator like jsonlint.
×
×
  • Create New...

Important Information

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