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.

johnhollowell

Members
  • Joined

  • Last visited

  1. I found this on the Enchanted book. might help you. /** * Adds an stored enchantment to an enchanted book ItemStack */ public void addEnchantment(ItemStack par1ItemStack, EnchantmentData par2EnchantmentData) { NBTTagList nbttaglist = this.func_92110_g(par1ItemStack); boolean flag = true; for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound = (NBTTagCompound)nbttaglist.tagAt(i); if (nbttagcompound.getShort("id") == par2EnchantmentData.enchantmentobj.effectId) { if (nbttagcompound.getShort("lvl") < par2EnchantmentData.enchantmentLevel) { nbttagcompound.setShort("lvl", (short)par2EnchantmentData.enchantmentLevel); } flag = false; break; } } if (flag) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setShort("id", (short)par2EnchantmentData.enchantmentobj.effectId); nbttagcompound1.setShort("lvl", (short)par2EnchantmentData.enchantmentLevel); nbttaglist.appendTag(nbttagcompound1); } if (!par1ItemStack.hasTagCompound()) { par1ItemStack.setTagCompound(new NBTTagCompound()); } par1ItemStack.getTagCompound().setTag("StoredEnchantments", nbttaglist); } Hope this helps!
  2. What was causing my bug is that I didn't have this: @Override public boolean renderAsNormalBlock(){ return false; } Once I changed this, it worked perfectly!
  3. I also am trying to get a block to be walk through. I looked at the vanilla blocks that are walk through, namely BlockTallGrass and it's super class, BlockPlant. Both have this: public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } When I use this on my block, I can force my player into the block by having it in a hole, but when there is an open area to the side of the block the block pushes me into the open space. Anyone know how to fix this?

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.