Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.10]Spawn a rotated cube particle


TominoCZ
 Share

Recommended Posts

Field f1 = ParticleManager.class.getDeclaredField("queueEntityFX");
You need SRG names as well. You can obtain them from MCPBot.

 

f2.set(ParticleManager.class, ((Queue<Particle>) f2.get(ParticleManager.class)).add(new IParticleManager()));
What in the world are you trying to achieve here?

 

//((Queue)f1.get(ParticleManager.class)).forEach(Particle p : ((Queue)f1.get(ParticleManager.class)).stream());

while(((Queue<Particle>)f1.get(ParticleManager.class)).contains(ParticleDigging.class)){

f1.set(ParticleManager.class, ((Queue<Particle>)f1.get(ParticleManager.class)).remove(ParticleDigging.class));

f1.set(ParticleManager.class, ((Queue<Particle>)f1.get(ParticleManager.class)).add(new IParticleDigging(worldObj, motionX, motionX, motionX, motionX, motionX, motionX, null)));

Whaaaaaat? I do not even know.

What are you trying to do here?

 

catch(Exception e)

{

 

}

Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).
Link to comment
Share on other sites

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

Alright, now the field changing actually works.

 

But whenever I create a new instance of IParticleManager(the new emittor) it says this(because I call super(null, null, null)):

 

[00:24:40] [Client thread/INFO] [sTDOUT]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:34]: [Fancy Block Particles]: An error occured at onEvent(EntityJoinWorldEvent e)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: java.lang.NullPointerException

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.particle.ParticleEmitter.<init>(ParticleEmitter.java:20)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at com.TominoCZ.FBP.IParticleManager.<init>(IParticleManager.java:22)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at com.TominoCZ.FBP.handler.ForgeEventHandler.onEvent(ForgeEventHandler.java:29)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_ForgeEventHandler_onEvent_EntityJoinWorldEvent.invoke(.dynamic)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:68)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:159)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.world.World.spawnEntityInWorld(World.java:1217)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.multiplayer.WorldClient.spawnEntityInWorld(WorldClient.java:210)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:2557)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:2462)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.network.NetHandlerPlayClient.handleJoinGame(NetHandlerPlayClient.java:301)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.network.play.server.SPacketJoinGame.processPacket(SPacketJoinGame.java:89)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.network.play.server.SPacketJoinGame.processPacket(SPacketJoinGame.java:13)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at java.util.concurrent.FutureTask.run(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.util.Util.runTask(Util.java:25)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1108)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.Minecraft.run(Minecraft.java:406)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.client.main.Main.main(Main.java:118)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at java.lang.reflect.Method.invoke(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at java.lang.reflect.Method.invoke(Unknown Source)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)

[00:24:40] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:35]: at GradleStart.main(GradleStart.java:26)

 

And this is the code I ise to change the field:

if (e.getEntity() == Minecraft.getMinecraft().thePlayer) {
		ParticleManager particleManager = new ParticleManager(e.getWorld(), null);

		try {
		    Class<?> c = particleManager.getClass();

		    Field f = c.getDeclaredField("particleEmitters");
		    f.setAccessible(true);
	  	    f.set(particleManager, ((Queue<Particle>)f.get(particleManager)).add(new IParticleManager()));
	  	    
	  	    System.out.println("[" + Main.name + "]: Field replacement success");
	  	    
		} catch (Exception x) {
			System.out.println("[" + Main.name + "]: An error occured at onEvent(EntityJoinWorldEvent e)");
		    x.printStackTrace();
		}

Link to comment
Share on other sites

now it says this:

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: java.lang.IllegalArgumentException: Can not set final java.util.Queue field net.minecraft.client.particle.ParticleManager.particleEmitters to java.lang.Boolean

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.set(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at java.lang.reflect.Field.set(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at com.TominoCZ.FBP.handler.ForgeEventHandler.onEvent(ForgeEventHandler.java:30)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_ForgeEventHandler_onEvent_EntityJoinWorldEvent.invoke(.dynamic)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:68)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:159)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.world.World.spawnEntityInWorld(World.java:1217)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.multiplayer.WorldClient.spawnEntityInWorld(WorldClient.java:210)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:2557)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:2462)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.network.NetHandlerPlayClient.handleJoinGame(NetHandlerPlayClient.java:301)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.network.play.server.SPacketJoinGame.processPacket(SPacketJoinGame.java:89)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.network.play.server.SPacketJoinGame.processPacket(SPacketJoinGame.java:13)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at java.util.concurrent.FutureTask.run(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.util.Util.runTask(Util.java:25)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1108)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.Minecraft.run(Minecraft.java:406)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.client.main.Main.main(Main.java:118)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at java.lang.reflect.Method.invoke(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at java.lang.reflect.Method.invoke(Unknown Source)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)

