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.

Leaderboard

Popular Content

Showing content with the highest reputation on 09/08/19 in all areas

  1. You'd put it anywhere. Static variables only exist once. No it would only compute it where you told it to compute it. I would need more information on what would affect the values to determine where it should be computed.
  2. If you're just saving an array list that stores two values you should store a ListNBT or a TagListNBT. I'm not sure what it was changed to recently. But that tag list needs to store a CompoundNBT in which you will call CompoundNBT#putDouble(ID, double) and CompoundNBT#putString(ID, string)
  3. No they do not. In order to do this I recommend using your own custom arrow instead of the regular one. Just replace the original one spawned with your custom one when the conditions are met.
  4. Don' change the values on the client based on what the client says is true. The client can and will lie. Always and only change the data on the server and then sync it to the client via the use of packets. It's actually the other way around. I can't remember the explanation I've heard for it's name though. But basically always check for !world.isRemote or Entity#isServerWorld; which both do the same thing.
  5. Remote means the client - I think you are only supposed to set capability values on the server. So use !isRemote when you want to set capability values.
  6. Check out AxeItem or HoeItem or ShovelItem. They all do it. I think the iron golems are handled in the Pumpkin blocks class. You'll need to override onBlockPlacedBy in your Blocks class. And if they aren't your blocks you'll need to use an event. I think BlockEvent.Placed? I'm not sure about the name.
  7. Look at how the biome adds like tree gen features.
  8. You'll need to make a special Renderer. Try taking a look at net.minecraft.client.renderer.entity.TridentRenderer to get started.
  9. You need to set the max damage when registering the item. E.g. new Spear(new Item.Properties().group(group).maxDamage(250).setRegistryName(name)) Source: net.minecraft.item.Items If you don't, the first if statement in TridentItem#onItemRightClick will trigger and return a FAIL.
  10. All the prefixes became postfixes. Its BlockItem now, not ItemBlock. (BlockDirt -> DirtBlock : ItemBlock -> BlockItem)
  11. event.getState() will give you the BlockState
  12. Well you know how to get the Item and the ItemStack the player is holding. You can check. Look at the tool Items in Items.class. They have methods you might be able to use. Or you can use instanceof checks.
  13. Exactly how are you supposed to get tools if you can't punch trees? Please explain.
  14. Then you'll want to check if they have a tool that can break the block.
  15. Oops my bad. Use ItemStack#isEmpty so event.getEntityPlayer().getHeldItem(Hand.MAIN_HAND).isEmpty()

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.