-
Posts
884 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Jay Avery
-
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.
-
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;
-
Post your updated code. Is the error the same?
-
@SidedProxy doesn't go on your main mod class, it goes on your proxy field itself.
-
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.
-
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.
-
[1.12] Registering for Dummies [Solved]
Jay Avery replied to ConfusedMerlin's topic in Modder Support
The docs say registry events are fired before preInit. -
[1.12] Registering for Dummies [Solved]
Jay Avery replied to ConfusedMerlin's topic in Modder Support
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. -
I'm not able to register model to my item
Jay Avery replied to MGlolenstine's topic in Modder Support
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. -
I'm not able to register model to my item
Jay Avery replied to MGlolenstine's topic in Modder Support
Post the latest log, it will contain rendering errors. -
I'm not able to register model to my item
Jay Avery replied to MGlolenstine's topic in Modder Support
Give it a try and see what happens! -
[1.12] Registering for Dummies [Solved]
Jay Avery replied to ConfusedMerlin's topic in Modder Support
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? -
I'm not able to register model to my item
Jay Avery replied to MGlolenstine's topic in Modder Support
Yes, except remove the modid from the ModelResourceLocation - your modid is already part of the registry name by default. -
I'm not able to register model to my item
Jay Avery replied to MGlolenstine's topic in Modder Support
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. -
I'm not able to register model to my item
Jay Avery replied to MGlolenstine's topic in Modder Support
That'll be the problem then... -
[1.11.2] (UNSOLVED) Help with rendering entity in Main class.
Jay Avery replied to BlockExpert's topic in Modder Support
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. -
[1.11.2] (SOLVED) Forge can't seem to find my blockstate file.
Jay Avery replied to Misero's topic in Modder Support
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. -
[1.10.2 | SOLVED] Items disappearing when removed from Slot
Jay Avery replied to VirtCraft's topic in Modder Support
Where do you call and use your CutManager class? Where do you open the containers? -
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.
-
Where in the code do you open the container?
-
When you say block, do you mean inventory slot?
-
What exactly do you mean?
-
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.
-
[1.10.2 | SOLVED] Items disappearing when removed from Slot
Jay Avery replied to VirtCraft's topic in Modder Support
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. -
[1.11.2] (SOLVED) Help with multi-texture block. Code included.
Jay Avery replied to BlockExpert's topic in Modder Support
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.