Skip 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. No, unlocalised names should only be used for display/translation purposes. They're not unique and can change at any time. Instead, compare the Item instances directly (e.g. stack.getItem() == MyModItems.FOO_BAR) or check if the Item is an instance of the appropriate class (e.g. stack.getItem() instanceof ItemFooBar). This also applies to other registry entries like Blocks and Enchantments. Don't use numeric IDs, they can be different in every save. Use EnchantmentHelper.getEnchantments to get the Enchantments on an ItemStack. The Vanilla Enchantment instances are stored in the Enchantments class. Recipes are managed by a Forge registry, register them in the appropriate registry event; just like you do for Blocks, Items, etc. The name argument of addShapelessRecipe is the registry name of the recipe and the group argument is the recipe's group name. Recipes with the same group name are displayed in the same button in the recipe book. You should move your recipes to the JSON system rather than hardcoding them.
  2. You've got your fromBytes and toBytes implementations around the wrong way. fromBytes needs to read the data from the byte buffer into the fields of the packet; toBytes needs to write the data from the fields of the packet into the byte buffer.
  3. You can specify display transformations in Forge's blockstates format, but not in the Vanilla model format like you're doing. I explain how to do this here.
  4. This is an issue with Blood Magic, it was fixed in version 1.12.2-2.2.1-83 of the mod. Update to the latest version.
  5. Are there any errors in the log? Try setting breakpoints in EntityLiving#dropLoot, LootTableManager#getLootTableFromLocation and LootTableManager.Loader#load and stepping through them when a Shulker dies.
  6. Vanilla's implementation is in various places in ModelBakery (look for uses of ModelBakery.MODEL_GENERATED), but Forge replaces this with ItemLayerModel.
  7. This isn't possible in 1.8. Update to 1.11.2+ (ideally 1.12.2) and subscribe to ClientChatEvent.
  8. To specify NBT for an ingredient, use an ingredient of type minecraft:item_nbt and specify the NBT data in the "nbt" property. To specify NBT for a result, simply specify the NBT data in the "nbt" property. You can see an example of a recipe that results in a spawner here.
  9. So that Baby Zombies drop roughly 2.5x more experience from the super call in EntityZombie#getExperiencePoints. If you mean assets/<mod_id>/loot_tables/..., then yes.
  10. Though it should be noted that this affects the loot table globally rather than for just a single entity.
  11. You can set the EntityLiving#deathLootTable field using reflection to change an entity's loot table. You can also subscribe to LivingDropsEvent to change the item dropped by an entity. You can set the EntityLiving#experienceValue field using reflection to change the amount of experience dropped by an entity, though some entities set this field after the initial spawn (e.g. Baby Zombies do this on death). You can also subscribe to LivingExperienceDropEvent to change the amount of experience dropped by an entity.
  12. I didn't know that, because you haven't said anything about that before now. Why do you have two copies of the Forge JAR? You only need one. Add quotation mark characters (") directly before and after the JAR file name.
  13. You should be using Java 8, not Java 7. Unless you need Java 9 for non-Minecraft things, you should uninstall that as well. You can either specify the full path to java.exe in the command or remove the other versions of Java form the PATH environment variable and add Java 8.
  14. Either rename the JAR to remove the " (2)" from the name or wrap the name in quotation marks in the batch script. Once you've done that, either run the command or the batch script.
  15. Change minecraft_server.1.10.2.jar to the name of the Forge JAR file.
  16. You're using Java 9, which isn't supported by Forge. You need to use Java 8 instead.
  17. You're launching minecraft_server.1.10.2.jar, which is the Vanilla server. You need to launch the Forge JAR instead.
  18. There are, added in this PR specifically for situations like Chisel and CTM. tterag1098 (the primary maintainer of Chisel) said here that they'd switch to this system for CTM as soon as possible, but it appears that this has been forgotten. I've reported this to Chisel here.
  19. That doesn't answer my question completely. It's possible that the resource pack replaces the minecraft:stone blockstates file or the minecraft:block/stone and minecraft:block/stone_mirrored models with models that use a different texture name rather than replacing the minecraft:blocks/stone texture.
  20. This is because Chisel doesn't actually declare CTM as a dependency, it runs some client-only code in preInit to detect whether CTM is present and display the Missing Mods screen if it isn't. I believe it does this because CTM is only required on the client and not on the server.
  21. Does the resource pack definitely provide the minecraft:blocks/stone texture?
  22. I believe so, yes. I'm not sure if it makes much difference, Minecraft uses Grass everywhere and the game still manages to run. You can also use a multi-layer model (forge:multi-layer) that renders a model with the opaque base texture in the SOLID layer and another model with the transparent overlay texture in the CUTOUT_MIPPED layer; but this is probably overkill for a simple model like this. This requires overriding Block#canRenderInLayer to return true for the layers that the block can render in.
  23. Use ItemStack#isEmpty to check if an ItemStack is empty.
  24. Minecraft renders blocks with transparency disabled by default, you need to tell it to render your block in a different layer to use transparent textures. Do this by overriding Block#getBlockLayer to return CUTOUT, CUTOUT_MIPPED, or TRANSLUCENT as appropriate. The Grey Ghost explains the difference between the layers here. Grass (BlockGrass) uses a model like this with CUTOUT_MIPPED.
  25. MathHelper.wrapDegrees looks like the method you want. I discovered this by opening the MathHelper class and looking for a method that appeared to clamp an angle. I probably could have used MCPBot to find the new name of the method as well.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.