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. Use ItemStack#isItemEqual or ItemStack.areItemsEqual to check if the Item and metadata of the two ItemStack s are equal. Use ItemStack.areItemStacksEqual to check if the Item , metadata and NBT of the two ItemStack s are equal.
  2. The folders are highlighted in red because they've been marked as excluded. This is because they contain internal/auto-generated files that aren't relevant to the project. Gradle will skip tasks if they don't need to be run (e.g. if current and valid output already exists). These are marked with the orange circle with lines through it in IDEA's Gradle Run window. Neither of these are problems.
  3. Immersive Engineering uses OBJ models for its multiblocks, which can be larger than 3x3x3. It's only JSON models that have the size restriction.
  4. Click on the margin between the line numbers and the code.
  5. ItemSword 's override of Item#hitEntity doesn't deal any damage, that's handled by EntityPlayer#attackTargetEntityWithCurrentItem .
  6. You'll probably want to override Item#hitEntity to check if the player is sprinting before dealing the bonus damage.
  7. Post the code where you register your IItemColor . Is your IItemColor#getColorFromItemstack method ever called?
  8. [19:06:56] [Client thread/WARN]: Unable to resolve texture due to upward reference: #cross in oreflowers:models/block/item/flower Don't set layer0 to #cross in the model, do it in the blockstates file. Textures in models can't reference a texture defined in the same model. [19:06:57] [Client thread/ERROR] [FML]: Exception loading model for variant oreflowers:oreflowers1#flower_type=leadplant for blockstates ["oreflowers:oreflowers1[flower_stalk=false,flower_type=leadplant,item=true]", "oreflowers:oreflowers1[flower_stalk=false,flower_type=leadplant,item=false]"] Your blockstates file doesn't include the flower_stalk property. Edit: I see you've fixed this. I've created a sapling that uses the vanilla variants and defines the item models using Forge's blockstates format. You can see it for 1.10.2 here or 1.11 here (there's no difference in the sapling code, but each of these links is for a separate branch of the repository with code for that version).
  9. That's diesieben07's signature. It's not addressed to you.
  10. You'd need to have a property to determine the model that's true for items and false for blocks. Completely ignore it in your Block so it defaults to false , but set it to true for the variant of your Item 's ModelResourceLocation . You then need to create a model that extends item/generated (or the appropriate item model) and put it somewhere in assets/<modid>/models/block so it's accessible from your blockstates file. When the property is true , use this model; else use block/cross . You'll also need to set the layer0 texture to #cross in your defaults section (i.e. use the cross texture as layer0 ).
  11. You can see how I tell Gradle to compile my mod against Java 8 here.
  12. Why do you need an event? Where is it going to be fired from? Who's going to subscribe to it, and why? Create a class that extends net.minecraftforge.fml.common.eventhandler.Event . To fire it, create an instance and call EventBus#post .
  13. I don't know. Post your code.
  14. Create a thread in the Suggestions section or open an issue on GitHub.
  15. If you follow the methods used by CommandLocate , you'll see that it eventually calls IChunkGenerator#getStrongholdGen . ChunkProviderOverworld , ChunkProviderNether and ChunkProviderEnd all implement this using a chain of ternary operators with hardcoded structure names. ChunkProviderFlat implements it with a Map populated from the flat generator settings. What this means is that the /locate command only supports the vanilla structures. You could request for a way for the command to find modded structures, but this may or may not be accepted.
  16. Your post is confusing. Your title mentions 1.10 and your post says that you're updating, but you're referencing classes and methods ( NonNullList and func_190926_b ) that only exist in 1.11. Which version are you updating from and which version are you updating to? func_190926_b was renamed to isEmpty . You can use MCPBot to view the current and previous names of fields and methods.
  17. BlockEvent.HarvestDropsEvent will be fired when leaves decay naturally or are broken by a player. This is the event you should use. Metadata should be considered an implementation detail, don't check for specific values of it. Instead, use IBlockState#getValue to get the value of the appropriate property.
  18. There's a collection of them here.
  19. You need to register a name for your TileEntity class with GameRegistry.registerTileEntity in preInit.
  20. There's a list of tutorials here, but unfortunately none of them cover fluids. It's not a tutorial, but you can see how I've implemented fluids in my mod here: creation/registration, model registration, blockstates file
  21. That looks correct. I believe LexManos is strongly against the Forge documentation containing any "copy-pasta" code, i.e. fully working code blocks with minimal explanation apart from "copy this code into your code to make it work". If you have some well-documented example code, it may be added (though I don't speak for the Forge team).
  22. There's a list of tutorials here.
  23. You need to register an IStateMapper for your Block that ignores the state and always returns a constant ModelResourceLocation . The registerFluidModel method in my mod (linked in my previous post) does this.
  24. The whole point of the Capability system is that you don't implement interfaces on your TileEntity , instead you store the objects in the TileEntity and override the ICapabilityProvider methods to return them. Forge's documentation explains this in more detail here. I also have a simple explanation here. Don't implement IItemHandler on your TileEntity . Either use the CapabilityItemHandler.ITEM_HANDLER_CAPABILITY field directly or annotate your own field with @CapabilityInject . Don't use the existing field to initialise your own. Don't store the ItemStack array, only interact with your inventory through the ItemStackHandler ItemStackHandler implements INBTSerializable , use this to write it to and read it from NBT
  25. Using a fresh 1.11-13.19.0.2149 MDK with the mappings set to snapshot_20161118, the recompileMc task fails with a compilation error: Full log.

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.