Jump to content

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.
    1 point
  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)
    1 point
  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.
    1 point
  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.
    1 point
  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.
    1 point
  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.
    1 point
  7. Look at how the biome adds like tree gen features.
    1 point
  8. You'll need to make a special Renderer. Try taking a look at net.minecraft.client.renderer.entity.TridentRenderer to get started.
    1 point
  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.
    1 point
  10. All the prefixes became postfixes. Its BlockItem now, not ItemBlock. (BlockDirt -> DirtBlock : ItemBlock -> BlockItem)
    1 point
  11. event.getState() will give you the BlockState
    1 point
  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.
    1 point
  13. Exactly how are you supposed to get tools if you can't punch trees? Please explain.
    1 point
  14. Then you'll want to check if they have a tool that can break the block.
    1 point
  15. Oops my bad. Use ItemStack#isEmpty so event.getEntityPlayer().getHeldItem(Hand.MAIN_HAND).isEmpty()
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.