Everything posted by AskHow1248
-
Packets not getting recieved problem
Let me restate the promlem: My tile entity doesn't save it's key code on the client side, so when my client side container searches for destinations (others of my tile entities) it returns everything (all their codes were not saved), but when my server side container searches for destinations, it only returns the tile entities with the correct code. I either need to sync the codes accross client and server when the tile entities are loaded, or give the client side container the correct data. If I could get the data to save on the client side too, that would work. Is it suposed to save?
-
Packets not getting recieved problem
To clairify, the values I need to sync are part of the tile entity, not the container.
-
Packets not getting recieved problem
I'm trying that. What happens, is that to find destinations, my tile entity searches through the world's loaded tile entities and returns the ones with the same key code. When it does this on the client side, it adds every one of my tile entities, since for some reason the key code is not saved on the client side. I am using this from the furnace: This doen't work, it just gives the player an item.
-
Packets not getting recieved problem
OK. In the block, I used different gui IDs to specify wether I want the slot open or closed, and that worked, but I still need the client and server tile entities to sync. Example: The server keyCode is correct, but the client one gets reset every time. I need either a way to sync the tile entities, or a way to access the server tile entity from the client side. When I put a different keystone in, both the client and server codes update, but if I use Save And Quit To Title, when I come back, the client code has been reset!
-
Packets not getting recieved problem
I did that, but like I said, the problem is that I have to determine which container to open on the client and server side, but minecraft only saves tileEntity data on the server side, so I get different containers, and therefor different amounts of slots, on the client and server sides. I tried sending an event with a boolean data menber and seting it to the right value only if the world is server side, but that's not working. If anyone has a different way to conditionally display a slot, that is all I am trying to do!
-
Packets not getting recieved problem
I think I might be able to send an event with a boolean value, catch it on the server-side, set the boolean to the correct value, and then use that value in the getClientGuiElement().
-
Packets not getting recieved problem
GUI handeler: Block (where I open the gui): TileEntity: My problem was that I would change the stack in the inventory, but I would only call onInventoryChanged() from the container (server side). My tileEntity used onInventoryChanged() to update it's keyCode from it's inventory. I fixed that, but now my problem is that minecraft seems to only save/load tileentities from nbt on the server side, so when I try to use different containers for different tile entity values, only the server side one has the correct data. That causes the guiHandeler to return different things on the server side than the client side. What I need, is a way to either update the client tile entity to have the same data as the server-side one, or access the server tileentity from getClientGuiElement().
-
Packets not getting recieved problem
I think it might be because in my block, I only open the gui on the server-side. I don't know though. EDIT: nope, that didn't fix it,
-
Packets not getting recieved problem
Update: It seems to only be saving the key code on the server side, because when I use another item to read the server-side code, it comes out correct. It would also explain the error since I would have different codes on different sides, and therefor the gui handeler would get out of sync. I still don't know how to fix it though!
-
Packets not getting recieved problem
I have a gui which uses one of two containers, depending on wether the player has the right item in thier inventory. Everything works fine, except if I go back to the menu (without closing minecraft) and then go back into the world and try to open the gui. LOOK AT THE BOTTOM OF THE PAGE FOR THE NEW PROBLEM!!!!!! Error: Gui: Container 1 (no access): Container 2 (access):
-
Can someone check my inventory utils class?
Can someone just look over and error check my inventory utils class (feel free to use it yourself)? Thanks for any feed back!
-
TileEntitySpecialRenderer problems (texture flickers)!
Thanks, I'm prety sure that's what it is, but now I'm using a model, which I like better anyway. Does anyone know a way to get the texture not to float (like with redstone,where the texture is one pixel above the base block)?
-
TileEntitySpecialRenderer problems (texture flickers)!
Update: The texture flickers when you move, but it doesn't flicker if I set isOpaqueCube to true (but then you can see through it).
-
PlayerInteractEvent - Is the player placing or using a block?
Look at PlayerInteractEvent.useBlock. I am having the same problem, and I am not sure how to fix it.
-
TileEntitySpecialRenderer problems (texture flickers)!
I have the renderer, but the texture flickers, and sometimes disapears. Here's my code: Renderer: Block:
-
TileEntitySpecialRenderer problems (texture flickers)!
Is there a good tutorial on rendering Blocks? All I need to do is use different textures for different values of a certian variable, but I know no rendering at all.
-
TileEntitySpecialRenderer problems (texture flickers)!
I do have a TileEntity, so I will use TIleEntitySpecialRenderer. Thanks guys.
-
TileEntitySpecialRenderer problems (texture flickers)!
I have a block with a custom amount of "power" in it, and I want the block to get brighter as there is more power. I have three textures I want to use for different power ranges, but when the block gets into a new power range, it dosen't update. If I place a block next to it, or force it to update, it works, but it won't work on it's own. I think it might have something to do with textures being client-side and tile entities being server-side, but I dont know how to fix it. Thanks in advance for any help. Block: TileEntity:
-
Is there a way to get the ForgeDirection a Vec3 is pointing?
This is what I'm going to try to use. Fell free to use it yourself Revised: public static ForgeDirection getForgeDirection(Vec3 vec) { vec.normalize(); double pitchR = Math.atan(vec.yCoord / Math.sqrt(Math.pow(vec.xCoord, 2) + Math.pow(vec.zCoord, 2))); double yawR = Math.atan2(-vec.zCoord, vec.xCoord); double pi = Math.PI; ForgeDirection dir = ForgeDirection.UNKNOWN; System.out.println("Pitch: " + pitchR + ", Yaw: " + yawR); if(yawR < -pi || yawR > pi) System.err.println("Yaw is too big!!"); if(pitchR > -pi/4 && pitchR < pi/4){ // if the vector is mostly horizontal if(yawR >= -pi/4 && yawR <= pi/4) dir = ForgeDirection.EAST; else if(yawR < -pi/4 && yawR >= -3*pi/4) dir = ForgeDirection.SOUTH; else if(yawR > pi/4 && yawR <= 3*pi/4) dir = ForgeDirection.NORTH; else if(yawR < -3*pi/4 || yawR > 3*pi/4) dir = ForgeDirection.WEST; } else if(pitchR >= pi/4) dir = ForgeDirection.UP; else dir = ForgeDirection.DOWN; return dir; } Edit: I have a gitch where it sometimes thinks South is West, and I have no idea why. Edit 2: I fixed it.
-
Is there a way to get the ForgeDirection a Vec3 is pointing?
Thanks, but I think I can make a exact way. If you can get the ForgeDirection an Entity is looking, that would also work.
-
[1.7.2] Inventory Not Saving
This code does not do what you think it does: NBTTagCompound nbttagcompound; for(i = 0; i < this.inventory.length; ++i) { if(this.inventory[i] != null) { nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("Slot", (byte) (i)); this.inventory[i].writeToNBT(nbttagcompound); par1NBTTagList.appendTag(nbttagcompound); } } Your problem is that nbttagcompound is a refrence to a NBtTag, so when you set it to a new NBTCompountTag, you are overwriting the previous one. Also, there light already be Nbt tags in the TagList, so you need to save a starting point to read from. Also, I think the method you want to override is writeToNBT(NBTTagCompound), not writeToNBT(NBTTagList), though it might have changed (I'm in 1.6.4). Here is what I use (It works):
-
Is there a way to get the ForgeDirection a Vec3 is pointing?
Hi everybody. I am wondering if there is a easy way or method to get the ForgeDirection that a Vec3 (or any other type of 3D vector) is pointing? I am trying to make a block that blends in to it's souroundings, if it makes any difference. Thank you in advance.
-
How to make a block that mobs of a certain type can't walk over?
Think this will work:
-
How to make a block that mobs of a certain type can't walk over?
So I have my PathFinder, but how do I tie that in to my Entity? I need some way to get a PathNavigator that uses my PathFinder, I think.
-
How to make a block that mobs of a certain type can't walk over?
I think this will work, will you check it?
IPS spam blocked by CleanTalk.