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.

FirstOrderKylo

Members
  • Joined

  • Last visited

  1. Hello, So in short, I'm trying to animate a model in one of 2 ways, way 1 is preferred but if not possible, 2 would be just as good. Currently I have an item of a drill, it has a model and texture and all that wonderful stuff, however when I right click with the item, I'd like the drill bit at the end to start rotating (like it's powered up) if this is not possible then I'd be more than happy to accept it always look 'powered on' but the right click version is proffered.
  2. I got it to work. getBlockInSlot is used in this bit of code (composition is a string called in another class to write on the gui): if (te.getBlockInSlot(0) == Blocks.nether_brick) Composition = "it worked"; for anyone who comes along later, this is the code bit I used in replacement of: if (te.getBlockInSlot(0) == Blocks.nether_brick) Composition = "it worked"; new, working code: if (Block.getBlockFromItem(te.getStackInSlot(0).getItem())== Blocks.bedrock) Composition = "it worked";
  3. Hello, so I'm trying to create a method in my TileEntity class to get the block in a specific slot so it can be used like "getBlockInSlot(index)" Currently I have: private ItemStack[] inventory; private Block[] inventory2; @Override public ItemStack getStackInSlot(int index) { if (index < 0 || index >= this.getSizeInventory()) return null; return this.inventory[index]; } public Block getBlockInSlot(int index) { if (index < 0 || index >= this.getSizeInventory()) return null; return this.inventory2[index]; } which is a copy of the getStackInSlot method with a different return type and location to return to and that one works, but getBlockInSlot gives this crash report when an item goes into the TileEntitySlot specified with getBlockInSlot() [p]Report:[/p]

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.