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.

Leaderboard

Popular Content

Showing content with the highest reputation on 02/27/17 in all areas

  1. Minecraft doesn't let you control how many levels an enchantment consumes, it's always 1, 2 or 3 depending on which slot of the enchantment table it's in. To add an enchantment, create a class that extends Enchantment and register it like any other IForgeRegistryEntry (i.e. IForgeRegistry#register in RegistryEvent.Register<Enchantment> or GameRegistry.register in preInit). Override Enchantment#getMinEnchantability and Enchantment#getMaxEnchantability to control the enchantablility and XP levels required to apply the enchantment. Create an EnchantmentType with EnumHelper.addEnchantmentType or override Enchantment#canApply/Enchantment#canApplyAtEnchantingTable to control which items the enchantment can be applied to. Override Item#canApplyAtEnchantingTable to control which enchantments can be applied to an item.
  2. After changing the > to >= in your code, it correctly dropped a spawn egg in 1.11.2; though the spawn egg didn't have its entity set. I'd recommend using Entity#setDead rather than World#removeEntity. I'd recommend using the entity name NBT tag rather than using the global ID as the metadata, since this is what every version since 1.9 uses. In 1.8.x, set the entity_name tag to the entity's name (EntityList.getEntityString). In 1.9+, set the EntityTag tag to a compound tag with the id tag set to the entity's name (EntityList.getEntityString in 1.9-1.10.2, EntityList.getKey in 1.11+).
  3. There is no Player class in Minecraft, you probably imported the one from the IXBM library. As @Kriptikz suggested, EntityPlayer is the class used by Minecraft to represent player entities.
  4. Item#canApplyAtEnchantingTable doesn't seem to exist?
  5. What you need to do is in your processInteract method when you call openGui instead of passing an x position you should pass getEntityID(). Then when you construct your Container and Gui pass World#getEntityBy/FromID(x)
  6. When an egg damages an entity, DamageSource#getDamageType will return "thrown", DamageSource#getSourceOfDamage will return an instance of EntityEgg and DamageSource#getEntity will return the entity that threw the egg (if any).
  7. This is an intended feature, not a bug.

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.