use of net.silentchaos512.gear.gear.material.LazyMaterialInstance in project Silent-Gear by SilentChaos512.
the class LazyMaterialInstance method read.
public static LazyMaterialInstance read(FriendlyByteBuf buffer) {
ResourceLocation id = buffer.readResourceLocation();
MaterialGrade grade = buffer.readEnum(MaterialGrade.class);
return new LazyMaterialInstance(id, grade);
}
use of net.silentchaos512.gear.gear.material.LazyMaterialInstance in project Silent-Gear by SilentChaos512.
the class LazyMaterialInstance method deserialize.
public static LazyMaterialInstance deserialize(JsonObject json) {
ResourceLocation id = new ResourceLocation(GsonHelper.getAsString(json, "material"));
MaterialGrade grade = EnumUtils.byName(GsonHelper.getAsString(json, "grade", "NONE"), MaterialGrade.NONE);
return new LazyMaterialInstance(id, grade);
}
Aggregations