mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 09:59:42 +00:00
Added ScriptBlock and ScriptNbt support to scripting API
This commit is contained in:
1 parent
6752f8baec
commit
699182f4c0
9 files changed
+339
-4
No files matched your search
@@ -19,6 +19,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.Server;
|
||||
@@ -486,4 +487,12 @@ public class ScriptEntity<T extends Entity> implements IEntity{
|
||||
public T getMCEntity(){
|
||||
return entity;
|
||||
}
|
||||
|
||||
public INbt getNbt() {
|
||||
return NpcAPI.Instance().getINbt(this.entity.getEntityData());
|
||||
}
|
||||
|
||||
public void setNbt(INbt nbt) {
|
||||
this.entity.readFromNBT(nbt.getMCNBT());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user