Jump to content

Choonster

Moderators
  • Posts

    5125
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. The jar task builds a deobfuscated JAR, which can be used in the development environment of another mod (1.8.9 can load obfuscated mods in the development environment, so it's not as necessary any more).
  2. Your message can have multiple constructors, as long as one of them takes no arguments.
  3. Move your mod to a directory without an ampersand ( & ) in its name or install Gradle locally. The Gradle Wrapper doesn't work if there's an ampersand in the path.
  4. You need to build your mod using the build Gradle task (either from the command line or IDEA's Gradle widow) so ForgeGradle reobfuscates your mod, replacing all method/field names with their equivalent SRG names (e.g. func_0002_a , field_0003_c ).
  5. Then I'm not sure what's wrong. All I can suggest is cleaning up your code as per my suggestions in this thread and using ModelLoader.setCustomModelResourceLocation in preInit instead of ItemModelMesher#register in init (though both should work).
  6. Ah, I just figured out what's wrong. You didn't specify the variant in the item model's ModelResourceLocation , so it defaulted to normal (which isn't defined for regular item models). You need to specify the inventory variant using the second argument of the ModelResourceLocation constructor (like in my examples).
  7. Definitely no errors in that log. Could you try removing your resource pack? It shouldn't be causing issues, but it's best to rule it out completely.
  8. I'm not too sure what's going wrong. Could you post the log anyway so I can confirm that there's no errors in it? You should be registering blocks in the preInit phase, not the init phase. You should only be registering models from your client proxy so you don't crash the dedicated server. Don't use the block's unlocalised name for the model, use its registry name ( block.getRegistryName() in 1.8.9 or Block.blockRegistry.getNameForObject(block).toString() in [nobbc]1..[/nobbc] Edit: Damn smileys.
  9. I'm not sure what you've done wrong. Are there any other errors in the log? I just made a simple mod that adds a single block here and the model works without issue. If you post your latest code (specifically the class where you register the block and the class where you register the block's model) and the FML log (logs/fml-client-latest.log), I may be able to help you further. Please use Gist or Pastebin to post the log and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
  10. Your item model has the wrong parent model ( craftattack:blocks/testblock instead of craftattack:block/testblock ). You can't register models directly in your main @Mod class, you'll crash the server. Use the sided proxy system and register models in your client proxy or a class that's called from it. Don't catch an exception if you're just going to ignore it. That will only make it harder to figure out where the error is when something goes wrong.
  11. The ModelResourceLocation is your resource domain (lowercase mod ID), the model's path excluding the .json extension (relative to models/item) and the variant ( inventory for a standard item model). For the assets/craftattack/models/item/testblock.json model, use new ModelResourceLocation("craftattack:testblock", "inventory") .
  12. That method should register the model, but it will crash the dedicated server. GameRegistry.registerBlock needs to be called on both sides, but Minecraft is client-only so it doesn't exist on the dedicated server. I'd recommend creating a class to register your block/item models and calling ModelLoader.setCustomModelResourceLocation for each item (including the item forms of your blocks). You can see an example of this in my mod here. This is called from my client proxy, which is called from my main class. You shouldn't be using Item.getIdFromItem or the LanguageRegistry class. Item IDs are automatically managed and translations should be handled through lang files.
  13. You need to tell Minecraft which model to use for the item form of your block by calling ModelLoader.setCustomModelResourceLocation or ModelLoader.setCustomMeshDefinition from your client proxy in the preInit phase.
  14. PowerConnectable doesn't call the super methods from its overrides of writeToNBT / readFromNBT .
  15. Are you sure it's provided by the server JAR? I just used the 1.7.10-10.13.4.1614 and 1.8.9-11.15.1.1732 installers to install servers and both of them downloaded joptsimple to the libraries folder.
  16. The textures are controlled by the model, which is controlled by the blockstates file. Post these. What's your furnace supposed to look like?
  17. What do you need the container for? Why is the code being run from the client side? In the handler for a client-to-server IMessage , use MessageContext#getServerHandler to get the sending player's NetHandlerPlayServer and then get the player from the NetHandlerPlayServer#playerEntity field.
  18. Minecraft is missing a required library (joptsimple). If you don't have direct access to upload files to the server, tell your host to fix this.
  19. Can't you just package it as a regular mod and have other mods add it as a dependency manually or through Maven? I'd suggest using the new ContainedDep mechanic to package your mod inside other mods, but it doesn't look like contained mods can be coremods (at least not when they're first extracted).
  20. Use MinecraftServer.getServer to get the server instance, MinecraftServer#getCommandManager to get the server's command manager and ICommandManager#executeCommand to execute a command.
  21. Villages and villagers appear to treat any block that extends BlockDoor and uses Material.wood as a valid door. The EntityAIOpenDoor AI task used by villagers to open doors uses BlockDoor#toggleDoor to open and close doors. If you want your door to be used by villagers, make sure it uses Material.wood and is opened/closed by BlockDoor#toggleDoor .
  22. Bump again. Still having the same issue finding the right transformations. This is what it looks like in third person with no transformations. This is what it looks like in third person with transformations.
  23. It looks like Fry just committed a fix for this, so it should work in 1.8.9-11.15.1.1730 once that's been released.
  24. Like I said, Minecraft#thePlayer (i.e. the instance field of Minecraft called thePlayer ) contains the client player. Use Minecraft.getMinecraft() to get the Minecraft instance.
×
×
  • Create New...

Important Information

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