Jump to content

NJay

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by NJay

  1. Hey there, I'm making a custom rendered block and want to render different textures (in "layers", so over each other) on it. This all works fine, I use LayeredTexture to bind a texture to my model. The problem now is, since I'm not thaaaat good at render stuff, I want to recolor the second "layer" before binding it to the texture. How would I do this?
  2. Yay, works so far now. I got it working on both server and client. Thank you all for your help, guys!
  3. I somehow managed the particles to spawn... Now I know whose fault this was, this.onGround isn't working and returning always false which makes no sense but - somehow - forced my onUpdate to always set isFlyin to false. My problem now is that I don't know how to determine if the Entity is standing on the ground.
  4. For some reason, yes
  5. It is. When I don't check for isRemote, the particles are actually spawned while flying. Also, accessing the boolean from the model class worked which only spawned the particles in singleplayer worlds. I'm really stuck here.
  6. Sorry, I don't get it To be honest, I copied that code from the EntityHorse to be able to get the booleans from the model class. Is the 256 the wrong part? I mean, it's over 32, but in the EntityHorse class the method gets called with 128 and 64, so I took 256, because it was the next power of 2... Sorry if I miss something obvious NJay
  7. Yes, yes, it was commented out at the time when I copied it, which doesn't change the funcionality of the code, since onUpdate seemingly doesn't get called by client. The getHorseWatchableBoolean worked fine for me, I was able to get / set the right booleans... How would I solve it else?
  8. This one too.
  9. Code's gone.
  10. if I check for isRemote == true, no particles are spawned at all.
  11. How was it registered and how is it now? I'm having a similar issue
  12. sooo... Meanwhile I put the particle spawning code into a method called by the model when the entity is rendered, but that - of course - doesn't work in multiplayer. My onUpdate method: public void onUpdate() { super.onUpdate(); if(this.onGround || this.isInWater()){ this.setIsFlying(false); //Updating entity's logic, so the particles are only spawned for the "flying"-boolean true } if(this.getIsFlying()){ if(worldObj.isRemote){ // or !worldObj.isRemote EntityFX particle = new EntityReddustFX(this.worldObj, this.posX, posY, this.posZ, 1.0F, 2.0F, 1.0F); // actually, these three lines are repeated six times in a for loop, particle.setRBGColorF(colorsR[i], colorsG[i], colorsB[i]); // to change colors and position. I simplified it a little here. Mod.proxy.addParticleEffect(particle); // This method does nothing on server side and is only overridden by client } } } ClientProxy#addParticleEffect: @Override public void addParticleEffect(EntityFX particle) { Minecraft.getMinecraft().effectRenderer.addEffect(particle); } Error logs with no check for isRemote or !isRemote: net.minecraft.util.ReportedException: Ticking Particle at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:102) ~[EffectRenderer.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2136) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1029) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55] [...] Error with check for !isRemote: at net.minecraft.entity.Entity.moveEntity(Entity.java:723) at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1678) at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2021) at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431) at net.minecraft.entity.EntityAgeable.onLivingUpdate(EntityAgeable.java:138) at net.minecraft.entity.passive.EntityAnimal.onLivingUpdate(EntityAnimal.java:56) at net.minecraft.entity.passive.EntitySheep.onLivingUpdate(EntitySheep.java:98) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1814) at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2296) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684) at net.minecraft.world.World.updateEntity(World.java:2256) -- Entity being ticked -- Details: Entity Type: Sheep (net.minecraft.entity.passive.EntitySheep) Entity ID: 153 Entity Name: Sheep Entity's Exact location: -200,78, 72,00, 415,77 Entity's Block location: World: (-201,72,415), Chunk: (at 7,4,15 in -13,25; contains blocks -208,0,400 to -193,255,415), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Entity's Momentum: 0,00, -0,08, 0,00 Sometimes Sheep, sometimes Pig, sometimes Villager, sometimes Wolf. lol
  13. NO check for isRemote - Spawning particles at first, then crashing with an exception referring to the particles Check for isRemote - Not spawning particles Check for !isRemote - Spawning particles at first, then crashing with an exception referring to a random entity in the world (e.g. a cow, a pig, a villager etc.) I'm also calling this from onUpdate in an entity class
  14. I've tried to spawn recolored redstone particles with my mod, but since 1.7.10, it doesn't work anymore and I can't figure out how I should now implement particle effects thanks in advance
×
×
  • Create New...

Important Information

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