[01:04:44] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:36]: at GradleStart.main(GradleStart.java:26)

 

EventHandler:

	@SubscribeEvent(priority=EventPriority.HIGH)
public void onEvent(EntityJoinWorldEvent e) {
	if (e.getEntity() == Minecraft.getMinecraft().thePlayer) {
		ParticleManager particleManager = new ParticleManager(e.getWorld(), null);

		try {
		    Class<?> c = particleManager.getClass();

		    Field f = c.getDeclaredField("particleEmitters");
		    System.out.println("[" + Main.name + "]: Getting field..");
		    f.setAccessible(true);
		    System.out.println("[" + Main.name + "]: Setting field accessible..");
	  	    f.set(particleManager, ((Queue<Particle>)f.get(particleManager)).add(new IParticleManager()));
	  	    
	  	    System.out.println("[" + Main.name + "]: Field replacement success");
	  	    
		} catch (Exception x) {
			System.out.println("[" + Main.name + "]: An error occured at onEvent(EntityJoinWorldEvent e):");
		    x.printStackTrace();
		}

		/*try {
			Field f2 = ParticleManager.class.getDeclaredField("particleEmitters");
			f2.setAccessible(true);

			Queue<Particle> qp = (Queue<Particle>) f2.get(Queue.class);
			qp.add(new IParticleManager());

			f2.set(qp, (Queue<Particle>) f2.get(Queue.class));
		} catch (Exception e1) {
			e1.printStackTrace();
		}
		*/
	}
}

 

IParticleManager:

public IParticleManager()
{
	super(Minecraft.getMinecraft().theWorld, new EntityItem(Minecraft.getMinecraft().theWorld), EnumParticleTypes.FLAME);
}

@Override
    public void setRBGColorF(float particleRedIn, float particleGreenIn, float particleBlueIn)
    {
    }

@Override
    public void setAlphaF(float alpha)
    {
    }

@Override
    public void setMaxAge(int p_187114_1_)
    {
    }

