Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. Your block model still has the same problem as before. You've used an invalid texture path in your model. Your resource domain is um (your mod ID), not items/um . The path of the texture (relative to assets/um/textures) is items/unstable_metal.png , not just unstable_metal.png . Use um:items/unstable_metal.png as the texture path. The log is telling you exactly what's wrong, you just need to read it.
  2. TooMuchTNT is trying to load a client-only class on the server. Report this to the author.
  3. You can achieve this by emulating key presses from ClientTickEvent (you'll probably want the PRE phase). Call KeyBinding.onTick with a key code to press that key for one tick. KeyBinding#getKeyCode returns the key code of a key binding, vanilla key bindings are stored in the GameSettings instance (the Minecraft#gameSettings field).
  4. You didn't post the FML log. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). It's much easier to read code with syntax highlighting.
  5. Are you definitely calling BiomeRegistry.init and BiomeRegistry.register ? Override BiomeGenBase#genTerrainBlocks to call the super method and put a breakpoint in it. When the breakpoint is hit, take note of the x and z coordinates.
  6. Post the new FML log and all of the affected models using Gist.
  7. Managing an owner like this could be a potential use-case for the new Capability system.
  8. IBlockState s are converted to and from their IDs using Block.BLOCK_STATE_IDS . This is populated each time a Block is registered: The registry iterates through all of the possible states and adds each one to the map using blockId << 4 | block.getMetaFromState(state) as the ID. If multiple states share an ID, whichever one was added last will be returned from ObjectIntIdentityMap#getByValue .
  9. Minecraft uses Netty to send data between the client and server. Netty doesn't know how to send complex objects like IBlockState s over the network and recreate them on the other side, so they need to be broken down into simpler types that Netty does know about (this is a similar concept to storing data in NBT, both are forms of serialisation). In this case Minecraft sends the ID of the IBlockState , which is just an int derived from the Block 's ID and the state's metadata.
  10. I'm not an expert on log4j, but I don't think it's possible to configure an individual Logger . You can include a log4j config file in your mod, but this overwrites the existing configuration provided by Forge.
  11. I'm pretty sure that doc comment is outdated, the method that loads logging configuration files was removed when Minecraft and Forge/FML switched to log4j from Java's Logging API.
  12. This page explains the block model format. For a full cube model with a single texture, just use minecraft:block/cube_all as the parent and set the all texture.
  13. The error tells you exactly what's wrong: Your block model has no elements or parent and your item model has a syntax error.
  14. Post the full error message or upload the full FML log to Gist and link it here.
  15. CodeChickenCore doesn't support 1.8.9.
  16. You need to check that the state's Block ( IBlockState#getBlock ) is Blocks.log , then use IBlockState#getValue to get the value of the BlockOldLog.VARIANT property. If it's BlockPlanks.EnumType.SPRUCE , the log is a Spruce log.
  17. Mojang's Minecraft launcher comes with its own JRE (Java Runtime Environment, the program that actually runs Java code), it doesn't rely on you having Java installed system-wide. I suspect you actually did have Java installed, it just wasn't set as the default program for JAR files. Forge's Windows installer bypasses this by being an EXE (Windows executable) that launches Java itself instead of relying on you to open it with Java. Once a launcher is running, it also knows how to launch Java itself when you run Minecraft.
  18. Override TileEntity#getDescriptionPacket (called on the server to send data to nearby players) to write the data that needs syncing to NBT and return a new S35PacketUpdateTileEntity with that NBT. Override TileEntity#onDataPacket (called when the client receives an S35PacketUpdateTileEntity ) to read data from the packet's NBT.
  19. What you're downloading is a JAR (i.e. a ZIP archive of compiled Java code), not a RAR (a different general-purpose archive format). You've just set WinRAR as the default program to open JAR files, so it's showing you the contents of the JAR instead of executing it. Either set Java as the default program for JAR files (right click on the file, select Open With -> Choose Another App -> Java) or download the Windows installer instead of the cross-platform one.
  20. Are all of your resources in src/main/resources, with assets being in src/main/resources/assets/<modid>?
  21. It's worth noting that IEEP has been deprecated in favour of the Capability system and may eventually be removed.
  22. If you want to fire arrows continuously but still have the player draw back the bow, it may be better to fire them from Item#onItemUseFinish and Item#onPlayerStoppedUsing instead of from Item#onItemRightClick with a cooldown. I've written an example of this here (parent class).
  23. DrZhark's CustomSpawner is for 1.6.2, it can't be used in 1.7.10.
  24. You've mixed up the slash and the colon in your model's texture path. The colon separates the resource domain (your mod ID) from the resource path (the path of the texture relative to assets/<modid>/textures), the slash separates directories within the resource path (like in regular file paths). Use "firstmod:items/key" instead of "firstmod/items:key" . You should use the sided proxy system (i.e. the @SidedProxy annotation) to register your models rather than checking for the client side in your @Mod class. You should also use Forge's ModelLoader.setCustomModelResourceLocation / ModelLoader.setCustomMeshDefinition in preInit instead of Minecraft's ItemModelMesher#register overloads in init/postInit.
  25. When the server sends a block change to the client, the IBlockState is serialised to its ID in the packet. The ID of a state is derived from the Block 's ID and the metadata for that state. If a property doesn't affect metadata, its value won't be synced to clients. If your block requires a property that's not stored in the metadata (e.g. the property is stored in a TileEntity , derived from the other properties or derived from surrounding blocks) to render properly, override Block#getActualState to return an IBlockState with that property set.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.