
david476
Members-
Posts
238 -
Joined
-
Last visited
Everything posted by david476
-
Without reading the code, I'd just extend BlockBed. Some other part of minecraft probably does a instanceof block bed check (like with crafting tables) and stops you from sleeping. As a plus, you don't need to duplicate the code!
-
Well I did get it working, but the bandwidth use isn't optimal. Basically, any client that is sitting in a seat (instanceof ...) sends data to the server, but only ones in specific seats are needed. The entity that sends the data knows which seats serverside but as UUIDs aren't universal () I can't get that entity variable to the clientside version of it. Any ideas?
-
But what do I check that against... That's what I need.
-
*the particular seat. I didn't want to send unnecessary packets.
-
Are UUIDs the same client and server side? I am trying to check if the player is riding the seat, but I can't get the entity variable.
-
Looking at some of my old packet code I think I might actually be able to get it working. Mostly I was hoping there was an easier way.
-
I have the player riding an entity and while WASD+Space are pressed, do different things to variables in a third entity (depending on the combination). Basically just a controllable entity, but the entity controlled is not the one ridden.
-
Exactly, that's what I'm trying to do. Unfortunately I haven't been able to get my head around other kinds of packets (especially getting the data to a specific entity serverside) so I was hoping this would work. Any tutorials/ want to give me a run down of what to do. I have read your tutorial on the subject, but I had trouble.
-
I'd be happy to help, but probably easier if you PM me (it'll be a long conversation) note: I haven't used GUIs before. I you don't want one I can certainly figure it out but otherwise...
-
Is it possible to do this? I tries and it seems to not update the server's data watcher...
-
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
Haven't been modding in a while but went back in and just using my own variable seems to work fine. Still has the smooth/ lagginess but I think that is just the actual rotation of the player... -
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
Update: It looks like this still happens when I just add to the rotation, so not a problem with using an entityPlayer's yaw. -
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
Shouldn't that be happening on the Entity class's onEntityUpdate that I call at the beginning of onUpdate with super.onUpdate();? Maybe that needs to be sent client side? Seemed to me like onUpdate wasn't being called on both sides... -
How would I check for a type of block at a specific location?
david476 replied to Althonos's topic in Modder Support
I just use: If (world.getBlock(x, y, z) instanceof BlockChest) { } Should work, any errors are just me forgetting stuff. Quick Reminder: don't store variables in block classes, methods are fine but can't be accessed after they are run. If you are trying to store any data more than a 0-15 int (metadata), use tileentities. -
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
using: if (ShipCSeat != null && ShipCSeat.riddenByEntity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) this.ShipCSeat.riddenByEntity; this.setRotation(player.rotationYaw, 0); } in an onUpdate class that calls super. ShipCSeat is the entity that the player actually rides retrieved from server on server using UUID. -
See if it has different AI than other mobs, don't know off hand.
-
Either extend BlockGlass or put in the same methods.
-
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
New terms to me! Want to expand on them? -
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
Note: rotations are being set to a entityRiding's (a player's in my case) yaw. -
Direct rotation (not "smooth" and prettier 359 -> 0)
david476 replied to david476's topic in Modder Support
I'll try, but just for a better explanation... Rotations for my entity are "smooth", they do not seem to get perfectly set exactly to the variable's value (renders are made into a consistent > 20 fps rotation). As a part of this, when the rotation variable I set goes from 359 to 0, the model rotates 359 degrees backwards instead of 1 in the right direction to get to 0(in a fraction of a second). -
Detect all nearby entities to player and then shoot lightning at them
david476 replied to Xile's topic in Modder Support
To get the players around you, entites have methods for finding other ones inside an AABB, just go through the list. -
Spawn a custom entity at the block (look up entity tut.) Delete block with world.setBlockToAir(x, y, z); in your entity render file, call the above code.