Jump to content

Flytre

Members
  • Posts

    10
  • Joined

  • Last visited

Flytre's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Alright: I added this to the code and it still crashes, would you be able to explain why? if (Minecraft.getInstance().world != null && Minecraft.getInstance().world.isRemote() && ConfigValues.truesight.get() && entity.getActivePotionEffect(Effects.INVISIBILITY) != null) { AxisAlignedBB bb = entity.getBoundingBox(); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.minX, bb.minY, bb.minZ, 0, 0, bb.getZSize() / 20.0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.minX, bb.minY, bb.minZ, bb.getXSize() / 20.0, 0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.minX, bb.minY, bb.minZ, 0, bb.getYSize() / 20.0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.maxX, bb.maxY, bb.maxZ, 0, -bb.getYSize() / 20.0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.maxX, bb.maxY, bb.maxZ, -bb.getXSize() / 20.0, 0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.maxX, bb.maxY, bb.maxZ, 0, 0, -bb.getZSize() / 20.0); } I added Minecraft.getInstance().world != null && Minecraft.getInstance().world.isRemote() to make sure the Logistical Side is the Client, and it still crashes. If I change the Logistical Side to the server it just doesn't render the particles.
  2. At the top of the class where I have this code I have the following annotation: @Mod.EventBusSubscriber(Dist.CLIENT) Shouldn't this prevent me from reaching across logical sides?
  3. Hello Guys! Inside a Living Update Event, I had the following code: if (ConfigValues.truesight.get() && entity.getActivePotionEffect(Effects.INVISIBILITY) != null) { AxisAlignedBB bb = entity.getBoundingBox(); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.minX, bb.minY, bb.minZ, 0, 0, bb.getZSize() / 20.0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.minX, bb.minY, bb.minZ, bb.getXSize() / 20.0, 0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.minX, bb.minY, bb.minZ, 0, bb.getYSize() / 20.0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.maxX, bb.maxY, bb.maxZ, 0, -bb.getYSize() / 20.0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.maxX, bb.maxY, bb.maxZ, -bb.getXSize() / 20.0, 0, 0); Minecraft.getInstance().particles.addParticle(ParticleTypes.FLAME, bb.maxX, bb.maxY, bb.maxZ, 0, 0, -bb.getZSize() / 20.0); } This code basically creates a flame hitbox around entities with the invisibility effect. The code worked fine until I closed the game and reopened the game. Upon re-opening the world, I recieved the followed crash and have no clue why. None of the code should be at risk for throwing a NullPointerException: java.lang.NullPointerException: Rendering Particle at net.minecraft.client.particle.Particle.getBrightnessForRender(Particle.java:201) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.particle.FlameParticle.getBrightnessForRender(FlameParticle.java:39) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.particle.TexturedParticle.renderParticle(TexturedParticle.java:35) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:321) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:755) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:655) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:509) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:925) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:384) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:128) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-4.1.0.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) [forge-1.14.4-28.1.80_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
  4. Looks like I'm going about it completely wrong. Can anyone point me in the direction of the right way to do this?
  5. Hello, I have the following code as shown: //potion effects? if (player != null && event.phase == TickEvent.ClientTickEvent.Phase.START) { Collection<EffectInstance> effects = player.getActivePotionEffects(); if (!effects.isEmpty()) { for (EffectInstance e : effects) { player.removePotionEffect(e.getPotion()); player.addPotionEffect(new EffectInstance(e.getPotion(), e.getDuration(), e.getAmplifier(), true, false)); } } Now this throws a ConcurrentModificationException at the line of the for-loop, and I'm not sure why. Supposedly you cannot modify a list while using a for-loop, but I am not modifying the effects Collection as its already been assigned. [14:03:03] [Client thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: null Index: 1 Listeners: 0: NORMAL 1: ASM: class flytre.cineroid.ForgeEvents tick(Lnet/minecraftforge/event/TickEvent$ClientTickEvent;)V 2: ASM: net.minecraftforge.common.ForgeInternalHandler@1beb3b74 checkSettings(Lnet/minecraftforge/event/TickEvent$ClientTickEvent;)V java.util.ConcurrentModificationException at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1498) at java.base/java.util.HashMap$ValueIterator.next(HashMap.java:1526) at flytre.cineroid.ForgeEvents.tick(ForgeEvents.java:66) at net.minecraftforge.eventbus.ASMEventHandler_1_ForgeEvents_tick_ClientTickEvent.invoke(.dynamic) at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) at net.minecraftforge.fml.hooks.BasicEventHooks.onPreClientTick(BasicEventHooks.java:104) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1330) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:904) at net.minecraft.client.Minecraft.run(Minecraft.java:384) at net.minecraft.client.main.Main.main(Main.java:128) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) I'm wondering how to fix this code! (My end goal is to remove potion particles from the player on the client-side, which I attempt to do by removing the effect and re-adding the effect without particles.)
  6. Edit: Problem Solved!
  7. All Minecraft paid accounts are premium accounts, and I used the term here to differentiate that from the 'Dev' default account. Thanks you for the help, problem solved! Clarification to future users: 1. Edit the runClient run configuration -> program arguments to this format: --username email --password password
  8. Hello, I just got started modding with Forge, and I have a quick question! (I am using IntelliJ and modding 1.14.4) Right now when I launch the game, it launches under a fake account named 'Dev' and I was wondering how to connect my premium Minecraft account to launch Forge with, so I can test my mod in multiplayer as it is client-sided.
×
×
  • Create New...

Important Information

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