-
Posts
687 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Beethoven92
-
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)
-
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
-
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?
-
Why can't I apply the model to the entity when it's code?
Beethoven92 replied to 방세준's topic in Modder Support
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 -
Why can't I apply the model to the entity when it's code?
Beethoven92 replied to 방세준's topic in Modder Support
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) { } -
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
-
[1.16.4] Insides of translucent block gets rendered black
Beethoven92 replied to Exa's topic in Modder Support
Check out this tutorial by TheGreyGhost: https://github.com/TheGreyGhost/MinecraftByExample/tree/working1-16-3/src/main/java/minecraftbyexample/mbe05_block_advanced_models -
Then follow the suggestion of poopoodice
-
I am not sure i fully understand that question, could you explain better?
-
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?
-
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/
-
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.
-
Have you tried looking at how vanilla cauldron does that?
-
[1.16.3] Remove then add another item to inventory
Beethoven92 replied to ehbean's topic in Modder Support
Well, you have to create an item for that empty counterpart then -
[1.16.3] Remove then add another item to inventory
Beethoven92 replied to ehbean's topic in Modder Support
The code is pretty short and straightforward...What don't you understand of the code inside the PotionItem#onItemUseFinish method? -
I think you may find this open source mod pretty useful to look into: https://www.curseforge.com/minecraft/mc-mods/ping
-
# 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
-
How can I make it so a custom song plays when I eat a food item?
Beethoven92 replied to 20ChenM's topic in Modder Support
Override the onItemUseFinish method in your item class and use World#playSound -
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
-
Show also the MegaTNTEntity class please
-
[1.15] Can't override the method boolean doesGuiPauseMenu()
Beethoven92 replied to MikeyJY's topic in Modder Support
Does it work now? -
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
-
[1.15] Can't override the method boolean doesGuiPauseMenu()
Beethoven92 replied to MikeyJY's topic in Modder Support
Are you sure the method is named like that?