@Override
    public void onUpdate()
    {
	ParticleManager particleManager = new ParticleManager(this.worldObj, null);

	try
	{
		Class<?> c = particleManager.getClass();

	    Field f = c.getDeclaredField("queueEntityFX");
	    f.setAccessible(true);
	    
	    ((Queue<Particle>)f.get(particleManager)).forEach(particle->
		{
			try 
			{
				IBlockState bs = Block.getStateById(0);
				f.set(particleManager, ((Queue<Particle>)f.get(particleManager)).remove(ParticleDigging.class));
				f.set(particleManager, ((Queue<Particle>)f.get(particleManager)).add(new FBPParticleDigging(worldObj, interpPosX, interpPosY, interpPosZ, motionX, motionY, motionZ, bs)));
			}
			catch (Exception e) 
			{
				e.printStackTrace();
			}
		});
  	    
  	    System.out.println("[" + Main.name + "]: Field replacement success");
  	    
		/*
		Field f1 = ParticleManager.class.getDeclaredField("queueEntityFX");
		f1.setAccessible(true);

		((Queue<Particle>)f1.get(ParticleDigging.class)).forEach(particle->
		{
			try 
			{
				f1.set(particle, FBPParticleDigging.class);
			}
			catch (Exception e) 
			{
				e.printStackTrace();
			}
		});
		*/
	}
	catch(Exception e)
	{
		e.printStackTrace();
	}
    }

    @Override
    public void renderParticle(VertexBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
    {
    }
    
    @Override
    public void setParticleTexture(TextureAtlasSprite texture)
    {
    }
    
    @Override
    public void setParticleTextureIndex(int particleTextureIndex)
    {
    }

    @Override
    public void nextTextureIndexX()
    {
    }
    
    @Override
    public void setExpired()
    {
    }

    @Override
    protected void setSize(float p_187115_1_, float p_187115_2_)
    {
    }

    @Override
    public void setPosition(double p_187109_1_, double p_187109_3_, double p_187109_5_)
    {
    }

    @Override
    public void moveEntity(double x, double y, double z)
    {
    }

    @Override
    protected void resetPositionToBB()
    {
    }

    @Override
    public void setEntityBoundingBox(AxisAlignedBB p_187108_1_)
    {
    }

Link to comment
Share on other sites

  • Make a class extending
    ParticleEmitter

    . Override every method to do nothing except

    onUpdate

    . Make sure to return true in

    isAlive

    .

  • Make a field in this class of type
    Queue<Particle>

    and initialize it via a constructor parameter.

  • Also override onUpdate now (don't call super). In there scan the Queue for any particles you want to replace. If you find any, remove them and add your own replacement.
  • Subscribe to
    EntityJoinWorldEvent

    on the client side (via your

    @SidedProxy

    ). Check if the entity being spawned is Minecraft::thePlayer, if so, grab

    Minecraft::effectRenderer

    and add a new instance of your

    ParticleEmitter

    class to

    ParticleManager::particleEmitters

    . The parameter for the constructor will be

    ParticleManager::queueEntityFX

    , you will need reflection to access both of these fields.

Do these things. In order. Exactly. Do not add steps, do not remove steps, do not modify the individual steps. If something is unclear, ask. Do not improvise.

Link to comment
Share on other sites

grab Minecraft::effectRenderer and add a new instance of your ParticleEmitter class to ParticleManager::particleEmitters

That.

 

What do you mean by that?

what do I do with the effect renderer how do I add the particleemitter class to the particleEmitters with it? I don't get it.

Link to comment
Share on other sites

I know what that stuff is, what I don't understand is how minecraft effect renderer has anything to do with the queue just explain what I quoted some more with the effect renderer because you said:

grab Minecraft::effectRenderer and add a new instance of your ParticleEmitter class to ParticleManager::particleEmitters

 

How does that effectRenderer make any sense in there. What am I supposed to do with it.

 

Also I already posted the code that was adding the emitter you told me to create to the particleEmitters Queue and told you what error I'm getting.

Link to comment
Share on other sites

I know what that stuff is, what I don't understand is how minecraft effect renderer has anything to do with the queue just explain what I quoted some more with the effect renderer because you said:

grab Minecraft::effectRenderer and add a new instance of your ParticleEmitter class to ParticleManager::particleEmitters

 

How does that effectRenderer make any sense in there. What am I supposed to do with it.

Minecraft::effectRenderer is a field of type ParticleManager. You grab it. Then you have an instance of ParticleManager. Then you get the particleEmitters field from that (using reflection). That gives you a Queue<ParticleEmitter>. You then add a new instance of your particle emitter class to that queue. You never set any fields.
Link to comment
Share on other sites

I  know how to add stuff to collections / queues obviously

 

How about you finally post the part of the code

 

Is this what you wanted me to do?

 

ParticleManager particleManager = Minecraft.getMinecraft().effectRenderer;

 

or anything else?

Just post the correct code finally!

 

 

Link to comment
Share on other sites

so this should be right then:

 

@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onEvent(EntityJoinWorldEvent e) {
	if (e.getEntity() == Minecraft.getMinecraft().thePlayer) {
		ParticleManager particleManager = Minecraft.getMinecraft().effectRenderer;

		try {
			Field field1, field2;

			Class<?> c = particleManager.getClass();

			System.out.println("[" + Main.name + "]: Getting fields..");

			if (Main.isDev() == true) {
				field1 = c.getDeclaredField("particleEmitters");
				field2 = c.getDeclaredField("queueEntityFX");
			} else {
				field1 = c.getDeclaredField("field_178933_d");
				field2 = c.getDeclaredField("field_187241_h");
			}
			field1.setAccessible(true);
			field2.setAccessible(true);

			Queue<ParticleEmitter> particleEmitters = (Queue<ParticleEmitter>) field1.get(particleManager);
			particleEmitters.add(new FBPParticleEmitter((Queue<Particle>) field2.get(particleManager)));
		} catch (Exception x) {
			System.out.println("[" + Main.name + "]: An error occured at onEvent(EntityJoinWorldEvent e):");
			x.printStackTrace();
		}
	}
}

Link to comment
Share on other sites

Now it crashes in the cust particle class... It must be because of the parameters I passed it when I created a new instance of it..

 

this is the piece of code where I replace the particle:

queue.forEach(particle -> {
		queue.remove(particle);
		queue.add(new FBPParticleDigging(Minecraft.getMinecraft().theWorld, interpPosX, interpPosY, interpPosZ, motionX, motionY, motionZ, bs));
	});

 

I'm not sure why it's crashing, but it looks like it it because of the world instance.. or the BlockState..

Link to comment
Share on other sites

Looks like it's because of the world instance. It says it's null. I hope I'm right..

 

[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: java.util.ConcurrentModificationException
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at java.util.ArrayDeque$DeqIterator.next(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at java.lang.Iterable.forEach(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at com.TominoCZ.FBP.FBPParticleEmitter.onUpdate(FBPParticleEmitter.java:51)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.client.particle.ParticleManager.updateEffects(ParticleManager.java:171)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1939)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.client.Minecraft.run(Minecraft.java:406)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.client.main.Main.main(Main.java:118)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at java.lang.reflect.Method.invoke(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at java.lang.reflect.Method.invoke(Unknown Source)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[15:49:02] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.FBPParticleEmitter:onUpdate:61]: 	at GradleStart.main(GradleStart.java:26)
[15:49:04] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering Particle
at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:335) ~[ParticleManager.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1408) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1139) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.NullPointerException
at net.minecraft.world.World.isBlockLoaded(World.java:276) ~[World.class:?]
at net.minecraft.world.World.isBlockLoaded(World.java:271) ~[World.class:?]
at com.TominoCZ.FBP.FBPParticleDigging.getBrightnessForRender(FBPParticleDigging.java:269) ~[FBPParticleDigging.class:?]
at com.TominoCZ.FBP.FBPParticleDigging.renderParticle(FBPParticleDigging.java:103) ~[FBPParticleDigging.class:?]
at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:315) ~[ParticleManager.class:?]
... 18 more
[15:49:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ----
// But it works on my machine.

Time: 14.8.16 15:49
Description: Rendering Particle

java.lang.NullPointerException: Rendering Particle
at net.minecraft.world.World.isBlockLoaded(World.java:276)
at net.minecraft.world.World.isBlockLoaded(World.java:271)
at com.TominoCZ.FBP.FBPParticleDigging.getBrightnessForRender(FBPParticleDigging.java:269)
at com.TominoCZ.FBP.FBPParticleDigging.renderParticle(FBPParticleDigging.java:103)
at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:315)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1408)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1139)
at net.minecraft.client.Minecraft.run(Minecraft.java:406)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
at net.minecraft.world.World.isBlockLoaded(World.java:276)
at net.minecraft.world.World.isBlockLoaded(World.java:271)
at com.TominoCZ.FBP.FBPParticleDigging.getBrightnessForRender(FBPParticleDigging.java:269)
at com.TominoCZ.FBP.FBPParticleDigging.renderParticle(FBPParticleDigging.java:103)

