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. It looks like an issue with Extra Utilities 2, but you have a lot of coremods installed that could be screwing things up. Test it with the latest version of Extra Utilities 2 and without all of the coremods. If the issue persists, report it to the author.
  2. On Sponge's GitHub.
  3. Make sure you read the installation instructions for the mods you're using.
  4. We can't help you without seeing the FML log (logs/fml-client-latest.log), upload it to Gist and link it here.
  5. EnergyStorage doesn't implement INBTSerializable, so it doesn't have methods to read it from/write it to NBT. Either get the capability's IStorage (Capability#getStorage) and use that to read from/write to NBT or do it yourself (storing the energy in a single integer tag).
  6. That looks mostly correct, but there are some minor changes I'd recommend: Only catch the most specific exception you have to, i.e. IOException rather than Exception. This lets other exceptions propagate upwards so they can be handled by Minecraft itself. Log the exception with a log4j Logger rather than just printing its stack trace. This will ensure it's formatted properly in the console and FML log. Consider using ItemStack#serializeNBT (from the INBTSerializable interface) rather than ItemStack#writeToNBT. This creates the NBTTagCompound for you and returns it. That should be all you need, yes.
  7. WorldSavedData only saves data to the disk on the logical server, so it's not really suitable for your purposes. You can look at how MapStorage reads and writes WorldSavedData instances to .dat files using CompressedStreamTools, though you won't be able to use ISaveHandler#getMapFileFromName from the logical client (since the client-side implementation always returns null).
  8. The OP is asking about loot tables, not fields.
  9. You can use the enchant_randomly loot function to apply a random level of an Enchantment randomly selected from the provided list of Enchantment registry names (which can be a list of a single name). If you want an exact level, you'll need to create your own LootFunction and LootFunction.Serializer implementations and use LootFunctionManager#registerFunction to register them. Potion items already store their PotionType using its registry name, but custom PotionEffects are still stored using Potion IDs. There's no vanilla loot function to create potion items, you'd have to write your own if you wanted to use Potion registry names when specifying custom PotionEffects.
  10. You'll likely need to store which attachments the gun has using NBT or capabilities. There are several possible ways to handle the model: Create a model for each possible state of the gun (e.g. no attachments, scope, bi-pod, scope and bi-pod, etc.) and register an ItemMeshDefinition to choose the appropriate one based on the current attachments. Create the base gun model and a model for each attachment and combine them as submodels using Forge's blockstates format. You'll still need to register an ItemMeshDefinition to choose the appropriate variant of the blockstates file based on the current attachments. Generate the models at runtime with an ICustomModelLoader, IModel and IBakedModel. Forge has several examples of this.
  11. You need to set the item's model using ModelLoader.setCustomModelResourceLocation or ModelLoader.setCustomMeshDefinition. Call these in preInit (or ModelRegistryEvent in 1.10.2+) from a client-only class. 1.8 isn't really supported by Forge any more, you should update directly to 1.11.2 or at least to 1.8.9.
  12. Regular properties are represented by an IProperty and have a fixed set of values of a type that implements Comparable (e.g. the two booleans, a range of ints or a set of enum values). These can be stored in metadata or set in Block#getActualState and can be used to determine which model is used for the IBlockState. Unlisted properties are represented by an IUnlistedProperty and can have any number of values (e.g. any float or any object of the specified type), with IUnlistedProperty#isValid being used to determine whether or not a value is valid. These must be set from Block#getExtendedState and can be used by the IBakedModel to change how it's rendered. To use unlisted properties, you need to return an ExtendedBlockState from Block#createBlockState instead of a BlockStateContainer. If you use BlockStateContainer.Builder to create the state container, you don't need to worry about using the right class for your properties, it will create an ExtendedBlockState if you've added unlisted properties or a BlockStateContainer if you haven't.
  13. BlockDragonBreedEgg#getStateFromMeta is trying to set the breed property to null, but this isn't a value allowed by the property. You need to figure out where this null is coming from and what the actual value is supposed to be.
  14. This was fixed in Forge 1.11.2-13.20.0.2240. Always make sure you're running the latest version before reporting bugs, otherwise they may have already been fixed.
  15. They can, using AnimationModelBase. This also allows the model to be animated with Forge's baked model animation system.
  16. You need to add a LayerBipedArmor to the Render with RenderLivingBase#addLayer to render the entity's armour. I'm not too sure why the AI isn't working, you may need to step through it in a debugger to see where it goes wrong.
  17. EntityHumanFighter#initEntityAI calls super.applyEntityAttributes, which registers the entity's attributes. This method has already been called by the EntityLivingBase constructor, so the attribute registration fails with an exception because the attributes it's trying to register have already been registered. EntityHumanCivilian doesn't do this, so it can be summoned without issue.
  18. Don't download mods from sites like Minecraftexe, these often host outdated and potentially malicious versions of mods. Only download mods from their official source, usually a Minecraft Forum thread or Curse project. You can read more about this here. You can find ATG's official Minecraft Forum thread here and Curse project here. Probably not. ATG adds several of its own biomes, these would revert to vanilla plains biomes without the mod installed. In addition, any new terrain generated would use the vanilla generator rather than the ATG one.
  19. Either navigate to them in the forgeSrc-<forgeVersion>.jar referenced library or use Navigate > Open Type (Ctrl-Shift-T) to search for a class by name.
  20. Either set "Use classpath of module" to "EnviromineRevived_main" for each run configuration or re-import the Gradle project and uncheck "Create separate module per source set". cpw explains how to do the latter in this video.
  21. LivingEntityUseItemEvent.Finish is fired when an entity finishes using an item (i.e. uses it for its full duration), directly after Item#onItemUseFinish is called. This is probably the event you want. If the entity was using a potion, the stack size will have already been reduced by 1 when the event is fired. If the stack was empty after this (i.e. stack size was reduced to 0), it will have been replaced by an ItemStack of Items.GLASS_BOTTLE. If you want access to the original ItemStack, you'd need to subscribe to LivingEntityUseItemEvent.Tick and store a copy of it (not the original) in a capability attached to the entity (if it's a potion). The PotionUtils class has several methods that read PotionEffects from potion item NBT.
  22. The fields at the top of the GameData class hold the minimum and maximum IDs for the vanilla registries, i.e. Blocks, Items, Potions, Biomes, SoundEvents, PotionTypes, Enchantments and Entities.
  23. Probably, but you may end up re-implementing a lot of the structure system yourself.
  24. If the chat GUI is already open, you can add text to it by calling GuiTextField#writeText on GuiChat#inputField. The field is protected, so you'll need to access it via reflection.
  25. Create an instance of GuiChat using the GuiChat(String) constructor, which populates the text box with the specified string; then display it with Minecraft#displayGuiScreen. There's no existing server-to-client packet that does this, so you'll need to create your own.

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.