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.

MorelPlay

Members
  • Joined

  • Last visited

  1. How can I generate a new UUID?
  2. I'm trying to create a potion effect with the resistance knockback attribute but not find the UUID anywhere. Minecraft Attributes page is missing. http://minecraft.gamepedia.com/Attribute Can someone tell me what I can do? public static final CustomPotion KnockbackPotion = (CustomPotion) new CustomPotion(new ResourceLocation(EnergyTools.MODID + ":Knockback"), false, 8171462).setPotionName(EnergyTools.MODID + "potion.KnockbackPotion").registerPotionAttributeModifier(SharedMonsterAttributes.KNOCKBACK_RESISTANCE, "UUID?", 5D, 2);
  3. Hello, I'm having a problem with my code 1.11.2. For some reason it is not working properly and when I break a spawner with silk touch, it gives me the spawner without the entity tag, it always gives me the spawner of pig. This is my code, I would be grateful that someone could help me. Thank you @SubscribeEvent public void onBlockBreak(BlockEvent.BreakEvent e) { IBlockState state = e.getState(); World world = e.getWorld(); BlockPos pos = e.getPos(); EntityPlayer player = e.getPlayer(); ItemStack heldItem = player.getHeldItem(EnumHand.MAIN_HAND); if (state.getBlock() == Blocks.MOB_SPAWNER) { Map<Enchantment, Integer> enchants = EnchantmentHelper.getEnchantments(heldItem); if (enchants.containsKey(Enchantments.SILK_TOUCH)) { ItemStack stack = new ItemStack(Blocks.MOB_SPAWNER, 1, 0); NBTTagCompound nbttagcompound = new NBTTagCompound(); world.getTileEntity(pos).writeToNBT(nbttagcompound); stack.setTagInfo("BlockEntityTag", nbttagcompound); e.setExpToDrop(0); e.getWorld().spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack)); } } }

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.