effect command

This commit is contained in:
Sen 2025-03-25 17:02:41 +01:00
parent 6c0bd5481f
commit 66421e806e
16 changed files with 393 additions and 16 deletions

View file

@ -213,6 +213,9 @@ public class NetHandlerPlayServer extends NetHandler implements ICrafting, Scrip
private int lastExperience = -99999999;
private int currentWindowId;
private int pointedEntity;
private BlockPos pointedPosition;
public final List<ChunkPos> loadedChunks = new LinkedList<ChunkPos>();
private final List<Integer> destroyedItemsNetCache = new LinkedList<Integer>();
// private final Set<StatBase> statsQueue = Sets.<StatBase>newHashSet();
@ -2065,6 +2068,8 @@ public class NetHandlerPlayServer extends NetHandler implements ICrafting, Scrip
public void processComplete(CPacketComplete packetIn)
{
NetHandler.checkThread(packetIn, this, this.server);
this.pointedEntity = packetIn.getEntityId();
this.pointedPosition = packetIn.getPosition();
if(packetIn.getMessage().startsWith(" ")) {
this.entity.connection.sendPacket(new S3APacketTabComplete(new String[0]));
return;
@ -3090,6 +3095,14 @@ public class NetHandlerPlayServer extends NetHandler implements ICrafting, Scrip
}
}
public Entity getPointedEntity() {
return this.pointedEntity != -1 && this.entity != null ? this.entity.worldObj.getEntityByID(this.pointedEntity) : null;
}
public BlockPos getPointedPosition() {
return this.pointedPosition;
}
// public void processCmdBlock(CPacketCmdBlock packetIn) {
// NetHandler.checkThread(packetIn, this, this.serverController);
//