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.

BeefEX

Members
  • Joined

  • Last visited

Everything posted by BeefEX

  1. Hi, is there a way to get recipe of certain ItemStack? I tried messing with Crafting Manager with no success? Can somebody point me the correct way? Thanks ~BeefEX
  2. Hi, is there a way to get recipe of certain ItemStack? I tried messing with Crafting Manager with no success? Can somebody point me the correct way? Thanks ~BeefEX
  3. So do i have to use that plugin? I dont quite understand how to use it .
  4. Hi, i added my library that i want to use to my libs folder. I can use them i code, minecraft runs ok. But when i build the mod and try to launch it says that classes from that library are missing. I have tried adding that library to my build.gradle as dependenci but that did not work. Any ideas? Thanks ~BeefEX
  5. I tried adding world.isRemote to this if if (tileEntity == null) { return false; } and it simply does nothing. That method is not executed on server side.
  6. I think i do becose i am summoning item but it is just ghost item. @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int metadata, float what, float these, float are) { if (cooldown > 0) { return false; } TileEntityInfuser tileEntity = (TileEntityInfuser)world.getTileEntity(x, y, z); if (tileEntity == null) { return false; } ItemStack heldItem = player.inventory.getCurrentItem(); if (heldItem == null) { if (player.isSneaking()) { ChatUtils.newChatMessage(player, "Stored NatureFlux: " + String.valueOf(storedNF)); } else if (!player.isSneaking() && tileEntity.getStackInSlot(0) != (ItemStack)null) { ItemStack item = tileEntity.getStackInSlot(0); float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; entityItem.motionX = rand.nextGaussian() * factor; entityItem.motionY = rand.nextGaussian() * factor + 0.2F; entityItem.motionZ = rand.nextGaussian() * factor; world.spawnEntityInWorld(entityItem); tileEntity.setInventorySlotContents(0, (ItemStack)null); } } else { if (player.isSneaking() && heldItem.getItem().getUnlocalizedName() == NFItems.transmutator.getUnlocalizedName()) { //Playrutils.removeItem(player, heldItem); tileEntity.setInventorySlotContents(0, heldItem); player.inventory.decrStackSize(player.inventory.currentItem, 64); //player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); } else if (!player.isSneaking() && tileEntity.getStackInSlot(0) != (ItemStack)null) { ItemStack item = tileEntity.getStackInSlot(0); System.out.println(item.getItem().getUnlocalizedName(item)); float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; entityItem.motionX = rand.nextGaussian() * factor; entityItem.motionY = rand.nextGaussian() * factor + 0.2F; entityItem.motionZ = rand.nextGaussian() * factor; world.spawnEntityInWorld(entityItem); //tileEntity.setInventorySlotContents(0, (ItemStack)null); } } cooldown = 10; return true; }
  7. In onBlockActivated method of my block class.
  8. Hi, when i use this player.inventory.decrStackSize(player.inventory.currentItem, 64); or this player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); to remove Item from players inventory it comes back in any ideas?

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.