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.

leviathan01

Members
  • Joined

  • Last visited

  1. thanks but I knew all that I just do not know how to change the texture.
  2. how do I return a different texture.
  3. I would like to change the texture of a item when the player right clicks. I can detect when a player clicks, but I can not change the texture.
  4. I fixed my problem, old code... @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { System.out.println("test"); return itemStack; } new code... @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if (!world.isRemote) { System.out.println("test"); // more code here } return itemStack; }
  5. I got it to work by add "!world.isremote" tests to where "onCast()" is called.
  6. I have tried it as if (!world.isRemote) and if (world.isRemote) and it still will not work.
  7. like this? @Override public boolean onCast(EntityPlayer player, int x, int y, int z) { y += 1; World world = player.worldObj; if (!world.isRemote) { if (world.getBlock(x, y, z) == Blocks.water) { world.setBlock(x, y, z, Blocks.ice); } return true; } return false; }
  8. it Is called in the "onItemUse()" method of a item. p.s. I am new to minecraft modding.
  9. the name says it all, and some code ... @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { System.out.println("test"); return itemStack; }
  10. when I use setBlock the block appears then disappears. this is my code ... public boolean onCast(EntityPlayer player, int x, int y, int z) { y += 1; World world = player.worldObj; if (world.getBlock(x, y, z) == Blocks.water) { world.setBlock(x, y, z, Blocks.ice); return true; } return false; } the x, y, z is the block the player right clicks.

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.