Update to 1.15.1
This commit is contained in:
@@ -7,7 +7,6 @@ import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.nbt.StringNBT;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@@ -24,7 +23,7 @@ public class ComponentDisplay implements IBuilderComponent
|
||||
|
||||
if(this.name.getText() != null && !this.name.getText().isEmpty())
|
||||
{
|
||||
display.putString("Name", ITextComponent.Serializer.toJson(new StringTextComponent(this.name.toString())));
|
||||
display.putString("Name", ITextComponent.Serializer.toJson(this.name));
|
||||
}
|
||||
|
||||
ListNBT lore = new ListNBT();
|
||||
@@ -33,7 +32,7 @@ public class ComponentDisplay implements IBuilderComponent
|
||||
{
|
||||
if(this.lore[x] != null && !this.lore[x].isEmpty())
|
||||
{
|
||||
lore.add(new StringNBT(this.lore[x]));
|
||||
lore.add(StringNBT.func_229705_a_(this.lore[x]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,37 +68,37 @@ public class ComponentSummon implements IBuilderComponent
|
||||
if(this.name.equalsIgnoreCase("Cat"))
|
||||
{
|
||||
this.tag = "CatType";
|
||||
return new IntNBT(this.random.nextInt(3) + 1);
|
||||
return IntNBT.func_229692_a_(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 new IntNBT(0);
|
||||
return IntNBT.func_229692_a_(0);
|
||||
}
|
||||
else if(this.name.equalsIgnoreCase("Librarian") || this.name.equalsIgnoreCase("Carthographer"))
|
||||
{
|
||||
this.tag = "Profession";
|
||||
return new IntNBT(1);
|
||||
return IntNBT.func_229692_a_(1);
|
||||
}
|
||||
else if(this.name.equalsIgnoreCase("Cleric") || this.name.equalsIgnoreCase("Priest"))
|
||||
{
|
||||
this.tag = "Profession";
|
||||
return new IntNBT(2);
|
||||
return IntNBT.func_229692_a_(2);
|
||||
}
|
||||
else if(this.name.equalsIgnoreCase("Armorer") || this.name.equalsIgnoreCase("Blacksmith") || this.name.equalsIgnoreCase("WeaponSmith") || this.name.equalsIgnoreCase("ToolSmith"))
|
||||
{
|
||||
this.tag = "Profession";
|
||||
return new IntNBT(3);
|
||||
return IntNBT.func_229692_a_(3);
|
||||
}
|
||||
else if(this.name.equalsIgnoreCase("Butcher") || this.name.equalsIgnoreCase("Leatherworker"))
|
||||
{
|
||||
this.tag = "Profession";
|
||||
return new IntNBT(4);
|
||||
return IntNBT.func_229692_a_(4);
|
||||
}
|
||||
else if(this.name.equalsIgnoreCase("Nitwit"))
|
||||
{
|
||||
this.tag = "Profession";
|
||||
return new IntNBT(5);
|
||||
return IntNBT.func_229692_a_(5);
|
||||
}
|
||||
|
||||
if(this.entity != null)
|
||||
@@ -108,7 +108,7 @@ public class ComponentSummon implements IBuilderComponent
|
||||
if(StringUtils.containsIgnoreCase(this.name, "Baby"))
|
||||
{
|
||||
this.tag = "IsBaby";
|
||||
return new ByteNBT((byte) 1);
|
||||
return ByteNBT.func_229671_a_((byte) 1);
|
||||
}
|
||||
}
|
||||
else if(this.entity.equals(EntityType.CHICKEN.getRegistryName()))
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ComponentTag<T> implements IBuilderComponent
|
||||
return null;
|
||||
}
|
||||
|
||||
return new StringNBT(string);
|
||||
return StringNBT.func_229705_a_(string);
|
||||
}
|
||||
else if(this.value instanceof INBT)
|
||||
{
|
||||
@@ -98,27 +98,27 @@ public class ComponentTag<T> implements IBuilderComponent
|
||||
}
|
||||
else if(this.value instanceof Integer)
|
||||
{
|
||||
return new IntNBT((Integer) this.value);
|
||||
return IntNBT.func_229692_a_((Integer) this.value);
|
||||
}
|
||||
else if(this.value instanceof Byte)
|
||||
{
|
||||
return new ByteNBT((Byte) this.value);
|
||||
return ByteNBT.func_229671_a_((Byte) this.value);
|
||||
}
|
||||
else if(this.value instanceof Float)
|
||||
{
|
||||
return new FloatNBT((Float) this.value);
|
||||
return FloatNBT.func_229689_a_((Float) this.value);
|
||||
}
|
||||
else if(this.value instanceof Double)
|
||||
{
|
||||
return new DoubleNBT((Double) this.value);
|
||||
return DoubleNBT.func_229684_a_((Double) this.value);
|
||||
}
|
||||
else if(this.value instanceof Long)
|
||||
{
|
||||
return new LongNBT((Long) this.value);
|
||||
return LongNBT.func_229698_a_((Long) this.value);
|
||||
}
|
||||
else if(this.value instanceof Short)
|
||||
{
|
||||
return new ShortNBT((Short) this.value);
|
||||
return ShortNBT.func_229701_a_((Short) this.value);
|
||||
}
|
||||
else if(this.value instanceof Byte[])
|
||||
{
|
||||
|
||||
@@ -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 -> new StringNBT(text.toString())));
|
||||
this.sign[x] = this.registerNBTComponent(new ComponentTag<SignText>("Text" + (x + 1), new SignText(x), text -> StringNBT.func_229705_a_(text.toString())));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ public class BuilderSummon extends CommandBuilderNBT
|
||||
{
|
||||
if(string.getUnformattedComponentText() != null && !string.getUnformattedComponentText().isEmpty())
|
||||
{
|
||||
return new StringNBT(string.serialize());
|
||||
return StringNBT.func_229705_a_(string.serialize());
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user