Don't mutate an immutable map

Changes to be committed:
	modified:   src/main/java/org/dimdev/dimdoors/client/EntranceRiftBlockEntityRenderer.java
	modified:   src/main/java/org/dimdev/dimdoors/world/limbo/LimboDecay.java
This commit is contained in:
SD 2020-10-04 12:21:19 +05:30
parent dbc1104db7
commit 54c0ddbba5
No known key found for this signature in database
GPG key ID: E36B57EE08544BC5
2 changed files with 6 additions and 6 deletions

View file

@ -133,17 +133,17 @@ public class EntranceRiftBlockEntityRenderer extends BlockEntityRenderer<Entranc
}
} else {
// South
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, r, g, b);
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F + 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, r, g, b);
// North
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, r, g, b);
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F + 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, r, g, b);
// East
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F + 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
// West
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
// Down
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, r, g, b);
// Up
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, r, g, b);
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F + 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, r, g, b);
}
}

View file

@ -127,7 +127,7 @@ public final class LimboDecay {
configObject = GSON.fromJson(reader, JsonObject.class);
Map<Block, Block> blocks = CODEC.decode(JsonOps.INSTANCE, configObject).getOrThrow(false, STDERR).getFirst();
DECAY_SEQUENCE.clear();
DEFAULT_VALUES.putAll(blocks);
DECAY_SEQUENCE.putAll(blocks);
}
}
} catch (IOException e) {