Jump to content

vemerion

Members
  • Posts

    390
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by vemerion

  1. You could try to listen to the PlayerTickEvent and use the isSneaking() method on the player. That way you would avoid sending extra packets.
  2. InputUpdateEvent is a client only event, you can not add entities to the world from the client.
  3. I see nothing wrong with the code, could you post more context?
  4. In 1.15 at least you can override the isShield() method in your shield class, which should allow the shield to take damage when blocking with it.
  5. Hmm, in what way is the raytrace not working? Is it not detecting any blocks? What Minecraft version are you using? In 1.15 at least, you have to specify more parameters.
  6. You could perhaps do a raytrace, with World::rayTraceBlocks().
  7. You cannot rotate an AxisAlignedBB, as the name suggests, it will always be axis aligned.
  8. No problem, glad I could be of help
  9. The default color is returned for layer1 because you are returning 10511680 in getItemColor() if the layer is not 0. Try changing the last return to -1.
  10. Capabilities can be attached to chunks and used to store extra data.
  11. You can see examples of how vanilla Minecraft uses the BaseTreeFeatureConfig.Builder in the DefaultBiomeFeatures class.
  12. Where do you create the dynamic model? If you are using a TileEntityRenderer, then you should have access to the tile entity, and can access the state via tileEntity.getBlockState().
  13. If you need help getting started then Cadiboo's tutorial is quite good (most basic things should be the same for 1.16 as for 1.15). Regarding changing the player model, you could listen to the PlayerRenderEvent, cancel it, and render your own model.
  14. The mod is probably reaching across logical sides. Would you mind posting the full log?
  15. This is what the comment above the definition of the method says: Called when a record starts or stops playing. Used to make parrots start or stop partying. To call it you would need a BlockPos and not an int, so something like new BlockPos(1, 1, 1)
  16. Would a solution be to save nothing at all, i.e. let writeNBT and readNBT be empty methods? Then the maps would be set after an anvil enchant, and also every time the world is restarted (which would not be a big problem I think).
  17. I am not sure exactly what you are asking. My suggestion was that you look at the code in renderSky() to get an understanding of how vanilla Minecraft does the sky rendering. You can then use this newfound knowledge to implement your own custom sky rendering.
  18. Do you mean that you also want to save the state of the boolean when you exit the world? If so, then you also have to write/read it in your IStorage<IDefenseData> class.
  19. From what I know, world gen changed quiet a bit in 1.16.2, and not all features exists in forge yet. It might be that you have to stick to 1.16.1 for a while longer, until everything is implemented in forge 1.16.2.
  20. Well, first you would create you own IRenderHandler, which would render the sky. To get an idea of how vanilla does it, you can look at the renderSky() method in the WorldRenderer class. Then you would use setSkyRenderer() in your Dimension class to set the renderer to your custom IRenderHandler.
  21. You can use setSkyRenderer() in your custom Dimension class to render a custom sky.
  22. Most of the methods in AbstractBlock is marked as deprecated, but overriding them is still fine. The deprecation is only there to indicate that the BlockState version of the methods should be used when calling the methods.
  23. No problem, glad I could help!
  24. You have to register you data fields in the registerData() method, like so: protected void registerData() { super.registerData(); this.getDataManager().register(field_234232_bz_, 0); } Also, why do you have a data field named field_234232_bz_?
×
×
  • Create New...

Important Information

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