-
Posts
422 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Novârch
-
Forge for 1.15 with Eclipse: Package Explorer Empty?
Novârch replied to IceMetalPunk's topic in ForgeGradle
Use the project folder as the root folder, not an empty eclipse folder. -
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
Still haven't fixed this, the code used to work perfectly back in 1.12, has something about the method changed? *Edit: For some reason switching to deferred registers made it work. -
1.12 is no longer supported on this forum. Pleae update to a modern version of Minecraft to receive support.
-
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
It is, all the code in the message works. -
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
Just what are you trying to do? If you're trying to setup your workspace the mdk comes with a readme that explains it perfectly. *Edit: After reading the tutorial it seems most of these "tasks" can be done with cmd.
-
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
Still not working, exact code is: this.world.playSound(null, new BlockPos(this.getMaster().getPosX(), this.getMaster().getPosY(), this.getMaster().getPosZ()), this.getSpawnSound(), this.getSoundCategory(), 1.0f, 1.0f) -
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[1.7.10] I can't open the server, someone help me
Novârch replied to infeky's topic in Support & Bug Reports
1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. -
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
Here's the class on GitHub: https://github.com/Novarch129/JoJo-s-Blocky-Adventure/blob/9cd711da2a15ab17ffcb085798f211284f3fbf3f/src/main/java/com/novarch/jojomod/network/message/SyncStandSummonButton.java. It's syncing a KeyBind to the server, so it's client to server. -
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
From a packet. -
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
Whats the best way to do this? DistExecutor, OnlyIn or World#isRemote? -
Do you know anything about Java? The code should look like this: public void hunger(TickEvent.PlayerTickEvent event) { if(event.player.world.isRemote()) { PlayerEntity player = event.player; Difficulty difficulty = player.world.getDifficulty(); this.prevFoodLevel = this.foodLevel; if (this.foodExhaustionLevel > 4.0F) { this.foodExhaustionLevel -= 4.0F; if (this.foodSaturationLevel > 0.0F) { this.foodSaturationLevel = Math.max(this.foodSaturationLevel - 1.0F, 0.0F); } else if (difficulty != Difficulty.PEACEFUL) { this.foodLevel = (int) Math.max(this.foodLevel - 1.0f, 0.0f); } } } } Anyway, learn Java basics before modding.
-
Post your code.
-
[SOLVED] [1.15.2] Help with playing SoundEvents
Novârch replied to Novârch's topic in Modder Support
this.world.playSound(this.getMaster(), new BlockPos(this.getMaster().getPosX(), this.getMaster().getPosY(), this.getMaster().getPosZ()), this.getSpawnSound(), this.getSoundCategory(), 1.0f, 1.0f); getMaster returns the player, it works fine so it's not the issue, getSpawnSound returns the custom SoundEvent. -
I'm having problems with playing my custom SoundEvents, I've tried every version of the playSound method and tried using world.isRemote, but it still won't play. The sound is valid, the sounds.json is valid and the sound plays fine when using the playsound command ingame, what am I missing here?
-
Use an if statement, if(event.player.world.isRemote()) { //Insert code here } if you don't know how to change the player's hunger level try something like: event.player.getFoodStats().addStats(0, 0.0f);
-
It's only supposed to happen while the entity is summoned and under certain conditions, all the variables are stored within the class the entity extends, if there's a better way to do do it I would be glad to change it.
-
Eventually add effects to all entites and remove their attack targets.
-
Then how should I run that code? The entire mod is entity classes and I don't think I can change that.
-
I'm getting a NullPointer on this code: I don't understand how it can be null because the line right before it is: Heres the Git repo: https://github.com/Novarch129/JoJo-s-Blocky-Adventure, the relevant code is at :https://github.com/Novarch129/JoJo-s-Blocky-Adventure/blob/master/src/main/java/com/novarch/jojomod/entities/stands/kingCrimson/EntityKingCrimson.java, and the debug.log: https://gist.github.com/Novarch129/38e8edc698dcafd745e05e7bb04d7d7e.
-
Versions 1.12 and below are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[SOLVED] [1.15.2] java.lang.NullPointerException: Sending packet
Novârch replied to Novârch's topic in Modder Support
Thank you!!! This was exactly what I needed! -
[SOLVED] [1.15.2] java.lang.NullPointerException: Sending packet
Novârch replied to Novârch's topic in Modder Support
Heres the log: https://gist.github.com/Novarch129/5f93bae9fc8c9b5dc7943cad95f1e0a1 I skipped all the lines that were just registries and chat.