-- Particle being rendered --
Details:
Particle: FBPParticleDigging, Pos (-34.72392189856991,96.0,-44.43349553459455), RGBA (0.6,0.6,0.6,1.0), Age 0
Particle Type: TERRAIN_TEXTURE
Stacktrace:
at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:315)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1408)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player203'/105, l='MpServer', x=-34,72, y=96,00, z=-44,43]]
Chunk stats: MultiplayerChunkCache: 121, 121
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: World: (-27,64,-64), Chunk: (at 5,4,0 in -2,-4; contains blocks -32,0,-64 to -17,255,-49), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Level time: 26736 game time, 26736 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 30 total; [EntityZombie['Zombie'/64, l='MpServer', x=2,50, y=19,00, z=-102,50], EntitySkeleton['Skeleton'/65, l='MpServer', x=15,78, y=19,00, z=-108,18], EntityCreeper['Creeper'/66, l='MpServer', x=12,30, y=19,00, z=-93,17], EntityZombie['Zombie'/67, l='MpServer', x=14,50, y=19,00, z=-92,50], EntityBat['Bat'/68, l='MpServer', x=5,56, y=38,31, z=16,03], EntityZombie['Zombie'/85, l='MpServer', x=22,86, y=16,00, z=-100,50], EntityCreeper['Creeper'/22, l='MpServer', x=-93,50, y=47,00, z=-76,86], EntityCreeper['Creeper'/86, l='MpServer', x=19,10, y=75,00, z=-82,78], EntityItem['item.item.arrow'/23, l='MpServer', x=-92,27, y=86,00, z=-73,61], EntityCreeper['Creeper'/87, l='MpServer', x=18,12, y=75,00, z=-81,68], EntityZombie['Zombie'/88, l='MpServer', x=28,50, y=47,00, z=-41,50], EntityItem['item.item.bone'/24, l='MpServer', x=-92,54, y=86,00, z=-73,63], EntitySkeleton['Skeleton'/30, l='MpServer', x=-56,71, y=94,00, z=-56,51], EntitySkeleton['Skeleton'/31, l='MpServer', x=-36,44, y=94,00, z=-67,72], EntitySpider['Spider'/32, l='MpServer', x=-34,46, y=94,00, z=-64,98], EntityCreeper['Creeper'/33, l='MpServer', x=-39,83, y=95,00, z=-62,36], EntityItem['item.item.bone'/34, l='MpServer', x=-42,89, y=96,00, z=-45,92], EntitySkeleton['Skeleton'/35, l='MpServer', x=-34,12, y=64,00, z=15,51], EntityPlayerSP['Player203'/105, l='MpServer', x=-34,72, y=96,00, z=-44,43], EntityCreeper['Creeper'/42, l='MpServer', x=-29,50, y=61,00, z=-97,50], EntityZombie['Zombie'/43, l='MpServer', x=-24,50, y=53,00, z=-87,50], EntityBat['Bat'/44, l='MpServer', x=-24,25, y=42,03, z=-52,40], EntityCreeper['Creeper'/45, l='MpServer', x=-27,45, y=95,00, z=-43,10], EntityBat['Bat'/52, l='MpServer', x=-20,84, y=38,35, z=-53,74], EntityZombie['Zombie'/53, l='MpServer', x=-14,00, y=23,00, z=-35,48], EntityCreeper['Creeper'/54, l='MpServer', x=-14,45, y=23,00, z=-37,87], EntityZombie['Zombie'/55, l='MpServer', x=-14,54, y=23,00, z=-33,95], EntityCreeper['Creeper'/56, l='MpServer', x=-8,88, y=23,00, z=-30,61], EntityCreeper['Creeper'/57, l='MpServer', x=-1,50, y=41,00, z=5,40], EntityCreeper['Creeper'/63, l='MpServer', x=5,07, y=19,00, z=-107,57]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:450)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2779)
at net.minecraft.client.Minecraft.run(Minecraft.java:427)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
Minecraft Version: 1.10
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_101, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 684431224 bytes (652 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP 9.32 Powered by Forge 12.18.0.2000 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10-12.18.0.2000-1.10.0.jar) 
UCHIJAAAA	Forge{12.18.0.2000} [Minecraft Forge] (forgeSrc-1.10-12.18.0.2000-1.10.0.jar) 
UCHIJAAAA	FBP{1.2} [Fancy Block Particles] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13447 Compatibility Profile Context 16.300.2311.0' Renderer: 'AMD Radeon R9 200 Series'
Launched Version: 1.10
LWJGL: 2.9.4
OpenGL: AMD Radeon R9 200 Series GL version 4.5.13447 Compatibility Profile Context 16.300.2311.0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
[15:49:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\*****\Downloads\forge-1.10-12.18.0.2000-1.10.0-mdk\run\.\crash-reports\crash-2016-08-14_15.49.04-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

Link to comment
Share on other sites

now.. it crashes when the method onUpdate is called(because I check if the queue is not empty)...

 

@Override
public void onUpdate() {
	try {
		if (queue.isEmpty() == false) { //Exception being thrown at this line
			IBlockState bs = Block.getStateById(0);

			queue.forEach(particle -> {
				if (particle.getClass() == ParticleDigging.class) {
					queue.remove(particle);
					queue.add(new FBPParticleDigging(worldObj, interpPosX, interpPosY,
							interpPosZ, motionX, motionY, motionZ, bs));
				}
			});

			ParticleManager particleManager = new ParticleManager(Minecraft.getMinecraft().theWorld, null);

			Class<?> c = particleManager.getClass();

			Field f;

			if (Main.isDev() == true)
				f = c.getDeclaredField("queueEntityFX");
			else
				f = c.getDeclaredField("field_187241_h");

			f.setAccessible(true);

			f.set(particleManager, queue);
		}
	} catch (Exception x) {
		System.out.println("[" + Main.name + "]: An error occured at onUpdate(int p_187114_1_):");
		x.printStackTrace();
	}
}

 

 

log:

[15:54:42] [Client thread/INFO] [sTDOUT]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:43]: [Fancy Block Particles]: An error occured at onEvent(EntityJoinWorldEvent e):
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: java.lang.NullPointerException
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at com.TominoCZ.FBP.FBPParticleEmitter.onUpdate(FBPParticleEmitter.java:44)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.particle.ParticleEmitter.<init>(ParticleEmitter.java:24)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at com.TominoCZ.FBP.FBPParticleEmitter.<init>(FBPParticleEmitter.java:25)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at com.TominoCZ.FBP.handler.ForgeEventHandler.onEvent(ForgeEventHandler.java:41)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_ForgeEventHandler_onEvent_EntityJoinWorldEvent.invoke(.dynamic)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:68)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:159)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.world.World.spawnEntityInWorld(World.java:1217)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.multiplayer.WorldClient.spawnEntityInWorld(WorldClient.java:210)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:2557)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:2462)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.network.NetHandlerPlayClient.handleJoinGame(NetHandlerPlayClient.java:301)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.network.play.server.SPacketJoinGame.processPacket(SPacketJoinGame.java:89)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.network.play.server.SPacketJoinGame.processPacket(SPacketJoinGame.java:13)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at java.util.concurrent.FutureTask.run(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.util.Util.runTask(Util.java:25)
[15:54:42] [server thread/INFO]: Saving and pausing game...
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1108)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.Minecraft.run(Minecraft.java:406)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.client.main.Main.main(Main.java:118)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at java.lang.reflect.Method.invoke(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at java.lang.reflect.Method.invoke(Unknown Source)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[15:54:42] [Client thread/INFO] [sTDERR]: [com.TominoCZ.FBP.handler.ForgeEventHandler:onEvent:44]: 	at GradleStart.main(GradleStart.java:26)

Link to comment
Share on other sites

Sure. I was about to say this(below), when you answered..

 

Wait... If you think about it... you can't get the particles when you join the world, because there aren't any and also it scans for them once, once you've joined the world... so the Queue<Particle> is empty.. that means we'd have to somehow use TickHandler...

 

*Testing with using a classic for()*

 

EDIT: Well shit that doesn't work either.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.