mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 06:45:39 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
85a117fa6a
39 files changed
+847
-172
No files matched your search
@@ -89,7 +89,7 @@ public class ScriptBlockPos implements IPos {
|
||||
}
|
||||
|
||||
public IPos add(IPos pos) {
|
||||
return NpcAPI.Instance().getIPos(this.blockPos.add(this.blockPos));
|
||||
return NpcAPI.Instance().getIPos(this.blockPos.add(pos.getXD(), pos.getYD(), pos.getZD()));
|
||||
}
|
||||
|
||||
public IPos subtract(double x, double y, double z) {
|
||||
|
||||
@@ -342,6 +342,14 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return npc.stats.projectilesKeepTerrain;
|
||||
}
|
||||
|
||||
public void setProjectileInvincibility(boolean allowed) {
|
||||
npc.stats.projectileInvincibility = allowed;
|
||||
}
|
||||
|
||||
public boolean getProjectileInvincibility() {
|
||||
return npc.stats.projectileInvincibility;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param message The message the npc will say
|
||||
|
||||
@@ -172,6 +172,16 @@ public class ScriptLinkedItem extends ScriptCustomizableItem implements IItemLin
|
||||
return this.itemDisplay.translateX != null ? this.itemDisplay.translateX : this.linkedItem.display.translateX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getTranslateY() {
|
||||
return this.itemDisplay.translateY != null ? this.itemDisplay.translateY : this.linkedItem.display.translateY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float getTranslateZ() {
|
||||
return this.itemDisplay.translateZ != null ? this.itemDisplay.translateZ : this.linkedItem.display.translateZ;
|
||||
}
|
||||
|
||||
public NBTTagCompound getMCNbt() {
|
||||
NBTTagCompound compound = super.getMCNbt();
|
||||
compound.setTag("ItemData", this.getItemNBT(new NBTTagCompound()));
|
||||
|
||||
Reference in new issue
Block a user