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. There's nothing stopping you from reading the Minecraft and Forge code in your IDE if you've set up your workspace correctly. This page explains how to do that. In most cases, you can override Block#getDrops (or the vanilla methods called by it) to control the drops of a block; but this doesn't give you access to the player who broke the block or the tool they used to break it. The best way to have drops vary based on the tool used to break the block is probably to subscribe to BlockEvent.HarvestDropsEvent , check the block is yours, check which tool the player is holding and add the appropriate drops to the event's drop list.
  2. Search for that error message and you'll see that the most common cause is the JAVA_HOME environment variable being set to the JRE path instead of the JDK path.
  3. I explained how to do this in 1.10.2 here. In 1.8.x, you need to override the appropriate colour methods in your Block and Item instead of using IBlockColor / IItemColor .
  4. The relocate statement in the shadowJar block relocates a package, not a JAR.
  5. I'm shadowing the entire Fluent API JAR, not just a single class.
  6. As far as I can see, WorldEvent.Load is only ever fired once for each World instance.
  7. Use the Gradle Plugin syntax in section 1.2 of the user guide (I also use this in the build.gradle I linked). Add the dependency you want to shadow as normal in the dependencies block In the shadowJar block: Filter which dependencies are shadowed using the dependencies block Relocate the classes from the shadowed dependencies to your own package using relocate Set classifier to '' to overwrite the default JAR with the fat JAR produced by Shadow [*]Tell ForgeGradle to reobfuscate the output of the shadowJar task in the reobf block
  8. All colour-related methods in Block and Item were replaced by IBlockColor and IItemColor in 1.9. In init, get the BlockColors / ItemColors instance from Minecraft using the appropriate getter, create an IBlockColor / IItemColor implementation and then register it with BlockColors / ItemColors .
  9. Always specify the Minecraft version you're using in the thread title. Judging by the PotionEffect constructor you're using, I'd guess you're on 1.8.9. If you look at the implementation of World#spawnParticle , you'll see that it does nothing on the server and spawns the specified particle on the client. You need to send a packet from the server to all nearby players telling their clients to spawn the particles. You could do this with your own packet, but Minecraft already provides the WorldServer#spawnParticle method to do this for you.
  10. Which JDK version are you using? Immersive Engineering is trying to compile its source code against Java 8, so you need to be using JDK 8.
  11. In the code you posted, you're declaring a field called CACHE_WALL and then using a different variable called cache_wall . Please post your actual code and the error(s), not artificial snippets.
  12. You need to register a separate model for each metadata value of the Item using ModelLoader.setCustomModelResourceLocation .
  13. Use the Shadow Gradle plugin. I have an example here.
  14. Create a capability to store the timer. Forge itself has several capability examples, look at the usages of CapabilityManager.register in your IDE. There's also a test mod here. I have some examples here: API, implementation
  15. Forge itself has several capability examples, look at the usages of CapabilityManager.register in your IDE. There's also a test mod here. I have some examples here: API, implementation
  16. Old versions of Forge don't support Java 8, but you can install LegacyJavaFixer to fix this. 1.6.4 is extremely outdated and no longer supported here, you should update to 1.10.2.
  17. Use World#notifyBlockUpdate . Some class, field and method renames are documented on this issue tracker. Otherwise try looking for places where the class, field or method was used in the old version and then looking at what the new version uses in those places.
  18. TooManyItems is either broken or not meant to work when installed on the dedicated server. 1.7.10 is no longer supported here, you should update to 1.10.2.
  19. You need to remove the mod from your mods folder. Mods built for 1.7.10 only work in 1.7.10. Mods usually have the Minecraft version they're built for in their file names. If you still can't find it, upload the FML log (logs/fml-client-latest.log in your Minecraft directory) to Gist and link it here.
  20. You installed a coremod built for 1.7.10 or earlier on 1.10. Side note: Why are you using 1.10? It was obsoleted by 1.10.2 within a week or so of the first Forge release for it.
  21. Create an ItemStack of that Item with the appropriate metadata.
  22. Have you tried BiblioCraft?
  23. There are various tutorials linked here.
  24. Do not use OpenGL in your Item class. Do not create your own ItemColors instance. Do not try to register an IItemColor every tick. In init, get Minecraft's ItemColors instance ( Minecraft#getItemColors ) and then create and register a single IItemColor for your Item . In the IItemColor implementation, use the three integers stored in the ItemStack 's NBT to determine the colour to return. The format is r << 16 | g << 8 | b (where r , g and b are the red, green and blue components of the colour).

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.