mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 06:40:05 +03:00
55 lines
2.9 KiB
Diff
55 lines
2.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/advancements/Advancement.java
|
|
+++ ../src-work/minecraft/net/minecraft/advancements/Advancement.java
|
|
@@ -32,6 +32,7 @@
|
|
private final String[][] requirements;
|
|
private final Set<Advancement> children = Sets.<Advancement>newLinkedHashSet();
|
|
private final ITextComponent displayText;
|
|
+ public final org.bukkit.advancement.Advancement bukkit = new org.bukkit.craftbukkit.advancement.CraftAdvancement(this);
|
|
|
|
public Advancement(ResourceLocation id, @Nullable Advancement parentIn, @Nullable DisplayInfo displayIn, AdvancementRewards rewardsIn, Map<String, Criterion> criteriaIn, String[][] requirementsIn)
|
|
{
|
|
@@ -68,9 +69,9 @@
|
|
}
|
|
}
|
|
|
|
- public Advancement.Builder copy()
|
|
+ public Builder copy()
|
|
{
|
|
- return new Advancement.Builder(this.parent == null ? null : this.parent.getId(), this.display, this.rewards, this.criteria, this.requirements);
|
|
+ return new Builder(this.parent == null ? null : this.parent.getId(), this.display, this.rewards, this.criteria, this.requirements);
|
|
}
|
|
|
|
@Nullable
|
|
@@ -230,7 +231,7 @@
|
|
return "Task Advancement{parentId=" + this.parentId + ", display=" + this.display + ", rewards=" + this.rewards + ", criteria=" + this.criteria + ", requirements=" + Arrays.deepToString(this.requirements) + '}';
|
|
}
|
|
|
|
- public static Advancement.Builder deserialize(JsonObject json, JsonDeserializationContext context)
|
|
+ public static Builder deserialize(JsonObject json, JsonDeserializationContext context)
|
|
{
|
|
ResourceLocation resourcelocation = json.has("parent") ? new ResourceLocation(JsonUtils.getString(json, "parent")) : null;
|
|
DisplayInfo displayinfo = json.has("display") ? DisplayInfo.deserialize(JsonUtils.getJsonObject(json, "display"), context) : null;
|
|
@@ -303,11 +304,11 @@
|
|
}
|
|
}
|
|
|
|
- return new Advancement.Builder(resourcelocation, displayinfo, advancementrewards, map, astring);
|
|
+ return new Builder(resourcelocation, displayinfo, advancementrewards, map, astring);
|
|
}
|
|
}
|
|
|
|
- public static Advancement.Builder readFrom(PacketBuffer buf) throws IOException
|
|
+ public static Builder readFrom(PacketBuffer buf) throws IOException
|
|
{
|
|
ResourceLocation resourcelocation = buf.readBoolean() ? buf.readResourceLocation() : null;
|
|
DisplayInfo displayinfo = buf.readBoolean() ? DisplayInfo.read(buf) : null;
|
|
@@ -324,7 +325,7 @@
|
|
}
|
|
}
|
|
|
|
- return new Advancement.Builder(resourcelocation, displayinfo, AdvancementRewards.EMPTY, map, astring);
|
|
+ return new Builder(resourcelocation, displayinfo, AdvancementRewards.EMPTY, map, astring);
|
|
}
|
|
}
|
|
}
|