Revert "Merge remote-tracking branch 'origin/dev' into dev"

This reverts commit 66edbcea80, reversing
changes made to 3fd962289c.
This commit is contained in:
Luis C.M committed 2022-11-06 01:25:28 -06:00
1 parent 66edbcea80
commit 8d3cd3fd82
58 files changed
+780 -284

No files matched your search

@@ -363,6 +363,14 @@ public class ScriptEntity<T extends Entity> implements IEntity {
this.setMotionZ(z);
}
public void setMotion(IPos pos) {
this.setMotion(pos.getX(),pos.getY(),pos.getZ());
}
public IPos getMotion() {
return NpcAPI.Instance().getIPos(entity.motionX,entity.motionY,entity.motionZ);
}
public boolean isAirborne(){
return entity.isAirBorne;
}
@@ -398,13 +406,21 @@ public class ScriptEntity<T extends Entity> implements IEntity {
}
public IPos getPos() {
return new ScriptBlockPos(new BlockPos(entity.posX,entity.posY,entity.posZ));
return NpcAPI.Instance().getIPos(entity.posX, entity.posY, entity.posZ);
}
public IPos getPosition() {
return getPos();
}
public void setPos(IPos pos) {
this.entity.setPosition((double)((float)pos.getX() + 0.5F), (double)pos.getY(), (double)((float)pos.getZ() + 0.5F));
}
public void setPosition(IPos pos) {
this.setPos(pos);
}
public int getDimension(){
return entity.dimension;
}
@@ -730,6 +746,10 @@ public class ScriptEntity<T extends Entity> implements IEntity {
entity.velocityChanged = true;
}
public void knockback(IPos pos, float direction){
this.knockback(pos.getX(),pos.getY(),pos.getZ(),direction);
}
public void setImmune(int ticks) {
entity.hurtResistantTime = ticks;
};
@@ -789,6 +809,11 @@ public class ScriptEntity<T extends Entity> implements IEntity {
this.entity.readFromNBT(nbt.getMCNBT());
}
public INbt getNbtOptional() {
NBTTagCompound compound = new NBTTagCompound();
return this.entity.writeToNBTOptional(compound) ? NpcAPI.Instance().getINbt(compound) : null;
}
public void storeAsClone(int tab, String name) {
NBTTagCompound compound = new NBTTagCompound();
if (!this.entity.writeToNBTOptional(compound)) {