Skip to content

Commit

Permalink
Fix broken lighting on items
Browse files Browse the repository at this point in the history
Signed-off-by: TheSilkMiner <thesilkminer@outlook.com>
  • Loading branch information
TheSilkMiner committed Jul 22, 2022
1 parent 24a4dc2 commit efa0a29
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private ItemModel(final ResourceLocation parent) {
this.textures = new HashMap<>();
this.elements = new ArrayList<>();
this.overrides = new ArrayList<>();
this.light = GuiLight.SIDE;
this.light = null;
}

public static ItemModel of(final ResourceLocation parent) {
Expand Down Expand Up @@ -357,7 +357,9 @@ private byte[] serialize() {
this.textures.forEach((name, id) -> textures.addProperty(name, id.toString()));
object.add("textures", textures);
}
object.addProperty("gui_light", this.light.toString());
if (this.light != null) { // Turns out defaults are not really defaults
object.addProperty("gui_light", this.light.toString());
}
if (!this.elements.isEmpty()) {
final JsonArray elements = new JsonArray();
this.elements.forEach(element -> elements.add(element.serialize(this::serializeVector, this::serializeVector)));
Expand Down

0 comments on commit efa0a29

Please sign in to comment.