jredfox
Members-
Posts
660 -
Joined
-
Last visited
Everything posted by jredfox
-
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
/kill command > respawn or vanilla teleport everything is updated with the exception in dimension change the hearts/experiance don't update. The hearts don't update with TConstruct/Aether health. The data is in ForgeData:{PlayerPersisted:{//tags go here}} it's something like that and it's synced to a gui with text and numbers. -
[Solved]Flowing Fluid To Still Fluid For buckets
jredfox replied to jredfox's topic in Modder Support
Well I don't understand that comment but, I figured out what I am going to do. 1.10.2 > Support ItemBucket/Universal Bucket Class ItemBucket > get stack from block (support vanilla if is not flowing get the flowing) > preserver enchantments and/or NBT Universal bucket class has output stack, and getfluid. I think it fires fill bucket event yes? If so it could be supported easily. > preserver enchantments and/or NBT -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
Ok let's do it this way since it's a terrible process. How do I fool the server and client into thinking that it's changed dimensions as if you just went to the nether by normal means without actually teleportation? I can teleport the player across dimensions but, it's still not updating so what is the difference? Second off I know that the player client does have nbt so I don't know what your talking about it had the forge data with rpg mods printed only on the client. If I use /kill everything updates what does the death of the player do that makes it update all playerdata? Don't tell me it doesn't I already confirmed this. -
[Solved]Flowing Fluid To Still Fluid For buckets
jredfox replied to jredfox's topic in Modder Support
Are modded liquids forced to fallow these procedures? If not I think I might have great incompatibility issues. What I am actually trying to do: fix vanilla's fill bucket event: preserve NBT on fill for that I need to get the ItemStack to what it's suppose to be for that I need get it from by Block > ItemStack bucket cache, for that I need to know what precociously the block is not two separate blocks still and flowing. Is there another way without ASM for detecting what the ItemBucket's Output is suppose to be? Specifically on the fill event not on the empty event. I got the stack from the empy event by Iitem.getContainerItem() -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
Well then upon loading a world how does it know what data to pull and where to make the player read and write on which side? I would like to know where that class is because, it might be the solution. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
ok that helps will be debugging their nbt's and if that's not any different I need you to try and tell me or lead me to all the packets the player uses and with forge so I can create an update method. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
Wait what if some stuff get's stored on client and other stuff doesn't? What we cached everything only on the server and it's missing tags. Or it needs another reading after everything is done? Or packets but, I don't see how I would create such and update method. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
He caches the nbt of the player by right click empties inventory goes to a different dimension that part works but, not everything, yes the inventory comes back but, stuff like the rpg mods levels haven't. The Item: https://github.com/Z-Doctor/TestTeleport/blob/master/TestUpdate/src/main/java/zdoctor/testmod/init/ZItems.java The Teleporter class: https://github.com/Z-Doctor/TestTeleport/blob/master/TestUpdate/src/main/java/zdoctor/testmod/SilentTeleport.java -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
I said pretend like it's the cache he get's the entity data from a stick. He wrote this for me so I could fix it up but, after dev testing it doesn't fully work as intended https://github.com/Z-Doctor/TestTeleport/blob/master/TestUpdate/src/main/java/zdoctor/testmod/init/ZItems.java He is attempting to cache all playerdata to an item right click on it and then get everything backed and all synced up -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
I think I found some of that out tonight could you please take a look at our code to update the player? pretend the NBT came from the cache. The issue with his update method is it updates everything across dimensions but, isn't syncing with forgedata and other stuff like with other mods @SubscribeEvent(priority = EventPriority.HIGHEST) public void inventoryFixer(TickEvent.PlayerTickEvent e) { World worldIn = e.player.getEntityWorld(); EntityPlayer playerIn = e.player; // Implemet your loading NBTTagCompound playerNBT = playerIn.getEntityData(); if (!playerIn.isDead) { int currentDimension = playerIn.dimension; int dimensionIn = playerNBT.getInteger("Dimension"); NBTTagCompound tempNBT = playerNBT.copy(); tempNBT.setInteger("Dimension", currentDimension); if (currentDimension != dimensionIn) { if (!worldIn.isRemote) { EntityPlayerMP playerMP = (EntityPlayerMP) playerIn; SilentTeleport teleporter = new SilentTeleport(playerMP.getServer().getWorld(dimensionIn)) { @Override public boolean placeInExistingPortal(Entity entityIn, float rotationYaw) { super.placeInExistingPortal(entityIn, rotationYaw); playerIn.readFromNBT(playerNBT); return false; } }; playerMP.getServer().getPlayerList().transferPlayerToDimension(playerMP, dimensionIn, teleporter); } } else { playerIn.readFromNBT(playerNBT); } } } And Also The teleporter class package zdoctor.testmod; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.Teleporter; import net.minecraft.world.WorldServer; public class SilentTeleport extends Teleporter { public SilentTeleport(WorldServer worldIn) { super(worldIn); } public void silentTransferToDimension(Entity entityIn) { } @Override public boolean placeInExistingPortal(Entity entityIn, float rotationYaw) { System.out.println("teleporting silently"); double d5 = entityIn.posX; double d6 = entityIn.posY; double d7 = entityIn.posZ; if (entityIn instanceof EntityPlayerMP) { ((EntityPlayerMP) entityIn).connection.setPlayerLocation(d5, d6, d7, entityIn.rotationYaw, entityIn.rotationPitch); } else { entityIn.setLocationAndAngles(d5, d6, d7, entityIn.rotationYaw, entityIn.rotationPitch); } return false; } @Override public void placeInPortal(Entity entityIn, float rotationYaw) { placeInExistingPortal(entityIn, rotationYaw); // super.placeInPortal(entityIn, rotationYaw); } @Override public void removeStalePortalLocations(long worldTime) { // super.removeStalePortalLocations(worldTime); } @Override public boolean makePortal(Entity entityIn) { return super.makePortal(entityIn); } } -
[Solved]Flowing Fluid To Still Fluid For buckets
jredfox replied to jredfox's topic in Modder Support
thanks -
Solved: the answer is that modded fluids are suppose to be one block just support vanilla and you will be fine with your getter method. public static ItemStack getBucketStack(Block b) { Iterator<Map.Entry<String, Block>> it = Registry.buckets.entrySet().iterator(); while(it.hasNext()) { Map.Entry<String, Block> pair = it.next(); String name = pair.getKey(); Block block = pair.getValue(); if(b == block) { LineBase line = new LineBase("\"" + name + "\""); return new ItemStack(GameRegistry.findItem(line.modid, line.name)); } } return null; } try{ //cache buckets for(Item item : Registry.items) { if(item instanceof ItemBucket) { Block block = (Block) ReflectionHelper.findField(ItemBucket.class, MCPMappings.getFeildName(MainCommonMod.isEclipse, "isFull")).get(item); Registry.buckets.put(ItemUtil.getItemString(item),block); } } }catch(Exception e){e.printStackTrace();} public static boolean isFluid(Block b) { return b instanceof BlockFluidBase || b instanceof BlockLiquid || b instanceof IFluidBlock; } How do I Get Flowing Fluid > Still Fluid? I noticed there was FluidRegistry but, I can't seem to find out how to get the flowing liquid from the still liquid. Example: I have flowing_water in a Forge event. How do I get still_water?
-
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
zdoctor figured it out just teleport the player to the location and it will update everything.... after you call read from nbt on both client and server. Haven't tested it but, he is sure you need the read from nbt on client -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
You wanted me to reproduce the bug yes? It occurs the most in 1.7.10 yes? Then when I go back and give the file you do this? My primary goal is actually 1.10.2 but, I need to re-write some stuff. I need to revert the combat system this is the main function of EvilNotchCore mod but, I can't do that till I learn some core modding. Yes it will fix vanilla issues as well like bucket events. Yes I might request several forge pulls sooner or later but, first I want stuff like 1.10.2 to be playable as in no new combat system, and minimum bugs. the problem is that I want the player to update based on cached nbt that I store in a file. The issue is I need to make an update method. How does the world when loading load the player into being I am sure if I copy and paste stuff from that it would work on updating the player. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
According to the log no exceptions occurred and the bug was produced. https://pastebin.com/APSSXqYf -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
there is more then one issue then the uuid changing it's playerdata file corruption alot more rarer but, I have had it happen once or twice in modpacks. I can't recreate it so I can't tell you anything. I will post a log next time uuid changes here.... -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
what will then? I am not aiming to try and fix the uuid change I am trying to if an exception occurs/corruption/uuid change of the playerdata I plan on updating playerdata. I mean if forge is willing to put a tick event with my ideas of playerdata cache or just fix it entirely by making everything use playerdata by username then yes that would fix the issue and be nice. But, I doubt they would fix anything more then the uuid changing. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
Ok so the server sends packets to the client of the player? Are there any forge packets I should be aware of like forgedata tag? This is great news. What package is this located in the vanilla ones and forges if any? Once I find all these packets I could have a player update method in no time. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
next time it happens I will it doesn't happen too often... clearly you don't know more then I have debugged. Without the client reading the nbt it will not change position, I have manullay tried to sync them but, it didn't work across dimensions. The cached playerdata is the players entire NBT transferred and upon use I get the current uuid most and least before I make the player read it. If that were true player.writeToNBT(nbt); wouldn't work which in a matter of fact it does. NBT read and write works like this. write to nbt > writes it to an nbttagcompound read > from nbttagcompound > variables In order to update the player I need to call player.readFromNBT(...) but, I need to sync it the way it works normally I don't know how to do this this is what I am asking -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
Well it has and has been doing so in versions 1.7.10+ it's because it had an error reading the playerdata according to the console. I want to update Broken new Players playerdata > with cached playerdata. It involves every single piece of player NBT being updated on both client and server. Don't worry I know how to pull the nbt from the cached file I just don't know how to properly update the player's nbt from there. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
no you uuid does change and it's synced with the playerdata as proof. first is 6abf... after the bug occurs it's now synced with 86da... So when I cache the playerdata to a file on uuid change I use that playerdata but, I need the player to update all of it's playerdata. You still haven't explained on how to do this. What if I wanted to change the playerdata to someone else's via command dimension pos everything? -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
When your uuid changes it creates you a new playerdata aka your inventory wipes , your dimension overoworld,you pos is at spawn, all you aoa levels gone, your hunger and hearts full etc... I can't pinpoint where and when It occurs the information given is the most I have seen from it. All I know is it changes the uuid when it has an exception. -
[Solved]Letting Client Player know It Needs to read NBT
jredfox replied to jredfox's topic in Modder Support
It occurs in plain vanilla sometimes, it occurs more when forge is installed, and occurs alot with certain mods. It occurs sometimes randomly in game with a modpack It occurs alot more if the world doesn't open right just sends you back to the main screen then you double click on the world says shutting down internal server then changes uuid next thing you know your player data is a new playerdata That isn't the point though I would want to know regardless if it get's fixed or not the proper way to update an entire playerdata to the player. -
I will for newer versions? does the pull mean I have to code my own forge version and request it to be implemented or just asking for forge to do something?
-
Then how am I suppose to do this then you said so yourself events that hook into vanilla require a coremod. anyways I need to remove tile entities. I tried print a list on world load and it said TileEntities:[] list was empty but, I printed it on tick event. Then it gave me some output. I need to know where this is happening at is it world.setTileEntity(...)? TileEntityList[net.minecraft.tileentity.TileEntityMobSpawner@557ed124, net.minecraft.tileentity.TileEntityChest@1b2b7e61] I found out that it's not one but, three methods I need to patch addTileEntity()//patch tile entity parameter setTileEntity()//patch tile entity parameter func_147457_a()//patch tile entity parameter