Jump to content

Leaderboard

Popular Content

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

  1. No, add @Mod.EventHandler on top of the init method in your @Mod class.
    1 point
  2. Wrong init. The one in your main/common proxy that gets the FMLInitializationEvent
    1 point
  3. You need to make your init method non-static and you need to add @Mod.EventHandler on top of the method.
    1 point
  4. init-phase event-handlers need to be annotated with @EventHandler alt @Mod.EventBusSubscriber if outside your main class
    1 point
  5. Why do you want the name? To get the name, call ItemStack::getDisplayName.
    1 point
  6. Well, not all blocks have tileentities. In those cases, World::getTileEntity will return null, so you'll need a null-check first, or you'll very likely crash. After that, you can use an instanceof instead of equals-check, and just reference your TileEntity's type eg if(world.getTileEntity(pos) instanceof TileEntityFurnace)
    1 point
  7. You can call BlockPos#getAllInBox which returns a collection of BlockPos. You need to give the method 2 opposite corners. You can get those by using BlockPos::add(+-x, +-y, +-z) You can then do a normal for-loop or lambda-for-each to iterate over each BlockPos.
    1 point
  8. World::isRemote returns true for Client Capabilities still exist on the client, it's just that no data is saved = null values (tile.air is an empty stack aka null)
    1 point
  9. I think more like the url of youtube videos
    1 point
  10. From what I can tell from some light googling, it appears to be a unique identifier for your project.
    1 point
  11. Minecraft offers an option to reload resource packs while using the key combination SHIFT + F3 + T. In many cases one wants to adjust how the model looks in any of the rendering types (firstperson_righthand, gui, etc). If one modifies the original JSON file that has the transform information in the IDE and presses SHIFT + F3 + T in Minecraft, nothing happens. One has to recompile everything and start again Minecraft to see the changes. But that is only because one is modifying the source and not the resource JSON that Minecraft is loading into memory. If you modify the one that is being loaded into memory, the changes will be displayed once you press SHIFT + F3 + T in the game. Eclipse: Modify your JSON file containing the transformations and copy paste it in its respective place under classes/production/[YOURPROJECTNAME]_main/assets. Overwrite the existing one. Press SHIFT + F3 + T in the game to reload the resource pack. For example, let's say I am making a mod whose root directory is named Tutorial. I have an item whose model is located in Tutorial/src/main/resources/assets/tutorialmodid/blockstates/item3dmodel.json. I would modify that file and while the game is running I would copy paste it in Tutorial/classes/production/Tutorial_main/assets/tutorialmodid/blockstates/item3dmodel.json. Then I would press SHIFT + F3 + T in the game to reload the resource pack which would show my changes. IntelliJ IDEA: Modify your JSON file containing the transformations, go to the Build menu, and click Recompile '[nameofyourmodel.json]'. Press SHIFT + F3 + T in the game to reload the resource pack. Alternatively you can right click the JSON file either at the project view or in the tabs and hit Recompile.
    1 point
×
×
  • Create New...

Important Information

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