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. Look at BlockColors / ItemColors or the implementations of IBlockColor / IItemColor .
  2. Are you sure you want to add a new pool for each item rather than adding the items to an existing pool? I'd recommend checking the name before you create any objects so they're only created when they need to be used. The value of the RandomChance condition should be between 0 and 1 (0% and 100%). Anything over 1 will always be true. I'd recommend separating out the values (conditions, functions, etc.) used by both entries and grouping the values only used by one entry with that entry.
  3. That's not the issue here. The issue is in the override of the Object#hashCode method in MysticalCropBlock .
  4. Each Minecraft registry is backed by a HashBiMap , which uses Object#hashCode to hash its keys and values. Your override of this in MysticalCropBlock is throwing a NullPointerException . To help you more, we'd need to see your code. Why are you overriding this anyway? I can't think of any reason for two instances of Block to be considered the same value.
  5. To set the metadata of the item, you need to create an instance of the SetMetadata function and include it in the LootFunction array parameter of the LootEntryItem constructor. For damageable items like tools, use the SetDamage function instead. The parameter names mostly correspond to the JSON format, which is explained here.
  6. BlockContainer overrides Block#getRenderType to return EnumBlockRenderType.INVISIBLE , which prevents the standard baked model from being rendered (so the model can be rendered by a TESR ). You could override Block#getRenderType to return EnumBlockRenderType.MODEL (like various vanilla blocks with TileEntities do), but the best way around this is to not extend BlockContainer at all. Instead, override Block#hasTileEntity(IBlockState) and Block#createTileEntity . MiningRig has a getRenderType method returning 3, but this no longer overrides Block#getRenderType in 1.9+. Always annotate override methods with @Override . If this gives you a compilation error, fix the method signature rather than removing the annotation.
  7. More Furnaces requires cxlibrary.
  8. Your block's model needs to specify a tint index for each face it wants coloured. See the wiki for more details or the grass model for an example. I'd also suggest updating to 1.9.4 or at least 1.8.9. In 1.9+, these methods have been replaced by the IBlockColor / IItemColor interfaces.
  9. If each subclass stores its property in a static field (and initialises it there), the base class can have an abstract method that returns the property and the subclasses can override it to return their property. You can call this method from createBlockState . BlockSlab does this for its variant property.
  10. From the description of the Modder Support section: Class.member refers to a static method/field of Class called member , Class#member refers to an instance method/field.
  11. Use MinecraftServer.getServer to get the MinecraftServer instance, MinecraftServer#getCommandManager to get the server's ICommandManager and ICommandManager#executeCommand to execute a command. You'll need an ICommandSender that has permission to execute the command, either use the player or create your own implementation. Only do this on the server.
  12. Use World#getEntitiesWithinAABB to get the EntityItem s on top of your block.
  13. Use reflection to access the EntitySilverfish#summonSilverfish field, then remove that value from the task list.
  14. That's the launcher log. The FML log should be in C:\Users\Vincenzo\Documents\Curse\Minecraft\Instances\Space Astronomy\logs\fml-client-latest.log.
  15. RenderingRegistry#registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) must be called in preInit, as noted by its doc comment. You're currently calling it in init.
  16. That's not the full FML log. I told you where to find it, so post the full log.
  17. Gradle skipped most of the tasks because it already has their output cached. setupDecompWorkspace won't directly add anything to the directory you run it from, its artifacts (the merged Minecraft and Forge binaries and source code) are stored in the Gradle cache. If you generate an IDE project (see this page) after running the task, you'll be able to browse the source code through the forgeSrc referenced library.
  18. Post the full FML log, as loordgek asked you to. You can find this in logs/fml-client-latest.log in your game directory.
  19. ClientProxy#init overrides CommonProxy#init , but never calls the super method. This means that your IGuiHandler is only registered on the dedicated server and not on the client. Make ClientProxy#init call the super method.
  20. Post your client proxy class.
  21. Post your copper block class.
  22. Ah, you're never registering your IGuiHandler from anywhere (at least not in the code you've posted). Call NetworkRegistry#registerGuiHandler in preInit.
  23. You can always break any block with any tool (or no tool), but blocks with a harvest level will only drop items when harvested with the correct tool. This is how it works in vanilla and in Forge.
  24. The method is called once for each hand. Return true to prevent the other hand from being processed (e.g. when the player is holding the appropriate item).
  25. Why aren't you using the existing constant ( References.MOD_ID ) in your @Instance annotation?

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.