Update to 1.15.2

This commit is contained in:
Marcel Konrad
2020-01-25 14:19:00 +01:00
parent 5511cdc96d
commit 1adb09cacd
24 changed files with 112 additions and 93 deletions

View File

@@ -32,7 +32,7 @@ public class ComponentDisplay implements IBuilderComponent
{
if(this.lore[x] != null && !this.lore[x].isEmpty())
{
lore.add(StringNBT.func_229705_a_(this.lore[x]));
lore.add(StringNBT.valueOf(this.lore[x]));
}
}

View File

@@ -68,37 +68,37 @@ public class ComponentSummon implements IBuilderComponent
if(this.name.equalsIgnoreCase("Cat"))
{
this.tag = "CatType";
return IntNBT.func_229692_a_(this.random.nextInt(3) + 1);
return IntNBT.valueOf(this.random.nextInt(3) + 1);
}
else if(this.name.equalsIgnoreCase("Farmer") || this.name.equalsIgnoreCase("Fisherman") || this.name.equalsIgnoreCase("Shepherd") || this.name.equalsIgnoreCase("Fletcher"))
{
this.tag = "Profession";
return IntNBT.func_229692_a_(0);
return IntNBT.valueOf(0);
}
else if(this.name.equalsIgnoreCase("Librarian") || this.name.equalsIgnoreCase("Carthographer"))
{
this.tag = "Profession";
return IntNBT.func_229692_a_(1);
return IntNBT.valueOf(1);
}
else if(this.name.equalsIgnoreCase("Cleric") || this.name.equalsIgnoreCase("Priest"))
{
this.tag = "Profession";
return IntNBT.func_229692_a_(2);
return IntNBT.valueOf(2);
}
else if(this.name.equalsIgnoreCase("Armorer") || this.name.equalsIgnoreCase("Blacksmith") || this.name.equalsIgnoreCase("WeaponSmith") || this.name.equalsIgnoreCase("ToolSmith"))
{
this.tag = "Profession";
return IntNBT.func_229692_a_(3);
return IntNBT.valueOf(3);
}
else if(this.name.equalsIgnoreCase("Butcher") || this.name.equalsIgnoreCase("Leatherworker"))
{
this.tag = "Profession";
return IntNBT.func_229692_a_(4);
return IntNBT.valueOf(4);
}
else if(this.name.equalsIgnoreCase("Nitwit"))
{
this.tag = "Profession";
return IntNBT.func_229692_a_(5);
return IntNBT.valueOf(5);
}
if(this.entity != null)
@@ -108,7 +108,7 @@ public class ComponentSummon implements IBuilderComponent
if(StringUtils.containsIgnoreCase(this.name, "Baby"))
{
this.tag = "IsBaby";
return ByteNBT.func_229671_a_((byte) 1);
return ByteNBT.valueOf((byte) 1);
}
}
else if(this.entity.equals(EntityType.CHICKEN.getRegistryName()))

View File

@@ -80,7 +80,7 @@ public class ComponentTag<T> implements IBuilderComponent
return null;
}
return StringNBT.func_229705_a_(string);
return StringNBT.valueOf(string);
}
else if(this.value instanceof INBT)
{
@@ -98,27 +98,27 @@ public class ComponentTag<T> implements IBuilderComponent
}
else if(this.value instanceof Integer)
{
return IntNBT.func_229692_a_((Integer) this.value);
return IntNBT.valueOf((Integer) this.value);
}
else if(this.value instanceof Byte)
{
return ByteNBT.func_229671_a_((Byte) this.value);
return ByteNBT.valueOf((Byte) this.value);
}
else if(this.value instanceof Float)
{
return FloatNBT.func_229689_a_((Float) this.value);
return FloatNBT.valueOf((Float) this.value);
}
else if(this.value instanceof Double)
{
return DoubleNBT.func_229684_a_((Double) this.value);
return DoubleNBT.valueOf((Double) this.value);
}
else if(this.value instanceof Long)
{
return LongNBT.func_229698_a_((Long) this.value);
return LongNBT.valueOf((Long) this.value);
}
else if(this.value instanceof Short)
{
return ShortNBT.func_229701_a_((Short) this.value);
return ShortNBT.valueOf((Short) this.value);
}
else if(this.value instanceof Byte[])
{

View File

@@ -23,7 +23,7 @@ public class BuilderSignEditor extends BuilderData
for(int x = 0; x < 4; x++)
{
this.sign[x] = this.registerNBTComponent(new ComponentTag<SignText>("Text" + (x + 1), new SignText(x), text -> StringNBT.func_229705_a_(text.toString())));
this.sign[x] = this.registerNBTComponent(new ComponentTag<SignText>("Text" + (x + 1), new SignText(x), text -> StringNBT.valueOf(text.toString())));
}
}

View File

@@ -349,7 +349,7 @@ public class BuilderSummon extends CommandBuilderNBT
{
if(string.getUnformattedComponentText() != null && !string.getUnformattedComponentText().isEmpty())
{
return StringNBT.func_229705_a_(string.serialize());
return StringNBT.valueOf(string.serialize());
}
return null;