More merge fixes

This commit is contained in:
Luis C.M committed 2022-05-27 15:54:12 -05:00
1 parent ec5fc71413
commit 8d4a7ea0b6
10 files changed
+63 -393

No files matched your search

@@ -5,10 +5,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.scripted.CustomNPCsException;
import noppes.npcs.scripted.interfaces.entity.IDBCPlayer;
import noppes.npcs.scripted.interfaces.item.IItemStack;
import noppes.npcs.scripted.NpcAPI;
public class ScriptDBCPlayer<T extends EntityPlayerMP> extends ScriptPlayer<T>{
public class ScriptDBCPlayer<T extends EntityPlayerMP> extends ScriptPlayer<T> implements IDBCPlayer {
public T player;
public ScriptDBCPlayer(T player){
@@ -525,12 +526,33 @@ public class ScriptDBCPlayer<T extends EntityPlayerMP> extends ScriptPlayer<T>{
public byte getDBCClass(){
return player.getEntityData().getCompoundTag("PlayerPersisted").getByte("jrmcClass");
}
public void setDBCClass(byte dbcClass) {
if (dbcClass < 0 || dbcClass > 2)
return;
player.getEntityData().getCompoundTag("PlayerPersisted").setByte("jrmcClass", dbcClass);
}
public int getRace(){
return player.getEntityData().getCompoundTag("PlayerPersisted").getByte("jrmcRace");
}
public void setRace(byte race) {
if (race < 0 || race > 1)
return;
player.getEntityData().getCompoundTag("PlayerPersisted").setByte("jrmcRace", race);
}
public int getPowerType(){
return player.getEntityData().getCompoundTag("PlayerPersisted").getByte("jrmcPwrtyp");
}
public void setPowerType(byte powerType) {
if (powerType < 0 || powerType > 1)
return;
player.getEntityData().getCompoundTag("PlayerPersisted").setByte("jrmcPwrtyp", powerType);
}
public int getKillCount(String type){
type = type.toLowerCase().trim();
@@ -551,4 +573,4 @@ public class ScriptDBCPlayer<T extends EntityPlayerMP> extends ScriptPlayer<T>{
throw new CustomNPCsException("Invalid kill type: " + type + "\nValid kill types are: evil, good, neutral, all", new Object[0]);
}
}
}