Jump to content

Beethoven92

Members
  • Posts

    687
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Beethoven92

  1. Entities already provide a tick method..you can override that method in a custom entity (that extends the Entity class) and do what you want with it, and that includes counting how many ticks have passed since the entity was created (which coincide with you right clicking with the wand)
  2. Then...it doesn't fully work technically, anything that "ticks" inside the game can help you counting ticks..so instead of messing with threads i suggest something simpler: when you cast your spell (I suppose this would be handled by right clicking with your wand?) create a custom entity in the world at the position the player is when the item is used. This entity would just be an invisible timer, as you can count 1 second (or 20 ticks) inside its tick method. When the time runs out use World#createExplosion (at the position of the entity, which was the position where you used the wand) and then remove the entity from the world. This is one method that came to my mind..but there are probably also other ways to do what you want
  3. Let me understand this: do you want the explosion to happen 1 second after you use you wand (at the position the player used the wand)..or you want the explosion to happen as soon as you use the wand but at a position where the player was 1 second earlier?
  4. So? Also, have you even read what Diesieben07 and TheGreyGhost suggested you? They basically gave you the solution..take some time to read the documentation and GreyGhost's example code please
  5. They should be register during the FMLClientSetupEvent...In you client proxy class you even added a method for that: public void registerRenderers(Item item, int meta, String id) { }
  6. Sorry for the late response, i am doing the same to the end dimension at the moment so i did some research on the matter myself. Unfortunately at the moment this is surely not the most trivial of the tasks...Nether and End biomes are hardcoded into their respective biome providers, so you would need to create your own NetherBiomeProvider and replace the vanilla one (of course this may cause incompatibilities..) making it generate also your custom biomes. It really depends on your skills and the will to go through this process..otherwise if you don't want to bother messing with that you can just wait for forge to implement a more user friendly hook into Nether and End generation..if you want to give it a try though you may take a look at how this mod does the trick: https://github.com/CorgiTaco/BYG
  7. Check out this tutorial by TheGreyGhost: https://github.com/TheGreyGhost/MinecraftByExample/tree/working1-16-3/src/main/java/minecraftbyexample/mbe05_block_advanced_models
  8. Then follow the suggestion of poopoodice
  9. I am not sure i fully understand that question, could you explain better?
  10. Do you want your items to drop like you are pressing Q or you just want 10 item entities to spawn in the world near you?
  11. I just gave a quick look to the code...but it seems you forgot to register your ENTITY_TYPE DeferredRegister to the mod event bus
  12. setWaterLevel just sets a value for the integer property LEVEL of the cauldron block...this value is then used in the blockstate to select the appropriate model for the block: when the value is 0 the model shown will be the empty cauldron one, when the value is 1 the model will be the slightly filled cauldron (which, i remind, is just the normal cauldron model with the addition of a cuboid that represent the water inside), and so on for the values 2 and 3 of the LEVEL property...it seems like this would be a good and useful read for you: https://mcforge.readthedocs.io/en/latest/blocks/states/
  13. The liquid you see inside the cauldron is just a textured cuboid (using still water texture) that is specified in the cauldron model jsons (depending on the level of the liquid contained inside). The model corresponding to the level of the liquid in the cauldron (0 to 3) is selected using the IntegerProperty LEVEL of the CauldronBlock. If you need your custom cauldron to have a similar behaviour (different levels of water inside) then you can go on and do what the vanilla cauldron does..if you just want it to be filled or not (so 2 states) you can use a BooleanProperty and select the models in your cauldron blockstate according to the value of the property.
  14. Have you tried looking at how vanilla cauldron does that?
  15. Well, you have to create an item for that empty counterpart then
  16. The code is pretty short and straightforward...What don't you understand of the code inside the PotionItem#onItemUseFinish method?
  17. Take a look at this topic here: https://forums.minecraftforge.net/topic/91282-1161-setrequirestool/?tab=comments#comment-423212
  18. I think you may find this open source mod pretty useful to look into: https://www.curseforge.com/minecraft/mc-mods/ping
  19. # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="https://www.curseforge.com/minecraft/mc-mods/sways-vanilla" optional Here, optional misses the # before. Also use your mod id on these: [[dependencies.examplemod]] replace "examplemod" with your mod id
  20. Override the onItemUseFinish method in your item class and use World#playSound
  21. This code seems to be the problem: public @NotNull IPacket<?> createSpawnPacket() { return new SSpawnObjectPacket(this); } You cannot use the vanilla spawn packet here, you need to override createSpawnPacket with: return NetworkHooks.getEntitySpawningPacket(this); otherwise your entity will be existing only on the server and so invisibile to you on the client
  22. Show also the MegaTNTEntity class please
  23. Well, i am by no means the best forge modder here, there are lot of people with much more experience around. Look, if you have trouble developing your mod you can make a post on this forum explaining what the issue is and possibly show the code you tried, and who will have time to answer (me or someone else) will help you. Just one recommendation, don't expect people here to give away the code ready for you...if possibile on this forum we try to give hints and point people to good learning material so they can eventually figure them out the solution of their problem, and learn something in the process
  24. Are you sure the method is named like that?
×
×
  • Create New...

Important Information

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