Jump to content

jredfox

Members
  • Posts

    660
  • Joined

  • Last visited

Everything posted by jredfox

  1. "If you want to so, the best way is to kill the entity and spawn a new one." Ok how do I do this make the player = new player and then tell client it's a new player then use it to update from the nbt I gathered from a file I serialized to nbt? I heard something about player cloning how do I do this on command while still serializing from nbt?
  2. readFromNBT() does occur on client look at the code there is no file argument. readFromNBT() is simply to update variables there is no file argument. There are also client only variables written to nbt does it get saved ever I don't know. Look at player.writeToNBT() in console on client and server side there are a couple tags on client that are not on server. Silkspawners main mechanic is to break block save it to stack (writeToNBT) and placeBlock(readFromNBT) both of which are never saved to the disk during that process until the itemstack or tile entity decides to save the data. The client even had to readFromNBT of the tile entity otherwise for a couple ticks it would display pig. Those methods are for saving .comparing, and manipulating data which means it's not always stored to the disk but, yes eventually that's it's main function is serialization with the exception of commands and mods that decide to do stuff to manipulate and update variables you are talking about serialization methods yes those occur only from the disk and do call readFromNBT() after they get the nbt
  3. well what I seen is there are two sides server and client both have nbt so if server has values updated and client does not then it should update capabilities on client side since they occur on both sides? then what am I looking to do you said so yourself it should update capabilities data calling readFromNBT() then why does the player inventory update when I say readFromNBT() on server and not capabilities that has to be client synced for the inventories what about capabilities. If it honestly isn't possible then this is a forge bug and should be reported since readFromNBT() should update data
  4. I don't want it syncing every second just when I want it updating and preferable the client isn't required server side mod only. What about a packet to readFromNBT() to the client and will that update the forge capabilities? So like a readFromNBT() packet to the client for capabilities only? if you read it's not my object necessary it could be a player or another entity stop with the crossing lines plz
  5. ok then maybe the client isn't receiving the data. Does readEntityFromNBT() send a packet to the client maybe I need to create a packet to send to the client to update NBT? is there already a packet that does this? I hope it's not the fact that the data doesn't change on the gui but, is changed on the capabilities so I can actually wip up a fix for mods with capabilities and guis
  6. Ok I figured out the two issues but, I have a new one. Players don't update to other players once either teleported from another dimension. What packet should I send to what players to update them? Edit nevermind vanilla's transfer player to dimension is highly bugged copied code from another mod worked perfect no syncing issues.
  7. Ok I think I might have figured out why it's only bugging out if your tping from the end to any other dim it's because they have a hard coded if statement if it's not the end dim spawn entity into new world. What the heck? This is garbage it should always do that and they should have a different teleporter for the end instead of always trying to use the nether teleporter instead they give you garbage so you either code around it or make your own method because you can't use it as is since it don't work. Vanilla hard coded if is end do nothing: if (lastDimension != 1) { oldWorldIn.profiler.startSection("placing"); d0 = (double)MathHelper.clamp((int)d0, -29999872, 29999872); d1 = (double)MathHelper.clamp((int)d1, -29999872, 29999872); if (entityIn.isEntityAlive()) { entityIn.setLocationAndAngles(d0, entityIn.posY, d1, entityIn.rotationYaw, entityIn.rotationPitch); teleporter.placeInPortal(entityIn, f); toWorldIn.spawnEntity(entityIn); toWorldIn.updateEntityWithOptionalForce(entityIn, false); } oldWorldIn.profiler.endSection(); } Work Around: if(oldWorld.provider.getDimension() == 1) { System.out.println("End to Another Dim Patching Vanilla:" + p.getName()); tele.placeInPortal(p, p.rotationYaw); newWorld.spawnEntity(p); newWorld.updateEntityWithOptionalForce(p, false); } Vanilla needs to have proper object orientation for teleportation shouldn't have to do that work around myself but, you know....
  8. this is an improper fix this is what I am worried about please help me on this. Line 86: if(!newWorld.loadedEntityList.contains(p) || !newWorld.playerEntities.contains(p)) { System.out.println("ERR Player Not Added To World:" + p.getName()); newWorld.spawnEntity(p); }
  9. I could comment out the respawn method even though the packet for respawn is there in the player list transfer dimension aka vanilla respawns but, not forge. So I thought why not fire it on forges side to. It could mess up things either way so I just left it there. But, I will comment it out for the tp command. What other crap is there? I told you why I had the code to re position the entity before changing dimensions because the way the transfer works is set the players location on the connection from the players current position thus alot more chunks would load. If you got a better idea for doing this or a manual method idea I am all ears. Also if you looked I didn't say player.connection.setlocation meaning that it's not going to send any packets and before the tick is even up the player changes to that specified dimension at that location. The package name is named right: The prefix is com: the domain is evilnotch the function aka program is lib So team evil notch has a lib. I know it's only three chars but, I didn't want any more then I had to name and com.evilnotch.library sounded wrong and unprofessional
  10. no it's com.evilnotch.lib most programs have their package base retaliative to their program name. And in all previous versions of how to make a mod and even program tatorials for java say use three packages com(program option),org(library and api only),net(don't remember second option). Then it says what is the author usually and the third dot is what is the program used for. This rules out package and classes getting overridden by other java programs in memory. No I don't own mc user EvilNotch but, I do own the Team EvilNotch do you know what I am saying? I was trying to revive old ideas but, all the other coders quit on me so the actual source plan me and another agreed we would do (update evil minecraft) never happened. I forgot about the build.gradle I just reset the repository so I forgot to add it back thanks. It's up now. The only thing I edited though was options.encoding = "UTF-8" under compile java
  11. dupe classes well I will take a look at that. Of course I own evil notch lib just go to curseforge then take a look at evil notch lib the owner says it was me if it wasn't it would have been a fork which is detectable on github. I am in the middle of a huge update and I am not going to say this is 2.0 it's just a huge update so I could do builds or snapshots this time I decided snapshots since each stage had little to no bugs. Wow that's alot of dupes I wonder how src wound up there. Fixing it now new repository should be same link. https://github.com/jredfox/evilnotchlib So you going to test why the entity player gets added to the world arrays sometimes and not others by calling player list travel to dimension? evilnotch.com no I don't It's the failed team's name that originally planned on updating evil minecraft mod but, I got way too busy with utility mods and the rest of the team quit on me. But, I did succeed in writing a legacy mod to fix minecraft to be more like 1.2.5 in 1.7.10 called evil notch core. The code was rushed and although the code looked clean in most areas had bugs since I didn't understand how everything worked. I plan on making evil notch core re-write once the lib nessary for it has been done as well as silkspawners and mob spawnage updates and dungeon tweaks the original coding team for evil notch quit( evil notch himself didn't and was constantly asking for a new team of coders all the way up to early 2014 sad nobody responded)
  12. Ok I am currently using evil notch lib for the command. It will be in a separate mod eventually https://github.com/jredfox/evilnotchlib I found a fix but, I know it's not proper since the entity player could already be added to the chunk list and it's not calling the proper method in the first place that I know of. if(!newWorld.loadedEntityList.contains(p) || !newWorld.playerEntities.contains(p)) { System.out.println("ERR Player Not Added To World:" + p.getName()); newWorld.spawnEntity(p); }
  13. After 5 seconds with this code on tick this was still printing and didn't print until I teleported straight from the end to the nether. I tried teleporting from the nether to end before and it didn't print so it only occurs from end to nether then it bugs out. if(!event.player.world.loadedEntityList.contains(event.player)) System.out.println("ERR:" + event.player.getName() ); It appears player list has some broken if statements that will never fire because they say if false && method() well it's never going to fire.
  14. I checked them after the dimension change. I care because the @p command no longer works and it's going to cause mod incompatibilities when it can't find the player. I gave it a full 2 seconds before trying to transfer from the nether back to the end but, couldn't find @p. you probably are right on the arraylists taking a couple ticks to update but, what is causing it then? going to have a tick checker firing every second will post resaults
  15. sorry arraylists very tired right now. loadedEntities, playerEntities that's the first two things I checked and were blank after calling my tp command from end to nether
  16. Look at my method call: p.getServer().getPlayerList().transferPlayerToDimension(p,traveldim, new EntityTeleporter(p.getServer().getWorld(traveldim))); That is what I call to change dimensions and it does work but, the world hashmaps and possibly other data isn't synced right? What other thing should I be calling? That method is what perfect spawn calls and what vanilla calls is my guess somewhere.
  17. Entity travelToDimension seems to be non existent but, I did eventually find changeDimension which I don't see called anywhere in playerlist guess it's bugged going to give this a try or vanilla always expects that to fire first which means it's called elsewhere either way going to give it a try soon. Edit: that method I found above doesn't do what I need it to do it doesn't even add them to the hashmaps. Setting the location without packets it's a set of varibles. If I transfered the player to the dimension then set the location it lags alot so I set the location first therefore only loading the chunks your xyz is suppose to be at. And if I detect it's still not re positioned then I do it again this time with networks being involved
  18. Not to spam or anything but, this is weird when teleportation from my command from end to nether it doesn't add it to any of the word's new hash maps like loaded entities and loaded players I would even guess the chunk hash maps. [02:38:20] [Server thread/INFO] [STDOUT]: [com.EvilNotch.lib.minecraft.content.CMDDim:execute:94]: Ent List:[] [02:38:20] [Server thread/INFO] [STDOUT]: [com.EvilNotch.lib.minecraft.content.CMDDim:execute:95]: EntHasPlayer:false I call the vanilla method transfer player to dimension what else should I be calling? https://gist.github.com/jredfox/9b81f4f26ebb81a9398618e330a7abae I fire forge's respawn event since the respawn packet is there on vanilla player list travel player to dimension. Is this wrong should this not be considered as a respawn since the player is being transferred? I will take a look at the entity method transfer to dimension but, the player list should be all I have to call for players.
  19. /** * Must be only called if player is at end dim this is because vanilla is hard coded and no longer displays bars outside of end dim */ public void removeDragonBars(EntityPlayerMP p,World end) { try { DragonFightManager fightManager = ((WorldProviderEnd)end.provider).getDragonFightManager(); if(fightManager != null) { FieldAcess.method_dragonManager.invoke(fightManager); } } catch(Throwable t) { t.printStackTrace(); } }
  20. I got the dragon manager to update as the player leaves the world. It appears this bug is only 1.9+ I never heard of it occurring in 1.7 especially since it use to be client only and we had mods to transfer to other dimensions lots of them some only calling vanilla methods. It appears this issue doesn't exist for withers and it also appears that dragon bars do not appear and dragons do not work unless they are in their specified dimension unlike < 1.9 versions Now I need to know why the @p cannot find nearest player. Something isn't syncing when the player goes from the end dimension to the nether dimension. I need to know what hashmap isn't populated
  21. I didn't do anything backwards and no it doesn't work. Take a look at mist craft which did the same thing the ender dragon bug still occurs when doing as I said above just with their command. So how do I fix this? Why can't the command find @p is what I need to know And if you took a look at my code I call a vanilla handler for changing dimensions so....
  22. I think I figured out the dragon/wither it's setup hard coded and stupid at least via server side. The entity contains the boss info server necessary to send a packet to the client to add/remove boss bar.but, the thing is you need that instance to begin with. I don't see why the server is handling client only code. It should be only packets and then handled via client side and clients then have an array of bars. I will test my hypothesis by caching all boss mobs then on world change remove boss bars and then clear the cache. I still need help with not being able to find @p bug? please help. Why can't the vanilla command not be able to find the nearest player? Edit: the objects for the dragon/wither boss data doesn't get updated and no longer exist after traveling to another dimension so I am thinking of a tick handler client only where if the data doesn't update in so many ticks to remove the bar. How could I do this?
  23. you could try and replace gravel and sand blocks base class via asm(every mod that extends x class) or replace them hard coded to do your function by using the same registry name for your block
  24. create a gui and go through the clients world's loaded chunks array then for each type of block increment one and then display then as icons in a scroll bar gui. Make sure it's not an air block It's up to you if you want live updates or do you have to reopen the gui/refresh button since live every tick is laggy
  25. I guess I was being specific enough I need help fixing those issues and have no clue how to undo the boss bar and no clue as to why @p cannot find me
×
×
  • Create New...

Important Information

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