From b94ae1d1ed3c246fa6de1c3bc12d90e75adc08a8 Mon Sep 17 00:00:00 2001 From: Marcel Konrad Date: Wed, 1 Jul 2020 23:21:26 +0200 Subject: [PATCH] Set block resource location node when setting block state; fixes note editor --- .../worldhandler/builder/impl/BuilderSetBlock.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/exopandora/worldhandler/builder/impl/BuilderSetBlock.java b/src/main/java/exopandora/worldhandler/builder/impl/BuilderSetBlock.java index 35b305e..383f8b3 100644 --- a/src/main/java/exopandora/worldhandler/builder/impl/BuilderSetBlock.java +++ b/src/main/java/exopandora/worldhandler/builder/impl/BuilderSetBlock.java @@ -42,12 +42,13 @@ public class BuilderSetBlock extends BuilderBlockPos public > void setState(IProperty property, T value) { this.blockResourceLocation.setProperty(property, value); + this.setBlock(this.blockResourceLocation); } public void setBlock(ResourceLocation block) { this.blockResourceLocation.setResourceLocation(block); - this.setNode(3, this.blockResourceLocation); + this.setBlock(this.blockResourceLocation); } public void setMode(EnumMode mode) @@ -58,6 +59,11 @@ public class BuilderSetBlock extends BuilderBlockPos public void setBlockNBT(CompoundNBT nbt) { this.blockResourceLocation.setNBT(nbt); + this.setBlock(this.blockResourceLocation); + } + + protected void setBlock(BlockResourceLocation block) + { this.setNode(3, this.blockResourceLocation); }