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. My post was partially incorrect: The constructors are protected so you do need to create a class that extends ItemAxe , but you don't need to create a copy of ItemAxe .
  2. You don't have to create your own class, just use the ItemAxe(Item.ToolMaterial, float, float) constructor added by Forge.
  3. ModelLoader methods must be called in preInit. If they're called in init or later, they won't have any effect.
  4. Theoretically, compile is for dependencies that are required at both compile-time and runtime and provided is for dependencies that are required at compile-time but optional at runtime. Practically, I'm not sure if there's any difference between the two in terms of Forge modding. deobfCompile and deobfProvided are the same as compile and provided , but ForgeGradle will deobfuscate them on disk. If you add a mod as a non- deobf dependency, its source code will be obfuscated when you view it in your IDE and it will only be deobfuscated at runtime. I haven't experienced this myself, I'm not sure what would cause it or how to fix it.
  5. That model is from 1.8.x, 1.9 split the firstperson and thirdperson display transformations into left-/right-hand versions and added several models like item/generated and item/handheld that define the standard display transformations for you.
  6. You'll probably want to use a TileEntitySpecialRenderer to render a 2D texture, RenderFireball does something like this.
  7. Just add them as dependencies through Gradle. Your mod won't require them at runtime unless you use classes from them. You can also add them as deobfProvided / deobfCompile dependencies to have ForgeGradle deobfuscate them on-disk. See the MDK's build.gradle for more details.
  8. JurassiCraft couldn't find a class from LLibrary. Make sure you're using the latest versions of both mods.
  9. Forge's blockstates format is documented here.
  10. This page explains how to schedule a task on the main thread from an IMessageHandler using IThreadListener .
  11. Both Block arguments of the ItemMultiTexture constructor should be the same value. I have no idea why there's two arguments, the second one is assigned to a field that's never actually used anywhere.
  12. If your Block uses metadata, you need to override Item#getMetadata in your ItemBlock class to return the block metadata corresponding to the supplied item metadata. In most cases these are the same, so just return the argument. Consider using ItemMultiTexture instead of ItemBlock , it overrides this method and also overrides Item#getUnlocalizedName to return a different name for each metadata value.
  13. Register each Block or Item instance once, regardless of whether or not it uses metadata. There's nothing more to it.
  14. The client proxy class you specified in the @SidedProxy annotation doesn't exist. Make sure the annotation matches the actual class's name and package exactly.
  15. Forge version: 1.10.2-12.18.1.2044 FML logs: link Working test mod: link Steps to reproduce: Download and set up a fresh MDK Put a mod in run/mods and run Minecraft from the IDE If it's EnderCore, the game crashes. If it's another mod that references the same method, the game runs without issue. This has also been reported by other people here and here. I've only been able to reproduce it with EnderCore, but it doesn't seem like an issue caused by it.
  16. Why are you creating a new instance of BiomeGenHell instead of using the existing one stored in BiomeGenBase#hell ? Looking at BiomeDictionary , this is already registered with Type.NETHER by default.
  17. ObfuscationReflectionHelper definitely exists in 1.8.9. DimensionType was added in 1.9, the 1.8.9 equivalent is DimensionManager#registerProviderType . Use BiomeDictionary#registerBiomeType to register one or more Type s for a BiomeGenBase .
  18. Yes. You can only cast a value to a type if you know that it's a value of that type. I just noticed that you appear to be using a field of your Item class as a timer, this won't work. Item s are singletons, only one instance exists per item type. This means that you can't store per-stack data in fields, you need to store it in the ItemStack (using metadata, NBT or capabilities).
  19. Entity#rayTrace is a client-only method, you can't use it on the server. Use Item#rayTrace to raytrace along a player's look vector for their reach distance.
  20. You have the world and the position of the block that was right clicked, so use World#getBlockState .
  21. event.getPhase(); is returning an EventPriority for some reason. You actually want the TickEvent#phase field rather than the Event#getPhase method. The method has a slightly confusing name, since it isn't immediately obvious that an EventPriority is a type of phase (but not the same type as TickEvent.Phase ).
  22. The simplest way is to store a collection of Runnable s (possibly a Queue ) to be executed next tick, then subscribe to ClientTickEvent and check that the Phase is Phase.START before executing and stored tasks and removing them from the collection.
  23. The Side you pass to SimpleNetworkWrapper#registerMessage is the side that the packet is received and processed on, not the side it's sent from. If the packet is being received on the client, pass Side.CLIENT .
  24. Entities aren't singletons, you can't just store a single instance and reuse it. You need to create a new instance every time you want to spawn one.
  25. Do you know what he means? Is it fixed now? That particular error is fixed, but I've found a new one and reported it here.

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.