Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/12/17 in all areas

  1. You didn't set a condition for the breakpoint, so it was hit for a BlockStone instance, which uses SoundType.STONE. Set the condition of a breakpoint by doing the following: Show the Breakpoints view (Window > Show View > Other... > Debug > Breakpoints) In the Breakpoints view, right click on the exception breakpoint and select Breakpoint Properties... In the Properties window, check the Conditional checkbox In the large textbox, enter the condition this instanceof BlockWoolSlab Click OK in the Properties window.
    1 point
  2. Only the top-level @Config class can have static fields, the other classes need to have non-static fields. You need to access the values from the static fields of the top-level class and the non-static fields of the other classes. In your example, this would be ModConfigClass.client.var1 and ModConfigClass.client2.foobar (after you make the ModConfigClass.Client2.foobar field non-static).
    1 point
  3. Forge does automatically create a config GUI for you if you're using the annotation-based config system and Forge 1.11.2-13.20.0.2262 (commit 25497d3) or later. You're using Forge 1.11.2-13.20.0.2228, so you need to update to get the automatic config GUI.
    1 point
  4. Packets haven't really changed in recent versions, so anything that worked in 1.8.x/1.9.x should still work in 1.11.2 or 1.12. You can't safely reference the Minecraft class in an IMessageHandler#onMessage method that will be called on both sides, you need to move the code to get an IThreadListener to your proxies (like this, this and this). That seems like a lot bolilerplate code for not a lot of gain. If you look at my mod's packets, you'll see that the first line of every packet handler uses the proxy methods to get the IThreadListener and schedule a lambda implementation of Runnable. This seems simpler than wrapping SimpleNetworkWrapper and IMessageHandler.
    1 point
  5. No, there shouldn't be any issues regardless of what data you need to sync. A single integer should make things very simple, though.
    1 point
  6. Packets have not really changed much since 1.7 unless something happened in 1.12 that i don't know about. So here is a tutorial from Diesieben.
    1 point
  7. Don't use ItemModelMesher#register to register models, use ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in ModelRegistryEvent. Models need to be registered in a client-only class. I use this method to register models for each SlabGroup's item. This is set up so that the item uses the models specified in the blockstates file. To be clear, my mod is meant to be an example rather than a tutorial. You need to read through the code and understand how it works, I don't explain it step-by-step (though I do try to document what most methods and classes do).
    1 point
×
×
  • Create New...

Important Information

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