Jump to content

jredfox

Members
  • Posts

    660
  • Joined

  • Last visited

Everything posted by jredfox

  1. I went ahead and debuged more no answers just more questions. It says it was not burning after the re spawn then the next tick it gets reset on fire again. Then it says after a couple ticks player moved wrongly and then it finally allows the player to be extinguished because I was doing it on tick Where it says burning respawned that is its status during the death event next tick says is burning [16:42:17] [Server thread/INFO] [STDOUT]: [com.evilnotch.respawnscreen.MainJava:onDeath:136]: burning Respawned:false true true true [16:42:17] [Server thread/WARN]: Player873 moved wrongly! false false false false false false false false false false false false false false false false false
  2. Edit: after some detailed tests I used EnumParticleTypes.getshouldIngoreRange() since that seems to be what vanilla uses I kill entity player without any mods and it was long distense could you please explain what EnumParticleTypes.getShouldIgnoreRange() should be done in my code? Should I be using that boolean for long distance when using/creating my own sendPacketToPlayersWithinRange() ? public static void sendToAllPlayersWithinRange(World world,double x, double y, double z, boolean longDistance,IMessage packet) { for (int i = 0; i < world.playerEntities.size(); ++i) { EntityPlayerMP player = (EntityPlayerMP) world.playerEntities.get(i); BlockPos blockpos = player.getPosition(); double d0 = blockpos.distanceSq(x, y, z); if (d0 <= 1024.0D || longDistance && d0 <= 262144.0D) { NetWorkHandler.INSTANCE.sendTo(packet, player); } } }
  3. Yeah don't worry already fixed it on server side
  4. I also tried always using extinguish regardless of world is remote and on every tick the client side doesn't get put out. The server side eventually calling that enough times on tick does put it out. The only thing that puts it out on client is sprinting weird
  5. I do it says 0 but, the entity player keeps burning. Stop acting like it's always a simple fix sometimes it's not maybe it resets next tick maybe that value isn't actually what burns the player maybe in about x amount of ticks the client sends to server it thinks it should be burning
  6. ok the particle was not right z location I figured out it had nothing to do with packet not working. I have tested this on hurt event it works as well as on death.
  7. Well I didn't even execute code on startup but, had client imports and next thing I know on dedicated server it crashes I never even used them could be mistaking but, remember it in 1.12 with deving silkspawners. jeblar I need to verify the client code works before making minor patches on server. Or I would constantly be going back and forth and forget what I need to do on the client. If it's major I fix it immediately and I always launch dedicated and test stuff before compiling. "So if anything going too fast would be not fixing client before going back to server" I copied it from a tutorial and minechess mod.
  8. will fix it later if it crashes right now all I care about is does the particles appear and if so when and where do they appear? If it loads on the server like you say then it will crash but, it won't load on the server it should be the imports that are crashing on startup not during that event it loads into memory going into the else statement which will never happen on the server and crash. It will crash before it even gets into that statement from class not found nothing to do with going into the else statement.
  9. if you look it's only called on client side. the particle id does change it just doesn't render anything but, the explosion. Another issue I am having is the particle xyz double coords are no where near the death of the player. https://github.com/jredfox/norespawnscreen I could test on hurt event to but, I think the results would be the same Edit: I printed out the coords sent to the client they are the same as sent from the server of the original player
  10. Wasn't mine was the videos. Thanks for pointing that out. My packet handler doesn't work for anything else that isn't explosion particle do you know why this is? This is the code that executes off of the client side I know the width should have been passed from the original entity as well but, for now only testing players which will always be the same when sending the packet. public static void spawnParticles(Entity e,int particleId,double x, double y, double z) { for (int k = 0; k < 20; ++k) { Random rand = getRND(e); double d2 = rand.nextGaussian() * 0.02D; double d0 = rand.nextGaussian() * 0.02D; double d1 = rand.nextGaussian() * 0.02D; e.world.spawnParticle(EnumParticleTypes.getParticleFromId(particleId), x + (double)(rand.nextFloat() * e.width * 2.0F) - (double)e.width, y + (double)(rand.nextFloat() * e.height), e.posZ + (double)(rand.nextFloat() * e.width * 2.0F) - (double)e.width, d2, d0, d1); } }
  11. yeah a beginners mistake I forgot that there was the messege argument there. I was fallowing a youtube video which seemed pretty good to me. I see why there are separate objects but, I don't see why forge just can't combine them and remove the arg of IMessege so sending to and from you don't have to worry about additional classes. Not saying it don't work just happy I was noob.
  12. So I debuged my code and discovered the data isn't being transferred to the client. [10:16:11] [Netty Local Client IO #0/INFO] [STDOUT]: [com.evilnotch.respawnscreen.network.PacketParticle:handleClientSide:39]: idEnt:0 idParticle:0 On server side I printed the particle id during the consturctor it said "Server:42" for the id rather then both being 0. Why is this occurring I specified a specific packet constructor when sending to the client and to and from bytes looks like they should work. @Override public void toBytes(ByteBuf buffer){ buffer.writeInt(this.particleId); buffer.writeInt(this.entid); } @Override public void fromBytes(ByteBuf buffer){ this.particleId = buffer.readInt(); this.entid = buffer.readInt(); } Here is my code: https://github.com/jredfox/norespawnscreen here is how I call the packet from the server: NetWorkHandler.INSTANCE.sendToDimension(new PacketParticle(EnumParticleTypes.DRAGON_BREATH,player.getEntityId() ),player.dimension);
  13. So I create a packet and I send it to all players but, the entity id is always mine even when another player dies and the particle id is always 0 which isn't what I sent in. During the hurt event I fire this code from the server to the client: NetWorkHandler.INSTANCE.sendToDimension(new PacketParticle(EnumParticleTypes.DRAGON_BREATH,player.getEntityId() ),player.dimension);
  14. in order to actually use it you need to call your packet update server/client and in order for that to work you need variables from your IMessege so you need composition on both sides references or have them in both the same class.
  15. ok that fixed it. you require the default constructor. @diesieben07 I really don't see how your suppose to do it otherwise since you need an handle client and server side within your packet object unless you want static references or composition weirdness all containing the other objects
  16. so did you figure out why it's crashing is it looking for default constructor?
  17. I just tried I am crashing instantiation exception on startup: https://pastebin.com/bsebXMNK I also just updated my github
  18. So I got everything up and running then tried registering it and it's not taking the class. It looks like it worked for minechess but, not mine????? My code has a compile error trying to register it even though it extends MessegeBase which has both interfaces. MineChess: https://github.com/MineMaarten/MineChess/blob/master/src/minechess/common/network/NetworkHandler.java Code: https://github.com/jredfox/norespawnscreen
  19. no because I need the client to determine what entity needs particles
  20. yes still no idea why it doesn't extinguish for half a second when I called new and old player extinguish. My fix was on respawn on tick for a full second extinguish otherwise it will just keep being on fire since one-two ticks does nothing. So I am thinking there is another variable somewhere that is setting the entity on fire or somehow the client is resetting the server side on fire
  21. several times does nothing. I tried on tick and eventually between 1-14 ticks it works. What is not updating instantly on the server side that it takes that long
  22. that only works for global ids and there could be hundreds with the same id. Couldn't I use uuid?
  23. Ok how do you send a random from the server to the client or should I be using the clients random for the entity. How do I get the entity on the client side's random?
  24. ok I will see how to make a packet and register a packet then I will try this later. how do I know if the packet is being sent to all players within range? The method you had me look at said this player sends packet well that looks like it only sends it to himself? What happens if the server sends a packet to the client that doesn't have it null point exception?
×
×
  • Create New...

Important Information

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