diff --git a/common/src/main/java/io/github/gregtechintergalactical/gtcore/blockentity/BlockEntityRedstoneWire.java b/common/src/main/java/io/github/gregtechintergalactical/gtcore/blockentity/BlockEntityRedstoneWire.java index df66a25..c3f913f 100644 --- a/common/src/main/java/io/github/gregtechintergalactical/gtcore/blockentity/BlockEntityRedstoneWire.java +++ b/common/src/main/java/io/github/gregtechintergalactical/gtcore/blockentity/BlockEntityRedstoneWire.java @@ -2,6 +2,7 @@ import io.github.gregtechintergalactical.gtcore.block.BlockRedstoneWire; import io.github.gregtechintergalactical.gtcore.block.RedstoneWire; +import io.github.gregtechintergalactical.gtcore.cover.CoverRedstoneTorch; import muramasa.antimatter.Antimatter; import muramasa.antimatter.AntimatterAPI; import muramasa.antimatter.blockentity.pipe.BlockEntityPipe; @@ -43,7 +44,8 @@ public boolean validate(Direction dir) { public CoverFactory[] getValidCovers() { return AntimatterAPI.all(CoverFactory.class).stream().filter(t -> { try { - return !t.get().get(ICoverHandler.empty(this), t.getValidTier(), Direction.SOUTH, t).isNode(); + ICover cover = t.get().get(ICoverHandler.empty(this), t.getValidTier(), Direction.SOUTH, t); + return !cover.isNode() || cover instanceof CoverRedstoneTorch; } catch (Exception ex) { return false; } @@ -223,6 +225,9 @@ public void load(CompoundTag tag) { mMode = tag.getByte("mMode"); mReceived = tag.getByte("mReceived"); mConnectedToNonWire = tag.getBoolean("mConnectedToNonWire"); + if (this.getLevel() != null && this.isClientSide()){ + sidedSync(true); + } } @Override diff --git a/common/src/main/java/io/github/gregtechintergalactical/gtcore/cover/CoverRedstoneTorch.java b/common/src/main/java/io/github/gregtechintergalactical/gtcore/cover/CoverRedstoneTorch.java index b5f3cd6..8d12f0d 100644 --- a/common/src/main/java/io/github/gregtechintergalactical/gtcore/cover/CoverRedstoneTorch.java +++ b/common/src/main/java/io/github/gregtechintergalactical/gtcore/cover/CoverRedstoneTorch.java @@ -1,5 +1,6 @@ package io.github.gregtechintergalactical.gtcore.cover; +import io.github.gregtechintergalactical.gtcore.GTCore; import io.github.gregtechintergalactical.gtcore.blockentity.BlockEntityRedstoneWire; import muramasa.antimatter.capability.ICoverHandler; import muramasa.antimatter.cover.BaseCover; @@ -7,6 +8,7 @@ import muramasa.antimatter.machine.Tier; import muramasa.antimatter.texture.Texture; import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -50,4 +52,9 @@ public void setTextures(BiConsumer texer) { BlockEntityRedstoneWire wire = (BlockEntityRedstoneWire) source().getTile(); texer.accept("overlay", factory.getTextures().get(wire.getRedstoneValue() > 0 ? 0 : 1)); } + + @Override + public ResourceLocation getModel(String type, Direction dir) { + return new ResourceLocation(GTCore.ID + ":block/cover/" + this.getRenderId()); + } } diff --git a/common/src/main/resources/assets/gtcore/models/block/cover/redstone_torch.json b/common/src/main/resources/assets/gtcore/models/block/cover/redstone_torch.json index a19b836..b918e88 100644 --- a/common/src/main/resources/assets/gtcore/models/block/cover/redstone_torch.json +++ b/common/src/main/resources/assets/gtcore/models/block/cover/redstone_torch.json @@ -5,17 +5,17 @@ "from": [7, 7, 16], "to": [9, 9, 16], "faces": { - "south": {"uv": [7, 7, 9, 9], "texture": "#overlay"} + "south": {"uv": [7, 6, 9, 8], "texture": "#overlay"} } }, { - "from": [7, 7, 10], + "from": [7, 7, 9], "to": [9, 9, 16], "faces": { - "east": {"uv": [7, 7, 9, 13], "texture": "#overlay"}, - "west": {"uv": [7, 7, 9, 13], "texture": "#overlay"}, - "up": {"uv": [7, 7, 9, 13], "texture": "#overlay"}, - "down": {"uv": [7, 7, 9, 13], "texture": "#overlay"} + "east": {"uv": [7, 6, 9, 13], "rotation": 270, "texture": "#overlay"}, + "west": {"uv": [7, 6, 9, 13], "rotation": 90, "texture": "#overlay"}, + "up": {"uv": [7, 6, 9, 13], "rotation": 180, "texture": "#overlay"}, + "down": {"uv": [7, 6, 9, 13], "texture": "#overlay"} } } ]