Jump to content

Novârch

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Novârch

  1. Use the project folder as the root folder, not an empty eclipse folder.
  2. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  3. 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.
  4. 1.12 is no longer supported on this forum. Pleae update to a modern version of Minecraft to receive support.
  5. It is, all the code in the message works.
  6. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  7. 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.
  8. 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)
  9. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  10. 1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  11. 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.
  12. Whats the best way to do this? DistExecutor, OnlyIn or World#isRemote?
  13. 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.
  14. Post your code.
  15. 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.
  16. 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?
  17. 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);
  18. 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.
  19. Eventually add effects to all entites and remove their attack targets.
  20. Then how should I run that code? The entire mod is entity classes and I don't think I can change that.
  21. 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.
  22. Versions 1.12 and below are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  23. Thank you!!! This was exactly what I needed!
  24. Heres the log: https://gist.github.com/Novarch129/5f93bae9fc8c9b5dc7943cad95f1e0a1 I skipped all the lines that were just registries and chat.
×
×
  • Create New...

Important Information

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