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. You've annotated the config field with @Mod.Instance , so FML tries to set it to your mod's instance. This throws an exception because the field and value are of incompatible types ( Configuration is unrelated to BuildingArea ). Move the annotation to the instance field.
  2. Key bindings aren't meant to be dynamically registered/unregistered, they're meant to be registered once at startup. If you only want the key binding to function when the player is holding a certain item, check that in your handler before you perform the function.
  3. Give the block a bounding box smaller than a full block by storing the AxisAlignedBB in a static final field and overriding Block#getCollisionBoundingBox to return it. You can then override Block#onEntityCollidedWithBlock to damage the colliding entity. The bounding box is unrelated to the model, so your block can still look like a full cube.
  4. Forge requires non-vanilla loot tables to provide a "name" entry for each loot pool. You can see a working loot table here.
  5. What format is the model in? If it's JSON, you can specify the tint index of each face of each element, this will be passed to the IItemColor . See the wiki for the full model format. If it's OBJ/B3D, there's not currently any way to specify tint indexes. It's been requested here, but I don't think it's being worked on actively.
  6. Always specify the version of Minecraft you're using in the title. Block#onEntityCollidedWithBlock is called on both the client and the server. Only spawn entities on the server (when World#isRemote is false ).
  7. I don't understand what your issue is. Minecraft uses SpawnListEntry instances to control which entities can spawn in each biome. If you look at where this class is instantiated, you'll see which biomes allow which entities and what rates they use.
  8. Look for usages of the SpawnListEntry constructor using your IDE.
  9. Thaumic Energistics requires Java 8, you're using Java 7. Update Java.
  10. Not too sure what's going on there, sorry.
  11. Are you using OSX? It looks like your issue is similar to this one. If not, maybe run it with --info and post the output.
  12. The client and server have separate instances of your TileEntity . The server's data is only synced to the client if you include it in the update tag/packet. Override TileEntity#getUpdateTag to write the data that needs syncing to a compound tag and return it. Override TileEntity#getUpdatePacket to create and return an SPacketUpdateTileEntity using the compound tag returned by TileEntity#getUpdateTag . Override TileEntity#onDataPacket to read the TileEntity 's data from the packet's compound tag.
  13. Always post logs. If it fails with "Execution failed for task ':decompileMc'. GC overhead limit exceeded", this page explains how to fix it.
  14. Look at the CommandTitle class to see how it sends the title to the client, then look at how that packet's handler method sets the current title.
  15. Edit the ForgeGradle version in the buildscript block at the top of build.gradle, re-run setupDecompWorkspace and regenerate your IDE project.
  16. You need to use ForgeGradle 2.2 for Minecraft 1.9.4 and later, you're using ForgeGradle 2.1. I'd also recommend updating to 1.10.2. Most 1.9.4 code should compile without any changes.
  17. You need to add the mod as a dependency through Gradle, ForgeGradle will add it as a dependency in your IDE project. This page explains how to add dependencies in Gradle.
  18. It looks like you're using a deobfuscated build of the mod in the obfuscated environment. Make sure you build your mod with the build Gradle task, this reobfuscates the mod after building it.
  19. I18n.format returns the translated text prefixed with "Format error:" when String.format throws an IllegalFormatException . You can set a breakpoint in the catch block of Locale#formatMessage (called by I18n.format ) to see what this exception is. I suspect it's because you're using a percent sign followed by a letter (and then some other letters) as your own formatting placeholders, but String.format is trying to replace these itself and throwing an exception because they're not valid placeholders or there's no format arguments. Do one of the following to fix this: Use valid formatting placeholders (e.g. %d ), pass the format arguments to I18n.format and remove the String#replace calls. Escape the percent sign with another percent sign (%% ) to prevent String.format from treating it as a formatting placeholder.
  20. You're telling Minecraft to look for itemCheese.json, but your model is actually called ItemCheese.json. Paths on non-Windows filesystems and in JARs are case-sensitive, so the model location specified in your code must match the file name exactly.
  21. Run gradlew setupDecompWorkspace --info --stacktrace and post the output here, there may be some useful information in the log.
  22. Your packet handlers should use the existing IThreadListener API to schedule a task that runs on the main thread and does whatever the packet is supposed to do. The Simple Network Implementation documentation explains how to do this.
  23. You'll also need to override Block#getBlockLayer to return BlockRenderLayer.CUTOUT or BlockRenderLayer.CUTOUT_MIPPED ( BlockGrass uses the latter). This allows the block's textures to render with transparency. The Grey Ghost explains render layers in more detail here.
  24. The ItemStack argument of Item#onItemRightClick will only ever contain this . If it contains a different Item , something's gone wrong. This means your first if statement checking if the ItemStack contains Items.SLIMEBALL will never be true . This also means that you don't need to check which Item the ItemStack contains at all, you already know it's this . You're creating a new item, not using the vanilla one. I explained how to use events to detect when the player right clicks with a slimeball in your previous thread.

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.