From a5edd40746a3e9d1241b4a9fa41f08388836b876 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 25 Apr 2024 21:27:45 +0200 Subject: [PATCH 01/26] feat: add simple block animator --- .../troblecodings/signals/blocks/Signal.java | 33 +++++++++++++++++++ .../signals/core/RenderAnimationInfo.java | 32 ++++++++++++++++++ .../tileentitys/SignalSpecialRenderer.java | 11 +++++-- .../signals/tileentitys/SignalTileEntity.java | 12 +++++-- 4 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/troblecodings/signals/core/RenderAnimationInfo.java diff --git a/src/main/java/com/troblecodings/signals/blocks/Signal.java b/src/main/java/com/troblecodings/signals/blocks/Signal.java index a0e5cf7f9..1473152f8 100644 --- a/src/main/java/com/troblecodings/signals/blocks/Signal.java +++ b/src/main/java/com/troblecodings/signals/blocks/Signal.java @@ -15,6 +15,7 @@ import com.troblecodings.signals.config.ConfigHandler; import com.troblecodings.signals.core.DestroyHelper; import com.troblecodings.signals.core.JsonEnum; +import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; import com.troblecodings.signals.core.SignalAngel; import com.troblecodings.signals.core.SignalProperties; @@ -48,6 +49,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -78,6 +80,8 @@ public class Signal extends BasicBlock { private List signalProperties; private final Map signalPropertiesToInt = new HashMap<>(); + private float animationProgress = 0.0f; + public Signal(final SignalProperties prop) { super(Properties.of(Material.STONE).noOcclusion() .lightLevel(u -> ConfigHandler.GENERAL.lightEmission.get()) @@ -453,4 +457,33 @@ public void tick(final BlockState state, final ServerLevel world, final BlockPos public Optional getSupplierWrapper() { return Optional.of(SUPPLIER); } + + public boolean hasAnimation() { + return true; + } + + private float getAnimationProgress() { + return this.animationProgress; + } + + private void setAnimationProgress(final float animationProgress) { + this.animationProgress = animationProgress + 0.005f; + } + + @SuppressWarnings("deprecation") + public void renderAnimation(final RenderAnimationInfo info) { + info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern + info.stack.translate(0.5f, 1, 0.5f); // Block verschieben + + info.stack.mulPose(Quaternion.fromXYZ(0, getAnimationProgress(), 0)); + setAnimationProgress(getAnimationProgress()); // Progress aktualisieren + + info.stack.translate(-0.5f, 0, -0.5f); // Pivot Punkt verschieben + + info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), info.stack, info.source, + info.lightColor, info.overlayTexture); // Block rendern + // Minecraft.getInstance().getModelManager().getBlockModelShaper() + // .getBlockModel(tile.getBlockState()); + info.stack.popPose(); + } } diff --git a/src/main/java/com/troblecodings/signals/core/RenderAnimationInfo.java b/src/main/java/com/troblecodings/signals/core/RenderAnimationInfo.java new file mode 100644 index 000000000..ada4bd81f --- /dev/null +++ b/src/main/java/com/troblecodings/signals/core/RenderAnimationInfo.java @@ -0,0 +1,32 @@ +package com.troblecodings.signals.core; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.troblecodings.signals.tileentitys.SignalTileEntity; + +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.block.BlockRenderDispatcher; + +public class RenderAnimationInfo { + + public final PoseStack stack; + public SignalTileEntity tileEntity; + public final BlockRenderDispatcher dispatcher; + public final MultiBufferSource source; + public final int lightColor; + public final int overlayTexture; + + public RenderAnimationInfo(final PoseStack stack, final BlockRenderDispatcher dispatcher, + final MultiBufferSource source, final int lightColor, final int overlayTexture) { + this.stack = stack; + this.dispatcher = dispatcher; + this.source = source; + this.lightColor = lightColor; + this.overlayTexture = overlayTexture; + } + + public RenderAnimationInfo with(final SignalTileEntity tileEntity) { + this.tileEntity = tileEntity; + return this; + } + +} diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java index b4939e15a..e418c33bd 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java @@ -1,6 +1,7 @@ package com.troblecodings.signals.tileentitys; import com.mojang.blaze3d.vertex.PoseStack; +import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; import net.minecraft.client.renderer.MultiBufferSource; @@ -18,8 +19,12 @@ public SignalSpecialRenderer(final BlockEntityRendererProvider.Context context) @Override public void render(final SignalTileEntity tile, final float tick, final PoseStack stack, final MultiBufferSource source, final int rand1, final int rand2) { - if (!tile.hasCustomName()) - return; - tile.renderOverlay(new RenderOverlayInfo(stack, 0, 0, 0, context.getFont())); + if (tile.hasCustomName()) { + tile.renderOverlay(new RenderOverlayInfo(stack, 0, 0, 0, context.getFont())); + } + if (tile.getSignal().hasAnimation()) { + tile.renderAnimation(new RenderAnimationInfo(stack, context.getBlockRenderDispatcher(), + source, rand1, rand2)); + } } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java index c96605fa8..cab5ce95d 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java @@ -10,6 +10,7 @@ import com.troblecodings.guilib.ecs.interfaces.ISyncable; import com.troblecodings.signals.SEProperty; import com.troblecodings.signals.blocks.Signal; +import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; import com.troblecodings.signals.core.SignalStateListener; import com.troblecodings.signals.core.StateInfo; @@ -64,6 +65,13 @@ public void renderOverlay(final RenderOverlayInfo info) { signal.renderOverlay(info.with(this)); } + public void renderAnimation(final RenderAnimationInfo info) { + final Signal signal = getSignal(); + if (signal == null) + return; + signal.renderAnimation(info.with(this)); + } + @Override public String getNameWrapper() { final String name = super.getNameWrapper(); @@ -84,8 +92,8 @@ public Map getProperties() { @Override public @Nonnull IModelData getModelData() { - final Map states = ClientSignalStateHandler - .getClientStates(new StateInfo(level, worldPosition)); + final Map states = + ClientSignalStateHandler.getClientStates(new StateInfo(level, worldPosition)); return new ModelInfoWrapper(states); } From 1b5e22c5d05c87b518b4a34262b0d75e432bd10d Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 2 Aug 2024 13:40:57 +0200 Subject: [PATCH 02/26] feat: add animationsystem per signal tile --- .../troblecodings/signals/blocks/Signal.java | 41 +++++-------------- .../signals/core/SignalProperties.java | 5 ++- .../signals/core/SignalPropertiesBuilder.java | 26 ++++++++++-- .../tileentitys/SignalSpecialRenderer.java | 27 ++++++++++-- .../signals/tileentitys/SignalTileEntity.java | 11 +++-- .../opensignals/signalsystems/shmech.json | 8 ++++ 6 files changed, 73 insertions(+), 45 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/blocks/Signal.java b/src/main/java/com/troblecodings/signals/blocks/Signal.java index 1473152f8..3f871374e 100644 --- a/src/main/java/com/troblecodings/signals/blocks/Signal.java +++ b/src/main/java/com/troblecodings/signals/blocks/Signal.java @@ -15,7 +15,6 @@ import com.troblecodings.signals.config.ConfigHandler; import com.troblecodings.signals.core.DestroyHelper; import com.troblecodings.signals.core.JsonEnum; -import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; import com.troblecodings.signals.core.SignalAngel; import com.troblecodings.signals.core.SignalProperties; @@ -49,7 +48,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -80,8 +78,6 @@ public class Signal extends BasicBlock { private List signalProperties; private final Map signalPropertiesToInt = new HashMap<>(); - private float animationProgress = 0.0f; - public Signal(final SignalProperties prop) { super(Properties.of(Material.STONE).noOcclusion() .lightLevel(u -> ConfigHandler.GENERAL.lightEmission.get()) @@ -458,32 +454,15 @@ public Optional getSupplierWrapper() { return Optional.of(SUPPLIER); } - public boolean hasAnimation() { - return true; - } - - private float getAnimationProgress() { - return this.animationProgress; - } - - private void setAnimationProgress(final float animationProgress) { - this.animationProgress = animationProgress + 0.005f; - } - - @SuppressWarnings("deprecation") - public void renderAnimation(final RenderAnimationInfo info) { - info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern - info.stack.translate(0.5f, 1, 0.5f); // Block verschieben - - info.stack.mulPose(Quaternion.fromXYZ(0, getAnimationProgress(), 0)); - setAnimationProgress(getAnimationProgress()); // Progress aktualisieren - - info.stack.translate(-0.5f, 0, -0.5f); // Pivot Punkt verschieben - - info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), info.stack, info.source, - info.lightColor, info.overlayTexture); // Block rendern - // Minecraft.getInstance().getModelManager().getBlockModelShaper() - // .getBlockModel(tile.getBlockState()); - info.stack.popPose(); + public boolean hasAnimation(final Level world, final BlockPos pos) { + final Map map = + ClientSignalStateHandler.getClientStates(new StateInfo(world, pos)); + boolean animation = false; + for (final PredicateProperty boolProp : this.prop.animate) { + if (boolProp.test(map)) { + animation = boolProp.state; + } + } + return animation; } } diff --git a/src/main/java/com/troblecodings/signals/core/SignalProperties.java b/src/main/java/com/troblecodings/signals/core/SignalProperties.java index 7680e459d..0988f38d2 100644 --- a/src/main/java/com/troblecodings/signals/core/SignalProperties.java +++ b/src/main/java/com/troblecodings/signals/core/SignalProperties.java @@ -28,6 +28,7 @@ public class SignalProperties { public final List redstoneOutputPacks; public final int defaultItemDamage; public final boolean isBridgeSignal; + public final List> animate; public SignalProperties(final Placementtool placementtool, final float customNameRenderHeight, final int height, final List> signalHeights, @@ -36,7 +37,8 @@ public SignalProperties(final Placementtool placementtool, final float customNam final int textColor, final boolean canLink, final List colors, final List> renderheights, final List sounds, final List redstoneOutputs, final int defaultItemDamage, - final List redstoneOutputPacks, final boolean isBridgeSignal) { + final List redstoneOutputPacks, final boolean isBridgeSignal, + final List> animate) { this.placementtool = placementtool; this.customNameRenderHeight = customNameRenderHeight; this.defaultHeight = height; @@ -56,5 +58,6 @@ public SignalProperties(final Placementtool placementtool, final float customNam this.defaultItemDamage = defaultItemDamage; this.redstoneOutputPacks = redstoneOutputPacks; this.isBridgeSignal = isBridgeSignal; + this.animate = animate; } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java b/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java index 96c8cc5a2..8839c9036 100644 --- a/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java +++ b/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java @@ -44,6 +44,7 @@ public class SignalPropertiesBuilder { private Map remoteRedstoneOutputs; private int defaultItemDamage = 1; private boolean isBridgeSignal = false; + private Map animate; public SignalProperties build(final FunctionParsingInfo info) { if (placementToolName != null) { @@ -55,10 +56,11 @@ public SignalProperties build(final FunctionParsingInfo info) { } } } - if (placementtool == null) + if (placementtool == null) { OpenSignalsMain.exitMinecraftWithMessage( "There doesn't exists a placementtool with the name '" + placementToolName + "'! Valid Placementtools: " + OSItems.placementtools); + } final List> signalheights = new ArrayList<>(); if (signalHeights != null) { @@ -120,8 +122,8 @@ public SignalProperties build(final FunctionParsingInfo info) { .forEach((entry) -> { if (entry.getKey() != null) { entry.getKey().forEach((key, value) -> { - final Predicate> predicate = LogicParser - .predicate(key, info); + final Predicate> predicate = + LogicParser.predicate(key, info); final SEProperty property = (SEProperty) info.getProperty(value); entry.getValue().add(new ValuePack(property, predicate)); }); @@ -142,6 +144,21 @@ public SignalProperties build(final FunctionParsingInfo info) { } }); } + + final List> animation = new ArrayList<>(); + if (animate != null) { + animate.forEach((property, bool) -> { + try { + animation.add(new PredicateProperty( + LogicParser.predicate(property, info), bool)); + } catch (final LogicalParserException e) { + OpenSignalsMain.getLogger() + .error("Something went wrong during the registry of a predicate in " + + info.signalName + "!\nWith statement:" + property); + e.printStackTrace(); + } + }); + } this.colors = this.colors == null ? new ArrayList<>() : this.colors; return new SignalProperties(placementtool, customNameRenderHeight, defaultHeight, @@ -149,6 +166,7 @@ public SignalProperties build(final FunctionParsingInfo info) { autoscale, ImmutableList.copyOf(doubleText), textColor, canLink, colors, ImmutableList.copyOf(renderheights), ImmutableList.copyOf(soundProperties), ImmutableList.copyOf(redstoneValuePacks), defaultItemDamage, - ImmutableList.copyOf(remoteRedstoneValuePacks), isBridgeSignal); + ImmutableList.copyOf(remoteRedstoneValuePacks), isBridgeSignal, + ImmutableList.copyOf(animation)); } } diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java index e418c33bd..a1b203681 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java @@ -1,12 +1,14 @@ package com.troblecodings.signals.tileentitys; import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Quaternion; import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.world.level.block.Blocks; public class SignalSpecialRenderer implements BlockEntityRenderer { @@ -22,9 +24,28 @@ public void render(final SignalTileEntity tile, final float tick, final PoseStac if (tile.hasCustomName()) { tile.renderOverlay(new RenderOverlayInfo(stack, 0, 0, 0, context.getFont())); } - if (tile.getSignal().hasAnimation()) { - tile.renderAnimation(new RenderAnimationInfo(stack, context.getBlockRenderDispatcher(), - source, rand1, rand2)); + if (tile.getSignal().hasAnimation(tile.getLevel(), tile.getBlockPos())) { + renderAnimation(new RenderAnimationInfo(stack, context.getBlockRenderDispatcher(), + source, rand1, rand2), tile); + } else if (!tile.getSignal().hasAnimation(tile.getLevel(), tile.getBlockPos())) { + tile.animProgress = 0.0F; } } + + @SuppressWarnings("deprecation") + public void renderAnimation(final RenderAnimationInfo info, final SignalTileEntity tile) { + info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern + info.stack.translate(0.5f, 1, 0.5f); // Block verschieben + + info.stack.mulPose(Quaternion.fromXYZ(0, tile.animProgress * 0.005f, 0)); + tile.updateAnim(); // Progress aktualisieren + + info.stack.translate(-0.5f, 0, -0.5f); // Pivot Punkt verschieben + + info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), info.stack, info.source, + info.lightColor, info.overlayTexture); // Block rendern + // Minecraft.getInstance().getModelManager().getBlockModelShaper() + // .getBlockModel(tile.getBlockState()); + info.stack.popPose(); + } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java index cab5ce95d..f8fc7587e 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java @@ -10,7 +10,6 @@ import com.troblecodings.guilib.ecs.interfaces.ISyncable; import com.troblecodings.signals.SEProperty; import com.troblecodings.signals.blocks.Signal; -import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; import com.troblecodings.signals.core.SignalStateListener; import com.troblecodings.signals.core.StateInfo; @@ -26,8 +25,11 @@ public class SignalTileEntity extends SyncableTileEntity implements NamableWrapper, ISyncable { + public float animProgress; + public SignalTileEntity(final TileEntityInfo info) { super(info); + animProgress = 0.0F; } private final Map properties = new HashMap<>(); @@ -65,11 +67,8 @@ public void renderOverlay(final RenderOverlayInfo info) { signal.renderOverlay(info.with(this)); } - public void renderAnimation(final RenderAnimationInfo info) { - final Signal signal = getSignal(); - if (signal == null) - return; - signal.renderAnimation(info.with(this)); + public void updateAnim() { + ++animProgress; } @Override diff --git a/src/main/resources/assets/opensignals/signalsystems/shmech.json b/src/main/resources/assets/opensignals/signalsystems/shmech.json index 2cc15f1ee..3cbc27c49 100644 --- a/src/main/resources/assets/opensignals/signalsystems/shmech.json +++ b/src/main/resources/assets/opensignals/signalsystems/shmech.json @@ -12,6 +12,9 @@ }, "signalHeights": { "config(SH_HIGH.TRUE)": 2 + }, + "animate": { + "config(ANIMATE.TRUE)": true } }, "seProperties": [ @@ -26,6 +29,11 @@ "name": "sh_high", "defaultState": false, "changeableStage": "GUISTAGE" + }, + { + "name": "animate", + "defaultState": false, + "changeableStage": "APISTAGE_NONE_CONFIG" } ] } \ No newline at end of file From cb571e4aeba594c3180fbaeecd4163083fc8ae49 Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 23 Sep 2024 00:31:59 +0200 Subject: [PATCH 03/26] ref: first thing for animatino --- .../troblecodings/signals/blocks/Signal.java | 2 +- .../signals/models/SignalCustomModel.java | 9 +++++ .../tileentitys/SignalSpecialRenderer.java | 35 +++++++++++++------ 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/blocks/Signal.java b/src/main/java/com/troblecodings/signals/blocks/Signal.java index 3f871374e..cb2122beb 100644 --- a/src/main/java/com/troblecodings/signals/blocks/Signal.java +++ b/src/main/java/com/troblecodings/signals/blocks/Signal.java @@ -463,6 +463,6 @@ public boolean hasAnimation(final Level world, final BlockPos pos) { animation = boolProp.state; } } - return animation; + return true; } } diff --git a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java index d90585066..52529e70a 100644 --- a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java +++ b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java @@ -25,6 +25,7 @@ import com.troblecodings.signals.OpenSignalsMain; import com.troblecodings.signals.core.SignalAngel; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -45,6 +46,8 @@ @OnlyIn(Dist.CLIENT) public class SignalCustomModel implements UnbakedModel { + private static final Map locationToModel = new HashMap<>(); + @Nonnull public static final Random RANDOM = new Random(); @@ -110,6 +113,7 @@ private static BakedModelPair transform(final SignalModelLoaderInfo info, model.getQuads(null, direction, RANDOM, EmptyModelData.INSTANCE) .forEach(quad -> transform(quad, matrix)); } + locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), model); return new BakedModelPair(info.state, model); } @@ -153,4 +157,9 @@ public BakedModel bake(final ModelBakery bakery, materialsFromString, quaternion)) .collect(Collectors.toUnmodifiableList())); } + + public static BakedModel getModelFromLocation(final ResourceLocation location) { + return locationToModel.getOrDefault(location, + Minecraft.getInstance().getModelManager().getMissingModel()); + } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java index a1b203681..eca73f7ac 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java @@ -2,13 +2,18 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Quaternion; +import com.troblecodings.signals.OpenSignalsMain; import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; +import com.troblecodings.signals.models.SignalCustomModel; +import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.world.level.block.Blocks; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; public class SignalSpecialRenderer implements BlockEntityRenderer { @@ -26,26 +31,36 @@ public void render(final SignalTileEntity tile, final float tick, final PoseStac } if (tile.getSignal().hasAnimation(tile.getLevel(), tile.getBlockPos())) { renderAnimation(new RenderAnimationInfo(stack, context.getBlockRenderDispatcher(), - source, rand1, rand2), tile); + source, rand1, rand2).with(tile), tile); } else if (!tile.getSignal().hasAnimation(tile.getLevel(), tile.getBlockPos())) { tile.animProgress = 0.0F; } } - @SuppressWarnings("deprecation") + // @SuppressWarnings("deprecation") public void renderAnimation(final RenderAnimationInfo info, final SignalTileEntity tile) { info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern - info.stack.translate(0.5f, 1, 0.5f); // Block verschieben + info.stack.translate(1, 1, 0.5f); // Block verschieben - info.stack.mulPose(Quaternion.fromXYZ(0, tile.animProgress * 0.005f, 0)); + info.stack.mulPose( + Quaternion.fromXYZ(0, 0, tile.animProgress * 0.005f)); tile.updateAnim(); // Progress aktualisieren - info.stack.translate(-0.5f, 0, -0.5f); // Pivot Punkt verschieben + info.stack.translate(-1, 0, -0.5f); // Pivot Punkt verschieben - info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), info.stack, info.source, - info.lightColor, info.overlayTexture); // Block rendern - // Minecraft.getInstance().getModelManager().getBlockModelShaper() - // .getBlockModel(tile.getBlockState()); + // info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), + // info.stack, info.source, + // info.lightColor, info.overlayTexture); // Block rendern + final BakedModel model = SignalCustomModel.getModelFromLocation( + new ResourceLocation(OpenSignalsMain.MODID, "semaphore_signals/sema_main_wing1")); + final BlockState state = tile.getBlockState(); + info.dispatcher.getModelRenderer().renderModel(info.stack.last(), + info.source + .getBuffer(ItemBlockRenderTypes.getRenderType(tile.getBlockState(), false)), + state, model, 0, 0, 0, info.lightColor, info.overlayTexture, tile.getModelData()); info.stack.popPose(); + + if (tile.animProgress > 100) + tile.animProgress = 0; } } \ No newline at end of file From 9d986d0e323edac5b5efe59001416d3c3211b984 Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 23 Sep 2024 01:26:42 +0200 Subject: [PATCH 04/26] ref: applied to signal angel --- .../signals/models/SignalCustomModel.java | 8 +++---- .../tileentitys/SignalSpecialRenderer.java | 22 +++++++++++++------ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java index 52529e70a..a91e232b1 100644 --- a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java +++ b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java @@ -84,9 +84,8 @@ private static void transform(final BakedQuad quad, final Matrix4f quaterion) { } } - private static BakedModelPair transform(final SignalModelLoaderInfo info, - final ModelBakery bakery, final ResourceLocation location, - final Function function, + private BakedModelPair transform(final SignalModelLoaderInfo info, final ModelBakery bakery, + final ResourceLocation location, final Function function, final Map> material, final Quaternion rotation) { final Transformation transformation = new Transformation( new Vector3f(info.x, info.y, info.z), null, null, null); @@ -113,7 +112,8 @@ private static BakedModelPair transform(final SignalModelLoaderInfo info, model.getQuads(null, direction, RANDOM, EmptyModelData.INSTANCE) .forEach(quad -> transform(quad, matrix)); } - locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), model); + if (angel.equals(SignalAngel.ANGEL0)) + locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), model); return new BakedModelPair(info.state, model); } diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java index eca73f7ac..17afe4fce 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java @@ -3,8 +3,10 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Quaternion; import com.troblecodings.signals.OpenSignalsMain; +import com.troblecodings.signals.blocks.Signal; import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.RenderOverlayInfo; +import com.troblecodings.signals.core.SignalAngel; import com.troblecodings.signals.models.SignalCustomModel; import net.minecraft.client.renderer.ItemBlockRenderTypes; @@ -39,28 +41,34 @@ public void render(final SignalTileEntity tile, final float tick, final PoseStac // @SuppressWarnings("deprecation") public void renderAnimation(final RenderAnimationInfo info, final SignalTileEntity tile) { + + final BlockState state = tile.getBlockState(); + final SignalAngel angel = state.getValue(Signal.ANGEL); + info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern - info.stack.translate(1, 1, 0.5f); // Block verschieben - info.stack.mulPose( - Quaternion.fromXYZ(0, 0, tile.animProgress * 0.005f)); + info.stack.translate(0.5f, 0, 0.5f); + info.stack.mulPose(angel.getQuaternion()); + + info.stack.translate(0.5f, 7.5f, -0.5f); // Block verschieben + info.stack.mulPose(Quaternion.fromXYZ(0, 0, -tile.animProgress * 0.005f)); tile.updateAnim(); // Progress aktualisieren - info.stack.translate(-1, 0, -0.5f); // Pivot Punkt verschieben + info.stack.translate(-1, -4.5f, 0); // Pivot Punkt verschieben // info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), // info.stack, info.source, - // info.lightColor, info.overlayTexture); // Block rendern + // info.lightColor, info.overlayTexture); // Block render final BakedModel model = SignalCustomModel.getModelFromLocation( new ResourceLocation(OpenSignalsMain.MODID, "semaphore_signals/sema_main_wing1")); - final BlockState state = tile.getBlockState(); info.dispatcher.getModelRenderer().renderModel(info.stack.last(), info.source .getBuffer(ItemBlockRenderTypes.getRenderType(tile.getBlockState(), false)), state, model, 0, 0, 0, info.lightColor, info.overlayTexture, tile.getModelData()); + info.stack.popPose(); - if (tile.animProgress > 100) + if (tile.animProgress > 180) tile.animProgress = 0; } } \ No newline at end of file From ee0be63a313125b144f1e98d39ef8d96b276ccb6 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 23 Sep 2024 01:42:48 +0200 Subject: [PATCH 05/26] ref: update test animation --- .../signals/tileentitys/SignalSpecialRenderer.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java index 17afe4fce..4a78473c3 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java @@ -43,18 +43,19 @@ public void render(final SignalTileEntity tile, final float tick, final PoseStac public void renderAnimation(final RenderAnimationInfo info, final SignalTileEntity tile) { final BlockState state = tile.getBlockState(); - final SignalAngel angel = state.getValue(Signal.ANGEL); + final SignalAngel angle = state.getValue(Signal.ANGEL); info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern - info.stack.translate(0.5f, 0, 0.5f); - info.stack.mulPose(angel.getQuaternion()); + info.stack.translate(0.5f, 0.5f, 0.5f); + + info.stack.mulPose(angle.getQuaternion()); + info.stack.translate(0.15f, 7f, -0.5f); // Block verschieben - info.stack.translate(0.5f, 7.5f, -0.5f); // Block verschieben info.stack.mulPose(Quaternion.fromXYZ(0, 0, -tile.animProgress * 0.005f)); tile.updateAnim(); // Progress aktualisieren - info.stack.translate(-1, -4.5f, 0); // Pivot Punkt verschieben + info.stack.translate(-0.7f, -4.5f, 0f); // Pivot Punkt verschieben // info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(), // info.stack, info.source, @@ -68,7 +69,8 @@ public void renderAnimation(final RenderAnimationInfo info, final SignalTileEnti info.stack.popPose(); - if (tile.animProgress > 180) + if (tile.animProgress > 158) { tile.animProgress = 0; + } } } \ No newline at end of file From 779947bdea0242d9b6a99ec26c559510577539da Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 23 Sep 2024 21:52:06 +0200 Subject: [PATCH 06/26] feat: added basic animation system --- guilib | 2 +- .../signals/animation/AnimationMode.java | 21 +++ .../signals/animation/ModelTranslation.java | 65 +++++++++ .../signals/animation/RotationAxis.java | 21 +++ .../animation/SignalAnimationHandler.java | 129 +++++++++++++++++ .../animation/SignalAnimationRotation.java | 131 ++++++++++++++++++ .../animation/SignalAnimationState.java | 22 +++ .../animation/SignalAnimationTranslation.java | 85 ++++++++++++ .../troblecodings/signals/blocks/Signal.java | 21 +-- .../contentpacks/SignalAnimationConfig.java | 44 ++++++ .../SignalAnimationConfigParser.java | 51 +++++++ .../signals/core/SignalProperties.java | 5 +- .../signals/core/SignalPropertiesBuilder.java | 23 +-- .../signals/guis/GuiSignalBridge.java | 2 +- .../signals/proxy/CommonProxy.java | 2 + .../signalbridge/SignalBridgeBuilder.java | 2 +- .../tileentitys/SignalSpecialRenderer.java | 13 +- .../signals/tileentitys/SignalTileEntity.java | 24 +++- .../animations/semaphoresignal.json | 44 ++++++ 19 files changed, 655 insertions(+), 52 deletions(-) create mode 100644 src/main/java/com/troblecodings/signals/animation/AnimationMode.java create mode 100644 src/main/java/com/troblecodings/signals/animation/ModelTranslation.java create mode 100644 src/main/java/com/troblecodings/signals/animation/RotationAxis.java create mode 100644 src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java create mode 100644 src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java create mode 100644 src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java create mode 100644 src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java create mode 100644 src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java create mode 100644 src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java create mode 100644 src/main/resources/assets/opensignals/animations/semaphoresignal.json diff --git a/guilib b/guilib index f1694cfb4..ad95b16b0 160000 --- a/guilib +++ b/guilib @@ -1 +1 @@ -Subproject commit f1694cfb42a248b080063132aab46fa9fde5927f +Subproject commit ad95b16b0d925c52b608c40129913ee907056fb6 diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationMode.java b/src/main/java/com/troblecodings/signals/animation/AnimationMode.java new file mode 100644 index 000000000..79b82fcc7 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/AnimationMode.java @@ -0,0 +1,21 @@ +package com.troblecodings.signals.animation; + +import java.util.Arrays; + +public enum AnimationMode { + + ROTATION("ROTATION"), TRANSLATION("TRANSLATION"); + + private String mode; + + private AnimationMode(final String mode) { + this.mode = mode; + } + + public static AnimationMode of(final String mode) { + return Arrays.stream(values()) + .filter(animationMode -> animationMode.mode.equalsIgnoreCase(mode)).findFirst() + .orElse(null); + } + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java new file mode 100644 index 000000000..052492f32 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -0,0 +1,65 @@ +package com.troblecodings.signals.animation; + +import com.mojang.math.Quaternion; +import com.troblecodings.core.VectorWrapper; +import com.troblecodings.signals.core.RenderAnimationInfo; + +public class ModelTranslation { + + private VectorWrapper firstTranslation; + private Quaternion quaternion = new Quaternion(0, 0, 0, 0); + private VectorWrapper lastTranslation; + private SignalAnimationState animation; + private boolean renderModel = false; + + public ModelTranslation(final VectorWrapper firstTranslation, final Quaternion quaternion, + final VectorWrapper lastTranslation) { + this.firstTranslation = firstTranslation; + this.quaternion = quaternion; + this.lastTranslation = lastTranslation; + } + + public void translate(final RenderAnimationInfo info) { + info.stack.translate(firstTranslation.getX(), firstTranslation.getY(), + firstTranslation.getZ()); + info.stack.mulPose(quaternion); + info.stack.translate(lastTranslation.getX(), lastTranslation.getY(), + lastTranslation.getZ()); + } + + public Quaternion getQuaternion() { + return quaternion; + } + + public boolean shouldRenderModel() { + return renderModel; + } + + public ModelTranslation setRenderModel(final boolean renderModel) { + this.renderModel = renderModel; + return this; + } + + public void setUpNewTranslation(final ModelTranslation other) { + this.firstTranslation = other.firstTranslation; + this.quaternion = other.quaternion; + this.lastTranslation = other.lastTranslation; + } + + public void assignAnimation(final SignalAnimationState animation) { + this.animation = animation; + } + + public void removeAnimation() { + this.animation = null; + } + + public boolean isAnimationAssigned() { + return animation != null; + } + + public SignalAnimationState getAssigendAnimation() { + return animation; + } + +} diff --git a/src/main/java/com/troblecodings/signals/animation/RotationAxis.java b/src/main/java/com/troblecodings/signals/animation/RotationAxis.java new file mode 100644 index 000000000..e3fdcdd53 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/RotationAxis.java @@ -0,0 +1,21 @@ +package com.troblecodings.signals.animation; + +import java.util.Arrays; + +public enum RotationAxis { + + X("X"), Y("Y"), Z("Z"); + + private final String axis; + + private RotationAxis(final String axis) { + this.axis = axis; + } + + public static RotationAxis of(final String axis) { + return Arrays.stream(values()) + .filter(rotationAxis -> rotationAxis.axis.equalsIgnoreCase(axis)).findFirst() + .orElse(null); + } + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java new file mode 100644 index 000000000..c7e787c5d --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -0,0 +1,129 @@ +package com.troblecodings.signals.animation; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import com.google.common.collect.Maps; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Quaternion; +import com.troblecodings.core.VectorWrapper; +import com.troblecodings.signals.OpenSignalsMain; +import com.troblecodings.signals.SEProperty; +import com.troblecodings.signals.blocks.Signal; +import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; +import com.troblecodings.signals.core.RenderAnimationInfo; +import com.troblecodings.signals.core.SignalAngel; +import com.troblecodings.signals.models.SignalCustomModel; +import com.troblecodings.signals.tileentitys.SignalTileEntity; + +import net.minecraft.client.renderer.ItemBlockRenderTypes; +import net.minecraft.client.renderer.block.ModelBlockRenderer; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.client.model.data.IModelData; + +public class SignalAnimationHandler { + + private final SignalTileEntity tile; + + public SignalAnimationHandler(final SignalTileEntity tile) { + this.tile = tile; + } + + private final Map>>// + animationPerModel = new HashMap<>(); + + public void render(final RenderAnimationInfo info) { + final BlockState state = tile.getBlockState(); + final SignalAngel angle = state.getValue(Signal.ANGEL); + final ModelBlockRenderer renderer = info.dispatcher.getModelRenderer(); + final VertexConsumer vertex = info.source + .getBuffer(ItemBlockRenderTypes.getRenderType(state, false)); + final IModelData data = tile.getModelData(); + + animationPerModel.forEach((model, entry) -> { + final ModelTranslation translation = entry.getKey(); + if (!translation.shouldRenderModel()) + return; + + info.stack.pushPose(); + info.stack.translate(0.5f, 0.5f, 0.5f); + info.stack.mulPose(angle.getQuaternion()); + translation.translate(info); + renderer.renderModel(info.stack.last(), vertex, state, model, 0, 0, 0, info.lightColor, + info.overlayTexture, data); + info.stack.popPose(); + + if (translation.isAnimationAssigned()) + updateAnimation(translation); + }); + } + + private void updateAnimation(final ModelTranslation translation) { + final SignalAnimationState animation = translation.getAssigendAnimation(); + if (animation.isFinished()) { + translation.setUpNewTranslation(animation.getFinalModelTranslation()); + translation.removeAnimation(); + return; + } + animation.updateAnimation(); + translation.setUpNewTranslation(animation.getModelTranslation()); + } + + public void updateStates(final Map newProperties, + final Map oldProperties) { + final Map changedProperties = new HashMap<>(); + newProperties.entrySet().stream().filter(entry -> { + final String oldState = oldProperties.get(entry.getKey()); + return oldState != null && !entry.getValue().equals(oldState); + }).forEach(entry -> changedProperties.put(entry.getKey(), entry.getValue())); + + if (changedProperties.isEmpty()) { + updateToFinalizedAnimations(newProperties); + } else { + updateAnimations(changedProperties); + } + } + + private void updateAnimations(final Map changedProperties) { + animationPerModel.values().forEach(entry -> { + for (final SignalAnimationState animation : entry.getValue()) { + if (animation.test(changedProperties)) { + final ModelTranslation translation = entry.getKey(); + animation.setUpAnimationValues(translation); + translation.setUpNewTranslation(animation.getModelTranslation()); + translation.assignAnimation(animation); + } + } + }); + } + + private void updateToFinalizedAnimations(final Map newProperties) { + animationPerModel.values().forEach((entry) -> { + for (final SignalAnimationState animation : entry.getValue()) { + if (animation.test(newProperties)) { + final ModelTranslation translation = entry.getKey(); + translation.setUpNewTranslation(animation.getFinalModelTranslation()); + translation.setRenderModel(true); + } + } + }); + } + + public void updateAnimationListFromBlock() { + animationPerModel.clear(); + final Map> map = SignalAnimationConfigParser.ALL_ANIMATIONS + .get(tile.getSignal()); + map.forEach((modelName, animations) -> { + final BakedModel model = SignalCustomModel + .getModelFromLocation(new ResourceLocation(OpenSignalsMain.MODID, modelName)); + final ModelTranslation translation = new ModelTranslation(VectorWrapper.ZERO, + new Quaternion(0, 0, 0, 0), VectorWrapper.ZERO); + animationPerModel.put(model, Maps.immutableEntry(translation, animations)); + }); + } + +} diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java new file mode 100644 index 000000000..4c472f047 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -0,0 +1,131 @@ +package com.troblecodings.signals.animation; + +import java.util.Map; +import java.util.Objects; +import java.util.function.Predicate; + +import com.mojang.math.Quaternion; +import com.mojang.math.Vector3f; +import com.troblecodings.core.VectorWrapper; +import com.troblecodings.signals.SEProperty; + +public class SignalAnimationRotation implements SignalAnimationState { + + private float progress = 0; + private double max = 0; + private float step = 0; + + private final Predicate> predicate; + private String model; + private final float animationSpeed; + private final RotationAxis axis; + private final float rotation; + private final VectorWrapper pivot; + + private boolean calculatePlus = true; + + public SignalAnimationRotation(final Predicate> predicate, + final float animationSpeed, final RotationAxis axis, final float rotation, + final VectorWrapper pivot) { + this.predicate = predicate; + this.animationSpeed = animationSpeed; + this.axis = axis; + this.rotation = rotation; + this.pivot = pivot; + } + + @Override + public SignalAnimationState with(final String model) { + this.model = model; + return this; + } + + @Override + public void updateAnimation() { + if (calculatePlus) + ++progress; + else + --progress; + } + + @Override + public void setUpAnimationValues(final ModelTranslation currentTranslation) { + final Vector3f vec = currentTranslation.getQuaternion().toXYZ(); + final Vector3f maxPos = new Vector3f(0, 0, -rotation * 0.005f * animationSpeed); + final float d = (float) (distanceBetween(vec, maxPos) / (0.005f * animationSpeed)); + max = d; + if (rotation > 0) { + step = 0.005f * animationSpeed; + } else if (rotation < 0) { + step = -0.005f * animationSpeed; + } else { + step = -0.005f * animationSpeed; + max = 0; + progress = d; + calculatePlus = false; + } + System.out.println(); + } + + @Override + public ModelTranslation getFinalModelTranslation() { + return new ModelTranslation(pivot, + Quaternion.fromXYZ(0, 0, -rotation * 0.005f * animationSpeed), pivot); + } + + @Override + public ModelTranslation getModelTranslation() { + // TODO Apply Axis + return new ModelTranslation(pivot, Quaternion.fromYXZ(0, 0, -progress * step), pivot); + } + + @Override + public boolean isFinished() { + if (calculatePlus) { + if (progress < max) { + return false; + } + } else { + if (progress > max) { + return false; + } + } + progress = 0; + calculatePlus = true; + return true; + } + + @Override + public boolean test(final Map properties) { + return predicate.test(properties); + } + + @Override + public int hashCode() { + return Objects.hash(animationSpeed, axis, model, pivot, progress, rotation); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final SignalAnimationRotation other = (SignalAnimationRotation) obj; + return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) + && axis == other.axis && Objects.equals(model, other.model) + && Objects.equals(pivot, other.pivot) + && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress) + && Objects.equals(rotation, other.rotation); + } + + private static double distanceBetween(final Vector3f vec1, final Vector3f vec2) { + final float dx = vec2.x() - vec1.x(); + final float dy = vec2.y() - vec1.y(); + final float dz = vec2.z() - vec1.z(); + return Math.sqrt(dx * dx + dy * dy + dz * dz); + } + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java new file mode 100644 index 000000000..77deeae75 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java @@ -0,0 +1,22 @@ +package com.troblecodings.signals.animation; + +import java.util.Map; +import java.util.function.Predicate; + +import com.troblecodings.signals.SEProperty; + +public interface SignalAnimationState extends Predicate> { + + public SignalAnimationState with(final String model); + + public void updateAnimation(); + + public ModelTranslation getModelTranslation(); + + public ModelTranslation getFinalModelTranslation(); + + public boolean isFinished(); + + public void setUpAnimationValues(final ModelTranslation currentTranslation); + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java new file mode 100644 index 000000000..0d1c1bf8d --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -0,0 +1,85 @@ +package com.troblecodings.signals.animation; + +import java.util.Map; +import java.util.Objects; +import java.util.function.Predicate; + +import com.troblecodings.core.VectorWrapper; +import com.troblecodings.signals.SEProperty; + +public class SignalAnimationTranslation implements SignalAnimationState { + + private float progress; + + private final Predicate> predicate; + private String model; + private final float animationSpeed; + private final VectorWrapper dest; + + public SignalAnimationTranslation(Predicate> predicate, + final float animationSpeed, final VectorWrapper dest) { + this.predicate = predicate; + this.animationSpeed = animationSpeed; + this.dest = dest; + } + + @Override + public SignalAnimationState with(final String model) { + this.model = model; + return this; + } + + @Override + public void updateAnimation() { + // TODO Auto-generated method stub + + } + + @Override + public ModelTranslation getFinalModelTranslation() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ModelTranslation getModelTranslation() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setUpAnimationValues(ModelTranslation currentTranslation) { + // TODO Auto-generated method stub + + } + + @Override + public boolean isFinished() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean test(Map properties) { + return predicate.test(properties); + } + + @Override + public int hashCode() { + return Objects.hash(animationSpeed, dest, model, progress); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final SignalAnimationTranslation other = (SignalAnimationTranslation) obj; + return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) + && Objects.equals(dest, other.dest) && Objects.equals(model, other.model) + && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress); + } +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/blocks/Signal.java b/src/main/java/com/troblecodings/signals/blocks/Signal.java index cb2122beb..ad34e9635 100644 --- a/src/main/java/com/troblecodings/signals/blocks/Signal.java +++ b/src/main/java/com/troblecodings/signals/blocks/Signal.java @@ -13,6 +13,7 @@ import com.troblecodings.signals.OpenSignalsMain; import com.troblecodings.signals.SEProperty; import com.troblecodings.signals.config.ConfigHandler; +import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.core.DestroyHelper; import com.troblecodings.signals.core.JsonEnum; import com.troblecodings.signals.core.RenderOverlayInfo; @@ -67,8 +68,8 @@ public class Signal extends BasicBlock { public static final Map SIGNALS = new HashMap<>(); public static final List SIGNAL_IDS = new ArrayList<>(); - public static final EnumProperty ANGEL = - EnumProperty.create("angel", SignalAngel.class); + public static final EnumProperty ANGEL = EnumProperty.create("angel", + SignalAngel.class); public static final SEProperty CUSTOMNAME = new SEProperty("customname", JsonEnum.BOOLEAN, "false", ChangeableStage.AUTOMATICSTAGE, t -> true, 0); public static final TileEntitySupplierWrapper SUPPLIER = SignalTileEntity::new; @@ -122,8 +123,8 @@ public VoxelShape getBlockSupportShape(final BlockState stat, final BlockGetter @Override public BlockState getStateForPlacement(final BlockPlaceContext context) { - final int angel = - Integer.valueOf(Mth.floor(context.getRotation() * 16.0F / 360.0F + 0.5D) & 15); + final int angel = Integer + .valueOf(Mth.floor(context.getRotation() * 16.0F / 360.0F + 0.5D) & 15); return defaultBlockState().setValue(ANGEL, SignalAngel.values()[angel]); } @@ -454,15 +455,7 @@ public Optional getSupplierWrapper() { return Optional.of(SUPPLIER); } - public boolean hasAnimation(final Level world, final BlockPos pos) { - final Map map = - ClientSignalStateHandler.getClientStates(new StateInfo(world, pos)); - boolean animation = false; - for (final PredicateProperty boolProp : this.prop.animate) { - if (boolProp.test(map)) { - animation = boolProp.state; - } - } - return true; + public boolean hasAnimation() { + return SignalAnimationConfigParser.ALL_ANIMATIONS.containsKey(this); } } diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java new file mode 100644 index 000000000..d9f30160e --- /dev/null +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java @@ -0,0 +1,44 @@ +package com.troblecodings.signals.contentpacks; + +import com.troblecodings.core.VectorWrapper; +import com.troblecodings.signals.animation.AnimationMode; +import com.troblecodings.signals.animation.RotationAxis; +import com.troblecodings.signals.animation.SignalAnimationState; +import com.troblecodings.signals.animation.SignalAnimationRotation; +import com.troblecodings.signals.animation.SignalAnimationTranslation; +import com.troblecodings.signals.parser.FunctionParsingInfo; +import com.troblecodings.signals.parser.LogicParser; + +public class SignalAnimationConfig { + + private String predicate; + private float animationSpeed = 1.0f; + private String mode; + private String rotationAxis; + private float rotation; + private float pivotX; + private float pivotY; + private float pivotZ; + + private float destX; + private float destY; + private float destZ; + + public SignalAnimationState createAnimation(final FunctionParsingInfo info) { + final AnimationMode mode = AnimationMode.of(this.mode); + switch (mode) { + case ROTATION: { + final RotationAxis axis = RotationAxis.of(rotationAxis); + return new SignalAnimationRotation(LogicParser.predicate(predicate, info), + animationSpeed, axis, rotation, new VectorWrapper(pivotX, pivotY, pivotZ)); + } + case TRANSLATION: { + return new SignalAnimationTranslation(LogicParser.predicate(predicate, info), + animationSpeed, new VectorWrapper(destX, destY, destZ)); + } + default: + return null; + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java new file mode 100644 index 000000000..1c47a234e --- /dev/null +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java @@ -0,0 +1,51 @@ +package com.troblecodings.signals.contentpacks; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.troblecodings.signals.OpenSignalsMain; +import com.troblecodings.signals.animation.SignalAnimationState; +import com.troblecodings.signals.blocks.Signal; +import com.troblecodings.signals.parser.FunctionParsingInfo; + +public class SignalAnimationConfigParser { + + private Map> animations; + + private static final Gson GSON = new Gson(); + + public static final Map>> ALL_ANIMATIONS = new HashMap<>(); + + public static void loadAllAnimations() { + OpenSignalsMain.contentPacks.getFiles("animations").forEach(entry -> { + final String signalName = entry.getKey().replace(".json", "").toLowerCase(); + final Signal signal = Signal.SIGNALS.get(signalName); + if (signal == null) + OpenSignalsMain + .exitMinecraftWithMessage("There doesn't exists a signal with the name '" + + signalName + "'! Valid Signals are: " + Signal.SIGNALS.keySet()); + if (ALL_ANIMATIONS.containsKey(signal)) + OpenSignalsMain.exitMinecraftWithMessage( + "There are already existing animations for " + signal + "!"); + final FunctionParsingInfo info = new FunctionParsingInfo(signal); + + final SignalAnimationConfigParser parser = GSON.fromJson(entry.getValue(), + SignalAnimationConfigParser.class); + final Map> modelToAnimation = new HashMap<>(); + parser.animations.forEach((modelName, configs) -> { + final List animatinos = new ArrayList<>(); + for (final SignalAnimationConfig config : configs) { + animatinos.add(config.createAnimation(info).with(modelName)); + } + if (!animatinos.isEmpty()) + modelToAnimation.put(modelName, animatinos); + }); + if (!modelToAnimation.isEmpty()) + ALL_ANIMATIONS.put(signal, modelToAnimation); + }); + } + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/core/SignalProperties.java b/src/main/java/com/troblecodings/signals/core/SignalProperties.java index 0988f38d2..7680e459d 100644 --- a/src/main/java/com/troblecodings/signals/core/SignalProperties.java +++ b/src/main/java/com/troblecodings/signals/core/SignalProperties.java @@ -28,7 +28,6 @@ public class SignalProperties { public final List redstoneOutputPacks; public final int defaultItemDamage; public final boolean isBridgeSignal; - public final List> animate; public SignalProperties(final Placementtool placementtool, final float customNameRenderHeight, final int height, final List> signalHeights, @@ -37,8 +36,7 @@ public SignalProperties(final Placementtool placementtool, final float customNam final int textColor, final boolean canLink, final List colors, final List> renderheights, final List sounds, final List redstoneOutputs, final int defaultItemDamage, - final List redstoneOutputPacks, final boolean isBridgeSignal, - final List> animate) { + final List redstoneOutputPacks, final boolean isBridgeSignal) { this.placementtool = placementtool; this.customNameRenderHeight = customNameRenderHeight; this.defaultHeight = height; @@ -58,6 +56,5 @@ public SignalProperties(final Placementtool placementtool, final float customNam this.defaultItemDamage = defaultItemDamage; this.redstoneOutputPacks = redstoneOutputPacks; this.isBridgeSignal = isBridgeSignal; - this.animate = animate; } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java b/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java index 8839c9036..d5a767036 100644 --- a/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java +++ b/src/main/java/com/troblecodings/signals/core/SignalPropertiesBuilder.java @@ -44,7 +44,6 @@ public class SignalPropertiesBuilder { private Map remoteRedstoneOutputs; private int defaultItemDamage = 1; private boolean isBridgeSignal = false; - private Map animate; public SignalProperties build(final FunctionParsingInfo info) { if (placementToolName != null) { @@ -122,8 +121,8 @@ public SignalProperties build(final FunctionParsingInfo info) { .forEach((entry) -> { if (entry.getKey() != null) { entry.getKey().forEach((key, value) -> { - final Predicate> predicate = - LogicParser.predicate(key, info); + final Predicate> predicate = LogicParser + .predicate(key, info); final SEProperty property = (SEProperty) info.getProperty(value); entry.getValue().add(new ValuePack(property, predicate)); }); @@ -144,21 +143,6 @@ public SignalProperties build(final FunctionParsingInfo info) { } }); } - - final List> animation = new ArrayList<>(); - if (animate != null) { - animate.forEach((property, bool) -> { - try { - animation.add(new PredicateProperty( - LogicParser.predicate(property, info), bool)); - } catch (final LogicalParserException e) { - OpenSignalsMain.getLogger() - .error("Something went wrong during the registry of a predicate in " - + info.signalName + "!\nWith statement:" + property); - e.printStackTrace(); - } - }); - } this.colors = this.colors == null ? new ArrayList<>() : this.colors; return new SignalProperties(placementtool, customNameRenderHeight, defaultHeight, @@ -166,7 +150,6 @@ public SignalProperties build(final FunctionParsingInfo info) { autoscale, ImmutableList.copyOf(doubleText), textColor, canLink, colors, ImmutableList.copyOf(renderheights), ImmutableList.copyOf(soundProperties), ImmutableList.copyOf(redstoneValuePacks), defaultItemDamage, - ImmutableList.copyOf(remoteRedstoneValuePacks), isBridgeSignal, - ImmutableList.copyOf(animation)); + ImmutableList.copyOf(remoteRedstoneValuePacks), isBridgeSignal); } } diff --git a/src/main/java/com/troblecodings/signals/guis/GuiSignalBridge.java b/src/main/java/com/troblecodings/signals/guis/GuiSignalBridge.java index 69f99d7d5..d32375f53 100644 --- a/src/main/java/com/troblecodings/signals/guis/GuiSignalBridge.java +++ b/src/main/java/com/troblecodings/signals/guis/GuiSignalBridge.java @@ -622,7 +622,7 @@ private void checkMaxAndMins(final VectorWrapper vector) { } private static void checkEnableAndDisable(final AxisDirection axisDirection, final int min, - final int max, final int value, final UIEntity button) { + final int max, final float value, final UIEntity button) { if (value >= max && axisDirection == AxisDirection.POSITIVE) { disableSelection(button); } else if (value <= min && axisDirection == AxisDirection.NEGATIVE) { diff --git a/src/main/java/com/troblecodings/signals/proxy/CommonProxy.java b/src/main/java/com/troblecodings/signals/proxy/CommonProxy.java index d387cb3c4..4b766a49a 100644 --- a/src/main/java/com/troblecodings/signals/proxy/CommonProxy.java +++ b/src/main/java/com/troblecodings/signals/proxy/CommonProxy.java @@ -15,6 +15,7 @@ import com.troblecodings.signals.contentpacks.ChangeConfigParser; import com.troblecodings.signals.contentpacks.OneSignalNonPredicateConfigParser; import com.troblecodings.signals.contentpacks.OneSignalPredicateConfigParser; +import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.contentpacks.SubsidiarySignalParser; import com.troblecodings.signals.guis.ContainerPlacementtool; import com.troblecodings.signals.guis.ContainerSignalBox; @@ -61,5 +62,6 @@ public void preinit(final FMLCommonSetupEvent event) { ChangeConfigParser.loadChangeConfigs(); OneSignalPredicateConfigParser.loadDefaultConfigs(); SubsidiarySignalParser.loadAllSubsidiarySignals(); + SignalAnimationConfigParser.loadAllAnimations(); } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/signalbridge/SignalBridgeBuilder.java b/src/main/java/com/troblecodings/signals/signalbridge/SignalBridgeBuilder.java index f1dc68159..fd6478930 100644 --- a/src/main/java/com/troblecodings/signals/signalbridge/SignalBridgeBuilder.java +++ b/src/main/java/com/troblecodings/signals/signalbridge/SignalBridgeBuilder.java @@ -94,7 +94,7 @@ public VectorWrapper getVecForSignal(final Entry entry) { public boolean hasBlockOn(final VectorWrapper vec, final Entry entry) { final boolean isCollidingWithBlock = vec.getZ() == 0 - ? pointForBlocks.containsKey(new Point(vec.getX(), vec.getY())) + ? pointForBlocks.containsKey(new Point((int) vec.getX(), (int) vec.getY())) : false; final VectorWrapper signalVec = vecForSignal.get(entry); return isCollidingWithBlock || (!vec.equals(signalVec) && vecForSignal.containsValue(vec)); diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java index 4a78473c3..2e54adfba 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalSpecialRenderer.java @@ -31,11 +31,9 @@ public void render(final SignalTileEntity tile, final float tick, final PoseStac if (tile.hasCustomName()) { tile.renderOverlay(new RenderOverlayInfo(stack, 0, 0, 0, context.getFont())); } - if (tile.getSignal().hasAnimation(tile.getLevel(), tile.getBlockPos())) { - renderAnimation(new RenderAnimationInfo(stack, context.getBlockRenderDispatcher(), - source, rand1, rand2).with(tile), tile); - } else if (!tile.getSignal().hasAnimation(tile.getLevel(), tile.getBlockPos())) { - tile.animProgress = 0.0F; + if (tile.getSignal().hasAnimation()) { + tile.getAnimationHandler().render(new RenderAnimationInfo(stack, + context.getBlockRenderDispatcher(), source, rand1, rand2).with(tile)); } } @@ -63,9 +61,8 @@ public void renderAnimation(final RenderAnimationInfo info, final SignalTileEnti final BakedModel model = SignalCustomModel.getModelFromLocation( new ResourceLocation(OpenSignalsMain.MODID, "semaphore_signals/sema_main_wing1")); info.dispatcher.getModelRenderer().renderModel(info.stack.last(), - info.source - .getBuffer(ItemBlockRenderTypes.getRenderType(tile.getBlockState(), false)), - state, model, 0, 0, 0, info.lightColor, info.overlayTexture, tile.getModelData()); + info.source.getBuffer(ItemBlockRenderTypes.getRenderType(state, false)), state, + model, 0, 0, 0, info.lightColor, info.overlayTexture, tile.getModelData()); info.stack.popPose(); diff --git a/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java b/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java index f8fc7587e..46644172c 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/SignalTileEntity.java @@ -9,6 +9,7 @@ import com.troblecodings.core.interfaces.NamableWrapper; import com.troblecodings.guilib.ecs.interfaces.ISyncable; import com.troblecodings.signals.SEProperty; +import com.troblecodings.signals.animation.SignalAnimationHandler; import com.troblecodings.signals.blocks.Signal; import com.troblecodings.signals.core.RenderOverlayInfo; import com.troblecodings.signals.core.SignalStateListener; @@ -26,10 +27,12 @@ public class SignalTileEntity extends SyncableTileEntity implements NamableWrapper, ISyncable { public float animProgress; + protected final SignalAnimationHandler handler; public SignalTileEntity(final TileEntityInfo info) { super(info); animProgress = 0.0F; + this.handler = new SignalAnimationHandler(this); } private final Map properties = new HashMap<>(); @@ -89,11 +92,23 @@ public Map getProperties() { return ImmutableMap.copyOf(properties); } + public SignalAnimationHandler getAnimationHandler() { + return handler; + } + @Override public @Nonnull IModelData getModelData() { - final Map states = - ClientSignalStateHandler.getClientStates(new StateInfo(level, worldPosition)); - return new ModelInfoWrapper(states); + return new ModelInfoWrapper(properties); + } + + @Override + public void requestModelDataUpdate() { + final Map newProperties = ClientSignalStateHandler + .getClientStates(new StateInfo(level, worldPosition)); + handler.updateStates(newProperties, properties); + this.properties.clear(); + this.properties.putAll(newProperties); + super.requestModelDataUpdate(); } @Override @@ -101,6 +116,9 @@ public void onLoad() { if (!level.isClientSide) { SignalStateHandler.addListener(new SignalStateInfo(level, worldPosition, getSignal()), listener); + } else { + if (getSignal().hasAnimation()) + handler.updateAnimationListFromBlock(); } } diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json new file mode 100644 index 000000000..c03f0e0a8 --- /dev/null +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -0,0 +1,44 @@ +{ + "animations": { + "semaphore_signals/sema_main_wing1": [ + { + "predicate": "config(WING1.FALSE)", + "mode": "ROTATION", + "rotaionAxis": "X", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(WING1.TRUE)", + "mode": "ROTATION", + "rotaionAxis": "X", + "rotation": 100, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ], + "semaphore_signals/sema_main_wing2": [ + { + "predicate": "config(WING2.FALSE)", + "mode": "ROTATION", + "rotaionAxis": "X", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(WING2.TRUE)", + "mode": "ROTATION", + "rotaionAxis": "X", + "rotation": -100, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ] + } +} \ No newline at end of file From 945c6b4491e29221e67c5eda4c5a5fcacf0608e1 Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 24 Sep 2024 10:34:43 +0200 Subject: [PATCH 07/26] feat: added new calc logic for rotating animations --- .../animation/AnimationRotionCalc.java | 83 +++++++++++++++++++ .../signals/animation/ModelTranslation.java | 21 +++++ .../animation/SignalAnimationHandler.java | 5 ++ .../animation/SignalAnimationRotation.java | 57 +++---------- .../animation/SignalAnimationState.java | 2 + .../animation/SignalAnimationTranslation.java | 7 ++ 6 files changed, 130 insertions(+), 45 deletions(-) create mode 100644 src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java new file mode 100644 index 000000000..075b58274 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java @@ -0,0 +1,83 @@ +package com.troblecodings.signals.animation; + +import java.util.Objects; + +import com.mojang.math.Quaternion; +import com.mojang.math.Vector3f; + +public class AnimationRotionCalc { + + private final float animationSpeed; + private final float step; + private float progress; + private float max; + private boolean calculatePlus = true; + private Quaternion quaternion; + + public AnimationRotionCalc(final Vector3f startPosition, final Vector3f finalPosition, + final float animationSpeed) { + this.animationSpeed = animationSpeed; + this.step = 0.005f * animationSpeed; + calculateWayAndValues(startPosition, finalPosition); + } + + private void calculateWayAndValues(final Vector3f start, final Vector3f end) { + progress = start.z(); + max = end.z(); + if (max < progress) { + calculatePlus = false; + } + } + + public void updateAnimation() { + if (calculatePlus) { + progress += step; + } else { + progress -= step; + } + + } + + public boolean isAnimationFinished() { + if (calculatePlus) { + if (progress < max) { + return false; + } + } else { + if (max < progress) { + return false; + } + } + return true; + } + + public Quaternion getQuaternion() { + return Quaternion.fromXYZ(0, 0, progress); + } + + public static double distanceBetween(final Vector3f vec1, final Vector3f vec2) { + final float dx = vec2.x() - vec1.x(); + final float dy = vec2.y() - vec1.y(); + final float dz = vec2.z() - vec1.z(); + return Math.sqrt(dx * dx + dy * dy + dz * dz); + } + + @Override + public int hashCode() { + return Objects.hash(animationSpeed, quaternion); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final AnimationRotionCalc other = (AnimationRotionCalc) obj; + return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) + && Objects.equals(quaternion, other.quaternion); + } + +} \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index 052492f32..5643e656d 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -1,5 +1,7 @@ package com.troblecodings.signals.animation; +import java.util.Objects; + import com.mojang.math.Quaternion; import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.core.RenderAnimationInfo; @@ -62,4 +64,23 @@ public SignalAnimationState getAssigendAnimation() { return animation; } + @Override + public int hashCode() { + return Objects.hash(firstTranslation, lastTranslation, quaternion, renderModel); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final ModelTranslation other = (ModelTranslation) obj; + return Objects.equals(firstTranslation, other.firstTranslation) + && Objects.equals(lastTranslation, other.lastTranslation) + && Objects.equals(quaternion, other.quaternion) && renderModel == other.renderModel; + } + } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java index c7e787c5d..eaf866f6f 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -67,6 +67,7 @@ private void updateAnimation(final ModelTranslation translation) { if (animation.isFinished()) { translation.setUpNewTranslation(animation.getFinalModelTranslation()); translation.removeAnimation(); + animation.reset(); return; } animation.updateAnimation(); @@ -93,6 +94,10 @@ private void updateAnimations(final Map changedProperties) { for (final SignalAnimationState animation : entry.getValue()) { if (animation.test(changedProperties)) { final ModelTranslation translation = entry.getKey(); + if (translation.isAnimationAssigned()) { + final SignalAnimationState other = translation.getAssigendAnimation(); + other.reset(); + } animation.setUpAnimationValues(translation); translation.setUpNewTranslation(animation.getModelTranslation()); translation.assignAnimation(animation); diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index 4c472f047..be37aaa04 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -11,9 +11,7 @@ public class SignalAnimationRotation implements SignalAnimationState { - private float progress = 0; - private double max = 0; - private float step = 0; + private AnimationRotionCalc calc; private final Predicate> predicate; private String model; @@ -22,8 +20,6 @@ public class SignalAnimationRotation implements SignalAnimationState { private final float rotation; private final VectorWrapper pivot; - private boolean calculatePlus = true; - public SignalAnimationRotation(final Predicate> predicate, final float animationSpeed, final RotationAxis axis, final float rotation, final VectorWrapper pivot) { @@ -42,29 +38,14 @@ public SignalAnimationState with(final String model) { @Override public void updateAnimation() { - if (calculatePlus) - ++progress; - else - --progress; + calc.updateAnimation(); } @Override public void setUpAnimationValues(final ModelTranslation currentTranslation) { final Vector3f vec = currentTranslation.getQuaternion().toXYZ(); final Vector3f maxPos = new Vector3f(0, 0, -rotation * 0.005f * animationSpeed); - final float d = (float) (distanceBetween(vec, maxPos) / (0.005f * animationSpeed)); - max = d; - if (rotation > 0) { - step = 0.005f * animationSpeed; - } else if (rotation < 0) { - step = -0.005f * animationSpeed; - } else { - step = -0.005f * animationSpeed; - max = 0; - progress = d; - calculatePlus = false; - } - System.out.println(); + this.calc = new AnimationRotionCalc(vec, maxPos, animationSpeed); } @Override @@ -76,23 +57,17 @@ public ModelTranslation getFinalModelTranslation() { @Override public ModelTranslation getModelTranslation() { // TODO Apply Axis - return new ModelTranslation(pivot, Quaternion.fromYXZ(0, 0, -progress * step), pivot); + return new ModelTranslation(pivot, calc.getQuaternion(), pivot); } @Override public boolean isFinished() { - if (calculatePlus) { - if (progress < max) { - return false; - } - } else { - if (progress > max) { - return false; - } - } - progress = 0; - calculatePlus = true; - return true; + return calc.isAnimationFinished(); + } + + @Override + public void reset() { + calc = null; } @Override @@ -102,7 +77,7 @@ public boolean test(final Map properties) { @Override public int hashCode() { - return Objects.hash(animationSpeed, axis, model, pivot, progress, rotation); + return Objects.hash(animationSpeed, axis, model, pivot, calc, rotation); } @Override @@ -116,16 +91,8 @@ public boolean equals(final Object obj) { final SignalAnimationRotation other = (SignalAnimationRotation) obj; return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) && axis == other.axis && Objects.equals(model, other.model) - && Objects.equals(pivot, other.pivot) - && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress) + && Objects.equals(pivot, other.pivot) && Objects.equals(calc, other.calc) && Objects.equals(rotation, other.rotation); } - private static double distanceBetween(final Vector3f vec1, final Vector3f vec2) { - final float dx = vec2.x() - vec1.x(); - final float dy = vec2.y() - vec1.y(); - final float dz = vec2.z() - vec1.z(); - return Math.sqrt(dx * dx + dy * dy + dz * dz); - } - } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java index 77deeae75..622a56bb1 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java @@ -17,6 +17,8 @@ public interface SignalAnimationState extends Predicate> public boolean isFinished(); + public void reset(); + public void setUpAnimationValues(final ModelTranslation currentTranslation); } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java index 0d1c1bf8d..bc2fc1c0e 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -59,6 +59,12 @@ public boolean isFinished() { return false; } + @Override + public void reset() { + // TODO Auto-generated method stub + + } + @Override public boolean test(Map properties) { return predicate.test(properties); @@ -82,4 +88,5 @@ public boolean equals(final Object obj) { && Objects.equals(dest, other.dest) && Objects.equals(model, other.model) && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress); } + } \ No newline at end of file From 543c13f43fe014729868c49f9f2479b3050b1688 Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 24 Sep 2024 11:23:57 +0200 Subject: [PATCH 08/26] feat: added system for Rotation on all axis --- .../animation/AnimationRotionCalc.java | 32 ++++++++++++------- .../signals/animation/RotationAxis.java | 23 ++++++++++++- .../animation/SignalAnimationRotation.java | 28 ++++++++++++---- .../animations/semaphoresignal.json | 8 ++--- 4 files changed, 68 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java index 075b58274..823bbd1b7 100644 --- a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java +++ b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java @@ -9,21 +9,38 @@ public class AnimationRotionCalc { private final float animationSpeed; private final float step; + private final RotationAxis axis; private float progress; private float max; private boolean calculatePlus = true; private Quaternion quaternion; public AnimationRotionCalc(final Vector3f startPosition, final Vector3f finalPosition, - final float animationSpeed) { + final float animationSpeed, final RotationAxis axis) { this.animationSpeed = animationSpeed; this.step = 0.005f * animationSpeed; + this.axis = axis; calculateWayAndValues(startPosition, finalPosition); } private void calculateWayAndValues(final Vector3f start, final Vector3f end) { - progress = start.z(); - max = end.z(); + switch (axis) { + case X: { + progress = start.x(); + max = end.x(); + break; + } + case Y: { + progress = start.y(); + max = end.y(); + break; + } + case Z: { + progress = start.z(); + max = end.z(); + break; + } + } if (max < progress) { calculatePlus = false; } @@ -52,14 +69,7 @@ public boolean isAnimationFinished() { } public Quaternion getQuaternion() { - return Quaternion.fromXYZ(0, 0, progress); - } - - public static double distanceBetween(final Vector3f vec1, final Vector3f vec2) { - final float dx = vec2.x() - vec1.x(); - final float dy = vec2.y() - vec1.y(); - final float dz = vec2.z() - vec1.z(); - return Math.sqrt(dx * dx + dy * dy + dz * dz); + return axis.getForAxis(progress); } @Override diff --git a/src/main/java/com/troblecodings/signals/animation/RotationAxis.java b/src/main/java/com/troblecodings/signals/animation/RotationAxis.java index e3fdcdd53..293f9d8a2 100644 --- a/src/main/java/com/troblecodings/signals/animation/RotationAxis.java +++ b/src/main/java/com/troblecodings/signals/animation/RotationAxis.java @@ -2,6 +2,9 @@ import java.util.Arrays; +import com.mojang.math.Quaternion; +import com.troblecodings.signals.OpenSignalsMain; + public enum RotationAxis { X("X"), Y("Y"), Z("Z"); @@ -15,7 +18,25 @@ private RotationAxis(final String axis) { public static RotationAxis of(final String axis) { return Arrays.stream(values()) .filter(rotationAxis -> rotationAxis.axis.equalsIgnoreCase(axis)).findFirst() - .orElse(null); + .orElseGet(() -> { + OpenSignalsMain.exitMinecraftWithMessage("[" + axis + + "] is not a valid axis for a RotationAnimation! Valid are: " + + values()); + return null; + }); + } + + public Quaternion getForAxis(final float value) { + switch (this) { + case X: + return Quaternion.fromXYZ(value, 0, 0); + case Y: + return Quaternion.fromXYZ(0, value, 0); + case Z: + return Quaternion.fromXYZ(0, 0, value); + default: + return Quaternion.fromXYZ(0, 0, 0); + } } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index be37aaa04..920a2a6ae 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -4,7 +4,6 @@ import java.util.Objects; import java.util.function.Predicate; -import com.mojang.math.Quaternion; import com.mojang.math.Vector3f; import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.SEProperty; @@ -43,20 +42,35 @@ public void updateAnimation() { @Override public void setUpAnimationValues(final ModelTranslation currentTranslation) { - final Vector3f vec = currentTranslation.getQuaternion().toXYZ(); - final Vector3f maxPos = new Vector3f(0, 0, -rotation * 0.005f * animationSpeed); - this.calc = new AnimationRotionCalc(vec, maxPos, animationSpeed); + final Vector3f vec = currentTranslation.getQuaternion().toYXZ(); + Vector3f maxPos = new Vector3f(0, 0, 0); + switch (axis) { + case X: { + maxPos = new Vector3f(-rotation * 0.005f * animationSpeed, 0, 0); + break; + } + case Y: { + maxPos = new Vector3f(0, -rotation * 0.005f * animationSpeed, 0); + break; + } + case Z: { + maxPos = new Vector3f(0, 0, -rotation * 0.005f * animationSpeed); + break; + } + default: + break; + } + this.calc = new AnimationRotionCalc(vec, maxPos, animationSpeed, axis); } @Override public ModelTranslation getFinalModelTranslation() { - return new ModelTranslation(pivot, - Quaternion.fromXYZ(0, 0, -rotation * 0.005f * animationSpeed), pivot); + return new ModelTranslation(pivot, axis.getForAxis(-rotation * 0.005f * animationSpeed), + pivot); } @Override public ModelTranslation getModelTranslation() { - // TODO Apply Axis return new ModelTranslation(pivot, calc.getQuaternion(), pivot); } diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index c03f0e0a8..fd291079e 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -4,7 +4,7 @@ { "predicate": "config(WING1.FALSE)", "mode": "ROTATION", - "rotaionAxis": "X", + "rotationAxis": "Z", "rotation": 0, "pivotX": 0, "pivotY": 0, @@ -13,7 +13,7 @@ { "predicate": "config(WING1.TRUE)", "mode": "ROTATION", - "rotaionAxis": "X", + "rotationAxis": "Z", "rotation": 100, "pivotX": 0, "pivotY": 0, @@ -24,7 +24,7 @@ { "predicate": "config(WING2.FALSE)", "mode": "ROTATION", - "rotaionAxis": "X", + "rotationAxis": "Z", "rotation": 0, "pivotX": 0, "pivotY": 0, @@ -33,7 +33,7 @@ { "predicate": "config(WING2.TRUE)", "mode": "ROTATION", - "rotaionAxis": "X", + "rotationAxis": "Z", "rotation": -100, "pivotX": 0, "pivotY": 0, From bb9b44095065734ca61ec0276acbbe5f674c814a Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 24 Sep 2024 13:32:16 +0200 Subject: [PATCH 09/26] feat: added model translation --- .../signals/animation/ModelTranslation.java | 15 +++- ...imationState.java => SignalAnimation.java} | 4 +- .../animation/SignalAnimationHandler.java | 21 ++--- .../animation/SignalAnimationRotation.java | 4 +- .../animation/SignalAnimationTranslation.java | 4 +- .../contentpacks/SignalAnimationConfig.java | 10 +-- .../SignalAnimationConfigParser.java | 29 +++++-- .../animations/semaphoresignal.json | 85 ++++++++++--------- 8 files changed, 101 insertions(+), 71 deletions(-) rename src/main/java/com/troblecodings/signals/animation/{SignalAnimationState.java => SignalAnimation.java} (75%) diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index 5643e656d..a25549cf9 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -11,7 +11,8 @@ public class ModelTranslation { private VectorWrapper firstTranslation; private Quaternion quaternion = new Quaternion(0, 0, 0, 0); private VectorWrapper lastTranslation; - private SignalAnimationState animation; + private SignalAnimation animation; + private VectorWrapper modelTranslation = VectorWrapper.ZERO; private boolean renderModel = false; public ModelTranslation(final VectorWrapper firstTranslation, final Quaternion quaternion, @@ -27,6 +28,10 @@ public void translate(final RenderAnimationInfo info) { info.stack.mulPose(quaternion); info.stack.translate(lastTranslation.getX(), lastTranslation.getY(), lastTranslation.getZ()); + if (!modelTranslation.equals(VectorWrapper.ZERO)) { + info.stack.translate(modelTranslation.getX(), modelTranslation.getY(), + modelTranslation.getZ()); + } } public Quaternion getQuaternion() { @@ -48,7 +53,11 @@ public void setUpNewTranslation(final ModelTranslation other) { this.lastTranslation = other.lastTranslation; } - public void assignAnimation(final SignalAnimationState animation) { + public void setModelTranslation(final VectorWrapper translation) { + this.modelTranslation = translation; + } + + public void assignAnimation(final SignalAnimation animation) { this.animation = animation; } @@ -60,7 +69,7 @@ public boolean isAnimationAssigned() { return animation != null; } - public SignalAnimationState getAssigendAnimation() { + public SignalAnimation getAssigendAnimation() { return animation; } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java similarity index 75% rename from src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java rename to src/main/java/com/troblecodings/signals/animation/SignalAnimation.java index 622a56bb1..39dc783c2 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationState.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java @@ -5,9 +5,9 @@ import com.troblecodings.signals.SEProperty; -public interface SignalAnimationState extends Predicate> { +public interface SignalAnimation extends Predicate> { - public SignalAnimationState with(final String model); + public SignalAnimation with(final String model); public void updateAnimation(); diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java index eaf866f6f..688108d32 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -33,7 +33,7 @@ public SignalAnimationHandler(final SignalTileEntity tile) { this.tile = tile; } - private final Map>>// + private final Map>>// animationPerModel = new HashMap<>(); public void render(final RenderAnimationInfo info) { @@ -63,7 +63,7 @@ public void render(final RenderAnimationInfo info) { } private void updateAnimation(final ModelTranslation translation) { - final SignalAnimationState animation = translation.getAssigendAnimation(); + final SignalAnimation animation = translation.getAssigendAnimation(); if (animation.isFinished()) { translation.setUpNewTranslation(animation.getFinalModelTranslation()); translation.removeAnimation(); @@ -91,11 +91,11 @@ public void updateStates(final Map newProperties, private void updateAnimations(final Map changedProperties) { animationPerModel.values().forEach(entry -> { - for (final SignalAnimationState animation : entry.getValue()) { + for (final SignalAnimation animation : entry.getValue()) { if (animation.test(changedProperties)) { final ModelTranslation translation = entry.getKey(); if (translation.isAnimationAssigned()) { - final SignalAnimationState other = translation.getAssigendAnimation(); + final SignalAnimation other = translation.getAssigendAnimation(); other.reset(); } animation.setUpAnimationValues(translation); @@ -108,7 +108,7 @@ private void updateAnimations(final Map changedProperties) { private void updateToFinalizedAnimations(final Map newProperties) { animationPerModel.values().forEach((entry) -> { - for (final SignalAnimationState animation : entry.getValue()) { + for (final SignalAnimation animation : entry.getValue()) { if (animation.test(newProperties)) { final ModelTranslation translation = entry.getKey(); translation.setUpNewTranslation(animation.getFinalModelTranslation()); @@ -120,13 +120,14 @@ private void updateToFinalizedAnimations(final Map newProper public void updateAnimationListFromBlock() { animationPerModel.clear(); - final Map> map = SignalAnimationConfigParser.ALL_ANIMATIONS - .get(tile.getSignal()); - map.forEach((modelName, animations) -> { - final BakedModel model = SignalCustomModel - .getModelFromLocation(new ResourceLocation(OpenSignalsMain.MODID, modelName)); + final Map, List> map = // + SignalAnimationConfigParser.ALL_ANIMATIONS.get(tile.getSignal()); + map.forEach((entry, animations) -> { + final BakedModel model = SignalCustomModel.getModelFromLocation( + new ResourceLocation(OpenSignalsMain.MODID, entry.getKey())); final ModelTranslation translation = new ModelTranslation(VectorWrapper.ZERO, new Quaternion(0, 0, 0, 0), VectorWrapper.ZERO); + translation.setModelTranslation(entry.getValue()); animationPerModel.put(model, Maps.immutableEntry(translation, animations)); }); } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index 920a2a6ae..6e22761f7 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -8,7 +8,7 @@ import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.SEProperty; -public class SignalAnimationRotation implements SignalAnimationState { +public class SignalAnimationRotation implements SignalAnimation { private AnimationRotionCalc calc; @@ -30,7 +30,7 @@ public SignalAnimationRotation(final Predicate> predicat } @Override - public SignalAnimationState with(final String model) { + public SignalAnimation with(final String model) { this.model = model; return this; } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java index bc2fc1c0e..77806dbb8 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -7,7 +7,7 @@ import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.SEProperty; -public class SignalAnimationTranslation implements SignalAnimationState { +public class SignalAnimationTranslation implements SignalAnimation { private float progress; @@ -24,7 +24,7 @@ public SignalAnimationTranslation(Predicate> predicate, } @Override - public SignalAnimationState with(final String model) { + public SignalAnimation with(final String model) { this.model = model; return this; } diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java index d9f30160e..214d682d4 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java @@ -3,7 +3,7 @@ import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.animation.AnimationMode; import com.troblecodings.signals.animation.RotationAxis; -import com.troblecodings.signals.animation.SignalAnimationState; +import com.troblecodings.signals.animation.SignalAnimation; import com.troblecodings.signals.animation.SignalAnimationRotation; import com.troblecodings.signals.animation.SignalAnimationTranslation; import com.troblecodings.signals.parser.FunctionParsingInfo; @@ -16,15 +16,15 @@ public class SignalAnimationConfig { private String mode; private String rotationAxis; private float rotation; - private float pivotX; - private float pivotY; - private float pivotZ; + private float pivotX = 0; + private float pivotY = 0; + private float pivotZ = 0; private float destX; private float destY; private float destZ; - public SignalAnimationState createAnimation(final FunctionParsingInfo info) { + public SignalAnimation createAnimation(final FunctionParsingInfo info) { final AnimationMode mode = AnimationMode.of(this.mode); switch (mode) { case ROTATION: { diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java index 1c47a234e..c4931041f 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java @@ -4,20 +4,24 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import com.google.common.collect.Maps; import com.google.gson.Gson; +import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.OpenSignalsMain; -import com.troblecodings.signals.animation.SignalAnimationState; +import com.troblecodings.signals.animation.SignalAnimation; import com.troblecodings.signals.blocks.Signal; import com.troblecodings.signals.parser.FunctionParsingInfo; public class SignalAnimationConfigParser { - private Map> animations; + private Map animations; private static final Gson GSON = new Gson(); - public static final Map>> ALL_ANIMATIONS = new HashMap<>(); + public static final Map, List>>// + ALL_ANIMATIONS = new HashMap<>(); public static void loadAllAnimations() { OpenSignalsMain.contentPacks.getFiles("animations").forEach(entry -> { @@ -34,18 +38,29 @@ public static void loadAllAnimations() { final SignalAnimationConfigParser parser = GSON.fromJson(entry.getValue(), SignalAnimationConfigParser.class); - final Map> modelToAnimation = new HashMap<>(); + final Map, List> modelToAnimation = new HashMap<>(); parser.animations.forEach((modelName, configs) -> { - final List animatinos = new ArrayList<>(); - for (final SignalAnimationConfig config : configs) { + final VectorWrapper vec = new VectorWrapper(configs.translationX, + configs.translationY, configs.translationZ); + final List animatinos = new ArrayList<>(); + for (final SignalAnimationConfig config : configs.animationConfigs) { animatinos.add(config.createAnimation(info).with(modelName)); } if (!animatinos.isEmpty()) - modelToAnimation.put(modelName, animatinos); + modelToAnimation.put(Maps.immutableEntry(modelName, vec), animatinos); }); if (!modelToAnimation.isEmpty()) ALL_ANIMATIONS.put(signal, modelToAnimation); }); } + private class ModelAnimationConfig { + + private float translationX = 0; + private float translationY = 0; + private float translationZ = 0; + private List animationConfigs; + + } + } \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index fd291079e..0936627b4 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -1,44 +1,49 @@ { "animations": { - "semaphore_signals/sema_main_wing1": [ - { - "predicate": "config(WING1.FALSE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 0, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - }, - { - "predicate": "config(WING1.TRUE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 100, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - } - ], - "semaphore_signals/sema_main_wing2": [ - { - "predicate": "config(WING2.FALSE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 0, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - }, - { - "predicate": "config(WING2.TRUE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": -100, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - } - ] + "semaphore_signals/sema_main_wing1": { + "translationX": 5, + "animationConfigs": [ + { + "predicate": "config(WING1.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(WING1.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 100, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ] + }, + "semaphore_signals/sema_main_wing2": { + "animationConfigs": [ + { + "predicate": "config(WING2.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(WING2.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -100, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ] + } } } \ No newline at end of file From 19bd6eb91b83cb30a49b8f391d2f7c4fa4b05879 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 25 Sep 2024 11:23:21 +0200 Subject: [PATCH 10/26] fix: anim rotation model translation calc --- .../signals/animation/ModelTranslation.java | 28 ++++++++----------- .../animation/SignalAnimationHandler.java | 11 ++++---- .../animation/SignalAnimationRotation.java | 7 +++-- .../animations/semaphoresignal.json | 14 ++++++---- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index a25549cf9..cc622241d 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -8,30 +8,26 @@ public class ModelTranslation { - private VectorWrapper firstTranslation; + private VectorWrapper pivotTranslation; private Quaternion quaternion = new Quaternion(0, 0, 0, 0); - private VectorWrapper lastTranslation; private SignalAnimation animation; private VectorWrapper modelTranslation = VectorWrapper.ZERO; private boolean renderModel = false; - public ModelTranslation(final VectorWrapper firstTranslation, final Quaternion quaternion, - final VectorWrapper lastTranslation) { - this.firstTranslation = firstTranslation; + public ModelTranslation(final VectorWrapper firstTranslation, final Quaternion quaternion) { + this.pivotTranslation = firstTranslation; this.quaternion = quaternion; - this.lastTranslation = lastTranslation; } public void translate(final RenderAnimationInfo info) { - info.stack.translate(firstTranslation.getX(), firstTranslation.getY(), - firstTranslation.getZ()); - info.stack.mulPose(quaternion); - info.stack.translate(lastTranslation.getX(), lastTranslation.getY(), - lastTranslation.getZ()); + if (!modelTranslation.equals(VectorWrapper.ZERO)) { info.stack.translate(modelTranslation.getX(), modelTranslation.getY(), - modelTranslation.getZ()); + modelTranslation.getZ()); // Modell verschieben } + info.stack.mulPose(quaternion); + info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), + pivotTranslation.getZ()); // Pivot Punkt } public Quaternion getQuaternion() { @@ -48,9 +44,8 @@ public ModelTranslation setRenderModel(final boolean renderModel) { } public void setUpNewTranslation(final ModelTranslation other) { - this.firstTranslation = other.firstTranslation; + this.pivotTranslation = other.pivotTranslation; this.quaternion = other.quaternion; - this.lastTranslation = other.lastTranslation; } public void setModelTranslation(final VectorWrapper translation) { @@ -75,7 +70,7 @@ public SignalAnimation getAssigendAnimation() { @Override public int hashCode() { - return Objects.hash(firstTranslation, lastTranslation, quaternion, renderModel); + return Objects.hash(pivotTranslation, quaternion, renderModel); } @Override @@ -87,8 +82,7 @@ public boolean equals(final Object obj) { if (getClass() != obj.getClass()) return false; final ModelTranslation other = (ModelTranslation) obj; - return Objects.equals(firstTranslation, other.firstTranslation) - && Objects.equals(lastTranslation, other.lastTranslation) + return Objects.equals(pivotTranslation, other.pivotTranslation) && Objects.equals(quaternion, other.quaternion) && renderModel == other.renderModel; } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java index 688108d32..0f34bafb7 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -40,8 +40,8 @@ public void render(final RenderAnimationInfo info) { final BlockState state = tile.getBlockState(); final SignalAngel angle = state.getValue(Signal.ANGEL); final ModelBlockRenderer renderer = info.dispatcher.getModelRenderer(); - final VertexConsumer vertex = info.source - .getBuffer(ItemBlockRenderTypes.getRenderType(state, false)); + final VertexConsumer vertex = + info.source.getBuffer(ItemBlockRenderTypes.getRenderType(state, false)); final IModelData data = tile.getModelData(); animationPerModel.forEach((model, entry) -> { @@ -57,8 +57,9 @@ public void render(final RenderAnimationInfo info) { info.overlayTexture, data); info.stack.popPose(); - if (translation.isAnimationAssigned()) + if (translation.isAnimationAssigned()) { updateAnimation(translation); + } }); } @@ -125,8 +126,8 @@ public void updateAnimationListFromBlock() { map.forEach((entry, animations) -> { final BakedModel model = SignalCustomModel.getModelFromLocation( new ResourceLocation(OpenSignalsMain.MODID, entry.getKey())); - final ModelTranslation translation = new ModelTranslation(VectorWrapper.ZERO, - new Quaternion(0, 0, 0, 0), VectorWrapper.ZERO); + final ModelTranslation translation = + new ModelTranslation(VectorWrapper.ZERO, new Quaternion(0, 0, 0, 0)); translation.setModelTranslation(entry.getValue()); animationPerModel.put(model, Maps.immutableEntry(translation, animations)); }); diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index 6e22761f7..0162aa2a1 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -65,17 +65,18 @@ public void setUpAnimationValues(final ModelTranslation currentTranslation) { @Override public ModelTranslation getFinalModelTranslation() { - return new ModelTranslation(pivot, axis.getForAxis(-rotation * 0.005f * animationSpeed), - pivot); + return new ModelTranslation(pivot, axis.getForAxis(-rotation * 0.005f * animationSpeed)); } @Override public ModelTranslation getModelTranslation() { - return new ModelTranslation(pivot, calc.getQuaternion(), pivot); + return new ModelTranslation(pivot, calc.getQuaternion()); } @Override public boolean isFinished() { + if (calc == null) + return true; return calc.isAnimationFinished(); } diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 0936627b4..2e30c4aa7 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -1,24 +1,26 @@ { "animations": { "semaphore_signals/sema_main_wing1": { - "translationX": 5, + "translationX": 0.15, + "translationY": 6.95, + "translationZ": -0.5, "animationConfigs": [ { "predicate": "config(WING1.FALSE)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, - "pivotX": 0, - "pivotY": 0, + "pivotX": -0.65, + "pivotY": -4.45, "pivotZ": 0 }, { "predicate": "config(WING1.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 100, - "pivotX": 0, - "pivotY": 0, + "rotation": 155, + "pivotX": -0.65, + "pivotY": -4.45, "pivotZ": 0 } ] From 1f199afefbbdfbbe725d755328af5161aeabcb20 Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 30 Sep 2024 11:53:36 +0200 Subject: [PATCH 11/26] feat: added AnimationTranslation --- .../animation/AnimationRotionCalc.java | 22 ++-- .../animation/AnimationTranslationCalc.java | 113 ++++++++++++++++++ .../signals/animation/ModelTranslation.java | 28 ++++- .../animation/SignalAnimationTranslation.java | 36 +++--- .../contentpacks/SignalAnimationConfig.java | 8 +- .../animations/semaphoresignal.json | 15 +++ 6 files changed, 179 insertions(+), 43 deletions(-) create mode 100644 src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java index 823bbd1b7..3e0626680 100644 --- a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java +++ b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java @@ -8,12 +8,10 @@ public class AnimationRotionCalc { private final float animationSpeed; - private final float step; + private float step; private final RotationAxis axis; private float progress; private float max; - private boolean calculatePlus = true; - private Quaternion quaternion; public AnimationRotionCalc(final Vector3f startPosition, final Vector3f finalPosition, final float animationSpeed, final RotationAxis axis) { @@ -42,21 +40,16 @@ private void calculateWayAndValues(final Vector3f start, final Vector3f end) { } } if (max < progress) { - calculatePlus = false; + this.step = -step; } } public void updateAnimation() { - if (calculatePlus) { - progress += step; - } else { - progress -= step; - } - + progress += step; } public boolean isAnimationFinished() { - if (calculatePlus) { + if (step > 0) { if (progress < max) { return false; } @@ -74,7 +67,7 @@ public Quaternion getQuaternion() { @Override public int hashCode() { - return Objects.hash(animationSpeed, quaternion); + return Objects.hash(animationSpeed, axis, max, progress, step); } @Override @@ -87,7 +80,10 @@ public boolean equals(final Object obj) { return false; final AnimationRotionCalc other = (AnimationRotionCalc) obj; return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) - && Objects.equals(quaternion, other.quaternion); + && axis == other.axis + && Float.floatToIntBits(max) == Float.floatToIntBits(other.max) + && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress) + && Float.floatToIntBits(step) == Float.floatToIntBits(other.step); } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java new file mode 100644 index 000000000..a2bdb5c90 --- /dev/null +++ b/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java @@ -0,0 +1,113 @@ +package com.troblecodings.signals.animation; + +import java.util.Objects; + +import com.troblecodings.core.VectorWrapper; + +public class AnimationTranslationCalc { + + private final float animationSpeed; + private float stepX; + private float stepY; + private float stepZ; + private float progressX; + private float progressY; + private float progressZ; + private float maxX; + private float maxY; + private float maxZ; + + private boolean finishedX = false; + private boolean finishedY = false; + private boolean finishedZ = false; + + public AnimationTranslationCalc(final VectorWrapper startPosition, + final VectorWrapper finalPosition, final float animationSpeed) { + this.animationSpeed = animationSpeed; + this.stepX = 0.005f * animationSpeed; + this.stepY = 0.005f * animationSpeed; + this.stepZ = 0.005f * animationSpeed; + calculateWayAndValues(startPosition, finalPosition); + } + + private void calculateWayAndValues(final VectorWrapper start, final VectorWrapper end) { + this.progressX = start.getX(); + this.progressY = start.getY(); + this.progressZ = start.getZ(); + + this.maxX = end.getX(); + this.maxY = end.getY(); + this.maxZ = end.getZ(); + + if (maxX < progressX) { + this.stepX = -stepX; + } + if (maxY < progressY) { + this.stepY = -stepY; + } + if (maxZ < progressZ) { + this.stepZ = -stepZ; + } + } + + public void updateAnimation() { + if (!finishedX) { + progressX += stepX; + this.finishedX = isAnimationOnAxisIsFinished(stepX, progressX, maxX); + } + if (!finishedY) { + progressY += stepY; + this.finishedY = isAnimationOnAxisIsFinished(stepY, progressY, maxY); + } + if (!finishedZ) { + progressZ += stepZ; + this.finishedZ = isAnimationOnAxisIsFinished(stepZ, progressZ, maxZ); + } + } + + public boolean isAnimationFinished() { + return finishedX && finishedY && finishedZ; + } + + private static boolean isAnimationOnAxisIsFinished(final float step, final float progress, + final float max) { + if (step > 0) { + if (progress < max) { + return false; + } + } else { + if (max < progress) { + return false; + } + } + return true; + } + + public VectorWrapper getTranslation() { + return new VectorWrapper(progressX, progressY, progressZ); + } + + @Override + public int hashCode() { + return Objects.hash(animationSpeed, maxX, maxY, maxZ, progressX, progressY, progressZ); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final AnimationTranslationCalc other = (AnimationTranslationCalc) obj; + return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) + && Float.floatToIntBits(maxX) == Float.floatToIntBits(other.maxX) + && Float.floatToIntBits(maxY) == Float.floatToIntBits(other.maxY) + && Float.floatToIntBits(maxZ) == Float.floatToIntBits(other.maxZ) + && Float.floatToIntBits(progressX) == Float.floatToIntBits(other.progressX) + && Float.floatToIntBits(progressY) == Float.floatToIntBits(other.progressY) + && Float.floatToIntBits(progressZ) == Float.floatToIntBits(other.progressZ); + } + +} diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index cc622241d..815181999 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -8,10 +8,11 @@ public class ModelTranslation { - private VectorWrapper pivotTranslation; - private Quaternion quaternion = new Quaternion(0, 0, 0, 0); + private VectorWrapper pivotTranslation = VectorWrapper.ZERO; + private Quaternion quaternion = Quaternion.ONE; private SignalAnimation animation; private VectorWrapper modelTranslation = VectorWrapper.ZERO; + private VectorWrapper translation = VectorWrapper.ZERO; private boolean renderModel = false; public ModelTranslation(final VectorWrapper firstTranslation, final Quaternion quaternion) { @@ -19,21 +20,35 @@ public ModelTranslation(final VectorWrapper firstTranslation, final Quaternion q this.quaternion = quaternion; } - public void translate(final RenderAnimationInfo info) { + public ModelTranslation(final VectorWrapper translation) { + this.translation = translation; + } + public void translate(final RenderAnimationInfo info) { if (!modelTranslation.equals(VectorWrapper.ZERO)) { info.stack.translate(modelTranslation.getX(), modelTranslation.getY(), modelTranslation.getZ()); // Modell verschieben } - info.stack.mulPose(quaternion); - info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), - pivotTranslation.getZ()); // Pivot Punkt + if (!quaternion.equals(Quaternion.ONE)) { + info.stack.mulPose(quaternion); + } + if (!translation.equals(VectorWrapper.ZERO)) { + info.stack.translate(translation.getX(), translation.getY(), translation.getZ()); + } + if (!pivotTranslation.equals(VectorWrapper.ZERO)) { + info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), + pivotTranslation.getZ()); // Pivot Punkt + } } public Quaternion getQuaternion() { return quaternion; } + public VectorWrapper getTranslation() { + return translation; + } + public boolean shouldRenderModel() { return renderModel; } @@ -46,6 +61,7 @@ public ModelTranslation setRenderModel(final boolean renderModel) { public void setUpNewTranslation(final ModelTranslation other) { this.pivotTranslation = other.pivotTranslation; this.quaternion = other.quaternion; + this.translation = other.translation; } public void setModelTranslation(final VectorWrapper translation) { diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java index 77806dbb8..79136840d 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -9,7 +9,7 @@ public class SignalAnimationTranslation implements SignalAnimation { - private float progress; + private AnimationTranslationCalc calc; private final Predicate> predicate; private String model; @@ -31,48 +31,45 @@ public SignalAnimation with(final String model) { @Override public void updateAnimation() { - // TODO Auto-generated method stub - + calc.updateAnimation(); } @Override - public ModelTranslation getFinalModelTranslation() { - // TODO Auto-generated method stub - return null; + public void setUpAnimationValues(final ModelTranslation currentTranslation) { + this.calc = new AnimationTranslationCalc(currentTranslation.getTranslation(), dest, + animationSpeed); } @Override - public ModelTranslation getModelTranslation() { - // TODO Auto-generated method stub - return null; + public ModelTranslation getFinalModelTranslation() { + return new ModelTranslation(dest); } @Override - public void setUpAnimationValues(ModelTranslation currentTranslation) { - // TODO Auto-generated method stub - + public ModelTranslation getModelTranslation() { + return new ModelTranslation(calc.getTranslation()); } @Override public boolean isFinished() { - // TODO Auto-generated method stub - return false; + if (calc == null) + return true; + return calc.isAnimationFinished(); } @Override public void reset() { - // TODO Auto-generated method stub - + calc = null; } @Override - public boolean test(Map properties) { + public boolean test(final Map properties) { return predicate.test(properties); } @Override public int hashCode() { - return Objects.hash(animationSpeed, dest, model, progress); + return Objects.hash(animationSpeed, dest, model); } @Override @@ -85,8 +82,7 @@ public boolean equals(final Object obj) { return false; final SignalAnimationTranslation other = (SignalAnimationTranslation) obj; return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) - && Objects.equals(dest, other.dest) && Objects.equals(model, other.model) - && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress); + && Objects.equals(dest, other.dest) && Objects.equals(model, other.model); } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java index 214d682d4..037e309f3 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java @@ -15,14 +15,14 @@ public class SignalAnimationConfig { private float animationSpeed = 1.0f; private String mode; private String rotationAxis; - private float rotation; + private float rotation = 0; private float pivotX = 0; private float pivotY = 0; private float pivotZ = 0; - private float destX; - private float destY; - private float destZ; + private float destX = 0; + private float destY = 0; + private float destZ = 0; public SignalAnimation createAnimation(final FunctionParsingInfo info) { final AnimationMode mode = AnimationMode.of(this.mode); diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 2e30c4aa7..124a273ca 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -46,6 +46,21 @@ "pivotZ": 0 } ] + }, + "semaphore_signals/sema_main_zs3": { + "animationConfigs": [ + { + "predicate": "!config(ZS3.OFF)" , + "mode": "TRANSLATION", + "destX": 2, + "destY": 2, + "destZ": 2 + }, + { + "predicate": "config(ZS3.OFF)" , + "mode": "TRANSLATION" + } + ] } } } \ No newline at end of file From dc53a451123ee5676e9702056f0c875a22a2d748 Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 7 Oct 2024 19:50:04 +0200 Subject: [PATCH 12/26] ref: better code performance --- .../signals/animation/SignalAnimation.java | 2 -- .../signals/animation/SignalAnimationRotation.java | 14 +++----------- .../animation/SignalAnimationTranslation.java | 6 ------ .../contentpacks/SignalAnimationConfigParser.java | 2 +- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java index 39dc783c2..0b7e4e204 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java @@ -7,8 +7,6 @@ public interface SignalAnimation extends Predicate> { - public SignalAnimation with(final String model); - public void updateAnimation(); public ModelTranslation getModelTranslation(); diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index 0162aa2a1..026419399 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -13,7 +13,6 @@ public class SignalAnimationRotation implements SignalAnimation { private AnimationRotionCalc calc; private final Predicate> predicate; - private String model; private final float animationSpeed; private final RotationAxis axis; private final float rotation; @@ -29,12 +28,6 @@ public SignalAnimationRotation(final Predicate> predicat this.pivot = pivot; } - @Override - public SignalAnimation with(final String model) { - this.model = model; - return this; - } - @Override public void updateAnimation() { calc.updateAnimation(); @@ -92,7 +85,7 @@ public boolean test(final Map properties) { @Override public int hashCode() { - return Objects.hash(animationSpeed, axis, model, pivot, calc, rotation); + return Objects.hash(animationSpeed, axis, pivot, calc, rotation); } @Override @@ -105,9 +98,8 @@ public boolean equals(final Object obj) { return false; final SignalAnimationRotation other = (SignalAnimationRotation) obj; return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) - && axis == other.axis && Objects.equals(model, other.model) - && Objects.equals(pivot, other.pivot) && Objects.equals(calc, other.calc) - && Objects.equals(rotation, other.rotation); + && axis == other.axis && Objects.equals(pivot, other.pivot) + && Objects.equals(calc, other.calc) && Objects.equals(rotation, other.rotation); } } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java index 79136840d..3fa33686a 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -23,12 +23,6 @@ public SignalAnimationTranslation(Predicate> predicate, this.dest = dest; } - @Override - public SignalAnimation with(final String model) { - this.model = model; - return this; - } - @Override public void updateAnimation() { calc.updateAnimation(); diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java index c4931041f..655c74b92 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java @@ -44,7 +44,7 @@ public static void loadAllAnimations() { configs.translationY, configs.translationZ); final List animatinos = new ArrayList<>(); for (final SignalAnimationConfig config : configs.animationConfigs) { - animatinos.add(config.createAnimation(info).with(modelName)); + animatinos.add(config.createAnimation(info)); } if (!animatinos.isEmpty()) modelToAnimation.put(Maps.immutableEntry(modelName, vec), animatinos); From 3ba6bb128f5112c95cdc36200b1641905cd5d084 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 7 Oct 2024 20:05:49 +0200 Subject: [PATCH 13/26] fix: anim default model offset --- .../signals/models/SignalCustomModel.java | 25 +++--- .../animations/railroadgateanimated.json | 79 +++++++++++++++++++ .../railroadgateanimated.json | 11 +++ .../signalsystems/railroadgateanimated.json | 22 ++++++ 4 files changed, 127 insertions(+), 10 deletions(-) create mode 100644 src/main/resources/assets/opensignals/animations/railroadgateanimated.json create mode 100644 src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json create mode 100644 src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json diff --git a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java index a91e232b1..56d39bb9a 100644 --- a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java +++ b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java @@ -87,15 +87,15 @@ private static void transform(final BakedQuad quad, final Matrix4f quaterion) { private BakedModelPair transform(final SignalModelLoaderInfo info, final ModelBakery bakery, final ResourceLocation location, final Function function, final Map> material, final Quaternion rotation) { - final Transformation transformation = new Transformation( - new Vector3f(info.x, info.y, info.z), null, null, null); + final Transformation transformation = + new Transformation(new Vector3f(info.x, info.y, info.z), null, null, null); final BlockModel blockModel = (BlockModel) info.model; - final ImmutableMap> defaultMap = ImmutableMap - .copyOf(blockModel.textureMap); + final ImmutableMap> defaultMap = + ImmutableMap.copyOf(blockModel.textureMap); info.retexture.forEach((id, texture) -> blockModel.textureMap.computeIfPresent(id, (_u, old) -> material.get(texture))); - final BakedModel model = info.model.bake(bakery, function, - new SimpleModelState(transformation), location); + final BakedModel model = + info.model.bake(bakery, function, new SimpleModelState(transformation), location); blockModel.textureMap.putAll(defaultMap); final Matrix4f reverse = new Matrix4f(); reverse.setIdentity(); @@ -112,8 +112,13 @@ private BakedModelPair transform(final SignalModelLoaderInfo info, final ModelBa model.getQuads(null, direction, RANDOM, EmptyModelData.INSTANCE) .forEach(quad -> transform(quad, matrix)); } - if (angel.equals(SignalAngel.ANGEL0)) - locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), model); + if (angel.equals(SignalAngel.ANGEL0)) { + locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), + info.model.bake(bakery, function, + new SimpleModelState( + new Transformation(Vector3f.ZERO, null, null, null)), + location)); + } return new BakedModelPair(info.state, model); } @@ -140,8 +145,8 @@ public BakedModel bake(final ModelBakery bakery, final ResourceLocation resource) { list.forEach(info -> { if (info.model == null) { - final ResourceLocation location = new ResourceLocation(OpenSignalsMain.MODID, - "block/" + info.name); + final ResourceLocation location = + new ResourceLocation(OpenSignalsMain.MODID, "block/" + info.name); if (bakery instanceof ForgeModelBakery) { info.model = ((ForgeModelBakery) bakery).getModelOrLogError(location, String.format("Could not find %s!", location)); diff --git a/src/main/resources/assets/opensignals/animations/railroadgateanimated.json b/src/main/resources/assets/opensignals/animations/railroadgateanimated.json new file mode 100644 index 000000000..f938e164b --- /dev/null +++ b/src/main/resources/assets/opensignals/animations/railroadgateanimated.json @@ -0,0 +1,79 @@ +{ + "animations": { + "railroad_gate/barrier_base_top": { + "translationX": 0, + "translationY": 0, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -310, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_1": { + "translationX": 0, + "translationY": 0, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -310, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_2": { + "translationX": 0, + "translationY": 0, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -310, + "pivotX": 0, + "pivotY": 0, + "pivotZ": 0 + } + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json b/src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json new file mode 100644 index 000000000..4e500cffb --- /dev/null +++ b/src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json @@ -0,0 +1,11 @@ +{ + "textures": {}, + "models": { + "railroad_gate/barrier_base": { + "textures": [ + {} + ], + "y": 0 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json b/src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json new file mode 100644 index 000000000..83080e716 --- /dev/null +++ b/src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json @@ -0,0 +1,22 @@ +{ + "systemProperties": { + "placementToolName": "signplacementtool", + "canLink": true, + "defaultHeight": 1 + }, + "seProperties": [ + { + "name": "barrier_length", + "enumClass": "RailroadGateLength", + "defaultState": "L1", + "autoname": true, + "changeableStage": "GUISTAGE" + }, + { + "name": "barrier_open", + "defaultState": false, + "changeableStage": "APISTAGE_NONE_CONFIG", + "autoname": true + } + ] +} \ No newline at end of file From 7ecec380a932bcea15f133604b366068daaed069 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 7 Oct 2024 21:40:36 +0200 Subject: [PATCH 14/26] fix: animation rotation angle and speed --- .../signals/animation/AnimationRotionCalc.java | 6 ++---- .../signals/animation/SignalAnimationRotation.java | 10 ++++++---- .../opensignals/animations/railroadgateanimated.json | 6 +++--- .../assets/opensignals/animations/semaphoresignal.json | 5 +++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java index 3e0626680..8edd3cf4a 100644 --- a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java +++ b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java @@ -50,13 +50,11 @@ public void updateAnimation() { public boolean isAnimationFinished() { if (step > 0) { - if (progress < max) { + if (progress < max) return false; - } } else { - if (max < progress) { + if (max < progress) return false; - } } return true; } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index 026419399..826b8af56 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -10,6 +10,8 @@ public class SignalAnimationRotation implements SignalAnimation { + private static float factor = 3.49065f; + private AnimationRotionCalc calc; private final Predicate> predicate; @@ -39,15 +41,15 @@ public void setUpAnimationValues(final ModelTranslation currentTranslation) { Vector3f maxPos = new Vector3f(0, 0, 0); switch (axis) { case X: { - maxPos = new Vector3f(-rotation * 0.005f * animationSpeed, 0, 0); + maxPos = new Vector3f(rotation * 0.005f * factor, 0, 0); break; } case Y: { - maxPos = new Vector3f(0, -rotation * 0.005f * animationSpeed, 0); + maxPos = new Vector3f(0, rotation * 0.005f * factor, 0); break; } case Z: { - maxPos = new Vector3f(0, 0, -rotation * 0.005f * animationSpeed); + maxPos = new Vector3f(0, 0, rotation * 0.005f * factor); break; } default: @@ -58,7 +60,7 @@ public void setUpAnimationValues(final ModelTranslation currentTranslation) { @Override public ModelTranslation getFinalModelTranslation() { - return new ModelTranslation(pivot, axis.getForAxis(-rotation * 0.005f * animationSpeed)); + return new ModelTranslation(pivot, axis.getForAxis(rotation * 0.005f * factor)); } @Override diff --git a/src/main/resources/assets/opensignals/animations/railroadgateanimated.json b/src/main/resources/assets/opensignals/animations/railroadgateanimated.json index f938e164b..c8de0b926 100644 --- a/src/main/resources/assets/opensignals/animations/railroadgateanimated.json +++ b/src/main/resources/assets/opensignals/animations/railroadgateanimated.json @@ -18,7 +18,7 @@ "predicate": "config(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": -310, + "rotation": 90, "pivotX": 0, "pivotY": 0, "pivotZ": 0 @@ -43,7 +43,7 @@ "predicate": "config(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": -310, + "rotation": 90, "pivotX": 0, "pivotY": 0, "pivotZ": 0 @@ -68,7 +68,7 @@ "predicate": "config(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": -310, + "rotation": 90, "pivotX": 0, "pivotY": 0, "pivotZ": 0 diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 124a273ca..49c3c8bc7 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -4,6 +4,7 @@ "translationX": 0.15, "translationY": 6.95, "translationZ": -0.5, + "animationConfigs": [ { "predicate": "config(WING1.FALSE)", @@ -18,7 +19,7 @@ "predicate": "config(WING1.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 155, + "rotation": -45, "pivotX": -0.65, "pivotY": -4.45, "pivotZ": 0 @@ -40,7 +41,7 @@ "predicate": "config(WING2.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": -100, + "rotation": 45, "pivotX": 0, "pivotY": 0, "pivotZ": 0 From 282800b2e2786248af057f0af5bced542b560c37 Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 7 Oct 2024 21:44:47 +0200 Subject: [PATCH 15/26] ref: better code performance --- .../signals/animation/AnimationRotionCalc.java | 8 ++------ .../signals/animation/AnimationTranslationCalc.java | 7 ++----- .../signals/animation/SignalAnimationRotation.java | 12 ++++++------ 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java index 8edd3cf4a..c48f9cdb2 100644 --- a/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java +++ b/src/main/java/com/troblecodings/signals/animation/AnimationRotionCalc.java @@ -7,7 +7,6 @@ public class AnimationRotionCalc { - private final float animationSpeed; private float step; private final RotationAxis axis; private float progress; @@ -15,7 +14,6 @@ public class AnimationRotionCalc { public AnimationRotionCalc(final Vector3f startPosition, final Vector3f finalPosition, final float animationSpeed, final RotationAxis axis) { - this.animationSpeed = animationSpeed; this.step = 0.005f * animationSpeed; this.axis = axis; calculateWayAndValues(startPosition, finalPosition); @@ -65,7 +63,7 @@ public Quaternion getQuaternion() { @Override public int hashCode() { - return Objects.hash(animationSpeed, axis, max, progress, step); + return Objects.hash(axis, max, progress, step); } @Override @@ -77,9 +75,7 @@ public boolean equals(final Object obj) { if (getClass() != obj.getClass()) return false; final AnimationRotionCalc other = (AnimationRotionCalc) obj; - return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) - && axis == other.axis - && Float.floatToIntBits(max) == Float.floatToIntBits(other.max) + return axis == other.axis && Float.floatToIntBits(max) == Float.floatToIntBits(other.max) && Float.floatToIntBits(progress) == Float.floatToIntBits(other.progress) && Float.floatToIntBits(step) == Float.floatToIntBits(other.step); } diff --git a/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java b/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java index a2bdb5c90..35be76089 100644 --- a/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java +++ b/src/main/java/com/troblecodings/signals/animation/AnimationTranslationCalc.java @@ -6,7 +6,6 @@ public class AnimationTranslationCalc { - private final float animationSpeed; private float stepX; private float stepY; private float stepZ; @@ -23,7 +22,6 @@ public class AnimationTranslationCalc { public AnimationTranslationCalc(final VectorWrapper startPosition, final VectorWrapper finalPosition, final float animationSpeed) { - this.animationSpeed = animationSpeed; this.stepX = 0.005f * animationSpeed; this.stepY = 0.005f * animationSpeed; this.stepZ = 0.005f * animationSpeed; @@ -89,7 +87,7 @@ public VectorWrapper getTranslation() { @Override public int hashCode() { - return Objects.hash(animationSpeed, maxX, maxY, maxZ, progressX, progressY, progressZ); + return Objects.hash(maxX, maxY, maxZ, progressX, progressY, progressZ); } @Override @@ -101,8 +99,7 @@ public boolean equals(final Object obj) { if (getClass() != obj.getClass()) return false; final AnimationTranslationCalc other = (AnimationTranslationCalc) obj; - return Float.floatToIntBits(animationSpeed) == Float.floatToIntBits(other.animationSpeed) - && Float.floatToIntBits(maxX) == Float.floatToIntBits(other.maxX) + return Float.floatToIntBits(maxX) == Float.floatToIntBits(other.maxX) && Float.floatToIntBits(maxY) == Float.floatToIntBits(other.maxY) && Float.floatToIntBits(maxZ) == Float.floatToIntBits(other.maxZ) && Float.floatToIntBits(progressX) == Float.floatToIntBits(other.progressX) diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index 826b8af56..dc361bb2e 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -10,8 +10,6 @@ public class SignalAnimationRotation implements SignalAnimation { - private static float factor = 3.49065f; - private AnimationRotionCalc calc; private final Predicate> predicate; @@ -19,6 +17,7 @@ public class SignalAnimationRotation implements SignalAnimation { private final RotationAxis axis; private final float rotation; private final VectorWrapper pivot; + private final float finalRotationValue; public SignalAnimationRotation(final Predicate> predicate, final float animationSpeed, final RotationAxis axis, final float rotation, @@ -28,6 +27,7 @@ public SignalAnimationRotation(final Predicate> predicat this.axis = axis; this.rotation = rotation; this.pivot = pivot; + this.finalRotationValue = rotation * 0.005f * 3.49065f; } @Override @@ -41,15 +41,15 @@ public void setUpAnimationValues(final ModelTranslation currentTranslation) { Vector3f maxPos = new Vector3f(0, 0, 0); switch (axis) { case X: { - maxPos = new Vector3f(rotation * 0.005f * factor, 0, 0); + maxPos = new Vector3f(finalRotationValue, 0, 0); break; } case Y: { - maxPos = new Vector3f(0, rotation * 0.005f * factor, 0); + maxPos = new Vector3f(0, finalRotationValue, 0); break; } case Z: { - maxPos = new Vector3f(0, 0, rotation * 0.005f * factor); + maxPos = new Vector3f(0, 0, finalRotationValue); break; } default: @@ -60,7 +60,7 @@ public void setUpAnimationValues(final ModelTranslation currentTranslation) { @Override public ModelTranslation getFinalModelTranslation() { - return new ModelTranslation(pivot, axis.getForAxis(rotation * 0.005f * factor)); + return new ModelTranslation(pivot, axis.getForAxis(finalRotationValue)); } @Override From 028b65295ae60bb1aa63ba3188958c01d35922d8 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 8 Oct 2024 11:27:53 +0200 Subject: [PATCH 16/26] ref: added gate and semaphore animations --- .../signals/animation/ModelTranslation.java | 13 +- .../opensignals/animations/railroadgate.json | 204 ++++++++++++++++++ .../animations/railroadgateanimated.json | 79 ------- .../animations/semaphoresignal.json | 84 ++++++-- .../railroadgateanimated.json | 11 - .../models/block/railroad_gate/barrier_3.json | 1 + .../models/block/railroad_gate/barrier_4.json | 1 + .../models/block/railroad_gate/barrier_5.json | 1 + .../models/block/railroad_gate/barrier_6.json | 1 + .../models/block/railroad_gate/barrier_7.json | 1 + .../block/railroad_gate/barrier_base.json | 34 ++- .../block/railroad_gate/barrier_base_top.json | 101 ++++++++- .../sema_main_wing1_small.json | 1 + .../sema_main_wing2_small.json | 1 + .../signalsystems/railroadgateanimated.json | 22 -- 15 files changed, 417 insertions(+), 138 deletions(-) create mode 100644 src/main/resources/assets/opensignals/animations/railroadgate.json delete mode 100644 src/main/resources/assets/opensignals/animations/railroadgateanimated.json delete mode 100644 src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json create mode 100644 src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_3.json create mode 100644 src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_4.json create mode 100644 src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_5.json create mode 100644 src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_6.json create mode 100644 src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_7.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json delete mode 100644 src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index 815181999..6634a34e0 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -25,20 +25,17 @@ public ModelTranslation(final VectorWrapper translation) { } public void translate(final RenderAnimationInfo info) { - if (!modelTranslation.equals(VectorWrapper.ZERO)) { - info.stack.translate(modelTranslation.getX(), modelTranslation.getY(), - modelTranslation.getZ()); // Modell verschieben - } + info.stack.translate(modelTranslation.getX() - 0.5f, modelTranslation.getY() - 0.5f, + modelTranslation.getZ() - 0.5f); // Modell verschieben + if (!quaternion.equals(Quaternion.ONE)) { info.stack.mulPose(quaternion); } if (!translation.equals(VectorWrapper.ZERO)) { info.stack.translate(translation.getX(), translation.getY(), translation.getZ()); } - if (!pivotTranslation.equals(VectorWrapper.ZERO)) { - info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), - pivotTranslation.getZ()); // Pivot Punkt - } + info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), + pivotTranslation.getZ()); // Pivot Punkt } public Quaternion getQuaternion() { diff --git a/src/main/resources/assets/opensignals/animations/railroadgate.json b/src/main/resources/assets/opensignals/animations/railroadgate.json new file mode 100644 index 000000000..b427df0a1 --- /dev/null +++ b/src/main/resources/assets/opensignals/animations/railroadgate.json @@ -0,0 +1,204 @@ +{ + "animations": { + "railroad_gate/barrier_base_top": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": -0.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": -0.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_1": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 0.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 0.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_2": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L1) || config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 1.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L1) || config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 1.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_3": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 2.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 2.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_4": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 3.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 3.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_5": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 4.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 4.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_6": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 5.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 5.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + }, + "railroad_gate/barrier_7": { + "translationX": 0.5, + "translationY": 1.1875, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(BARRIER_OPEN.FALSE) && config(BARRIER_LENGTH.L6)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": 6.5, + "pivotY": -0.1875, + "pivotZ": 0 + }, + { + "predicate": "config(BARRIER_OPEN.TRUE) && config(BARRIER_LENGTH.L6)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 90, + "pivotX": 6.5, + "pivotY": -0.1875, + "pivotZ": 0 + } + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/animations/railroadgateanimated.json b/src/main/resources/assets/opensignals/animations/railroadgateanimated.json deleted file mode 100644 index c8de0b926..000000000 --- a/src/main/resources/assets/opensignals/animations/railroadgateanimated.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "animations": { - "railroad_gate/barrier_base_top": { - "translationX": 0, - "translationY": 0, - "translationZ": 0, - "animationConfigs": [ - { - "predicate": "config(BARRIER_OPEN.FALSE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 0, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - }, - { - "predicate": "config(BARRIER_OPEN.TRUE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 90, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - } - ] - }, - "railroad_gate/barrier_1": { - "translationX": 0, - "translationY": 0, - "translationZ": 0, - "animationConfigs": [ - { - "predicate": "config(BARRIER_OPEN.FALSE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 0, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - }, - { - "predicate": "config(BARRIER_OPEN.TRUE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 90, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - } - ] - }, - "railroad_gate/barrier_2": { - "translationX": 0, - "translationY": 0, - "translationZ": 0, - "animationConfigs": [ - { - "predicate": "config(BARRIER_OPEN.FALSE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 0, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - }, - { - "predicate": "config(BARRIER_OPEN.TRUE)", - "mode": "ROTATION", - "rotationAxis": "Z", - "rotation": 90, - "pivotX": 0, - "pivotY": 0, - "pivotZ": 0 - } - ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 49c3c8bc7..0ee496480 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -1,49 +1,101 @@ { "animations": { "semaphore_signals/sema_main_wing1": { - "translationX": 0.15, - "translationY": 6.95, - "translationZ": -0.5, - + "translationX": 0.6875, + "translationY": 7.5625, + "translationZ": 0, "animationConfigs": [ { - "predicate": "config(WING1.FALSE)", + "predicate": "config(WING1.FALSE) && config(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, - "pivotX": -0.65, - "pivotY": -4.45, + "pivotX": -0.6875, + "pivotY": -0.5625, "pivotZ": 0 }, { - "predicate": "config(WING1.TRUE)", + "predicate": "config(WING1.TRUE) && config(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": -45, - "pivotX": -0.65, - "pivotY": -4.45, + "pivotX": -0.6875, + "pivotY": -0.5625, "pivotZ": 0 } ] }, "semaphore_signals/sema_main_wing2": { + "translationX": 0.6875, + "translationY": 5.5625, + "translationZ": 0, "animationConfigs": [ { - "predicate": "config(WING2.FALSE)", + "predicate": "config(WING2.FALSE) && config(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, - "pivotX": 0, - "pivotY": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, "pivotZ": 0 }, { - "predicate": "config(WING2.TRUE)", + "predicate": "config(WING2.TRUE) && config(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 45, - "pivotX": 0, - "pivotY": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0 + } + ] + }, + "semaphore_signals/sema_main_wing1_small": { + "translationX": 0.6875, + "translationY": 4.5625, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(WING1.FALSE) && config(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0 + }, + { + "predicate": "config(WING1.TRUE) && config(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -45, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0 + } + ] + }, + "semaphore_signals/sema_main_wing2_small": { + "translationX": 0.6875, + "translationY": 2.5625, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "config(WING2.FALSE) && config(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0 + }, + { + "predicate": "config(WING2.TRUE) && config(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 45, + "pivotX": -0.6875, + "pivotY": -0.5625, "pivotZ": 0 } ] diff --git a/src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json b/src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json deleted file mode 100644 index 4e500cffb..000000000 --- a/src/main/resources/assets/opensignals/modeldefinitions/railroadgateanimated.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "textures": {}, - "models": { - "railroad_gate/barrier_base": { - "textures": [ - {} - ], - "y": 0 - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_3.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_3.json new file mode 100644 index 000000000..d1686e055 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_3.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "textures": {"0": "opensignals:blocks/railroad_gate/white_red", "particle": "opensignals:blocks/railroad_gate/white_red"}, "elements": [{"from": [0, 1, 7], "to": [16, 5, 9], "faces": {"north": {"uv": [16, 0, 0, 4], "texture": "#0"}, "east": {"uv": [14, 0, 16, 4], "texture": "#0"}, "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, "up": {"uv": [0, 0, 16, 2], "texture": "#0"}, "down": {"uv": [0, 0, 16, 2], "texture": "#0"}}}, {"from": [0, 2, 6], "to": [16, 4, 7], "faces": {"north": {"uv": [16, 0, 0, 2], "texture": "#0"}, "east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}, {"from": [0, 2, 9], "to": [16, 4, 10], "faces": {"east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "south": {"uv": [0, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_4.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_4.json new file mode 100644 index 000000000..d1686e055 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_4.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "textures": {"0": "opensignals:blocks/railroad_gate/white_red", "particle": "opensignals:blocks/railroad_gate/white_red"}, "elements": [{"from": [0, 1, 7], "to": [16, 5, 9], "faces": {"north": {"uv": [16, 0, 0, 4], "texture": "#0"}, "east": {"uv": [14, 0, 16, 4], "texture": "#0"}, "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, "up": {"uv": [0, 0, 16, 2], "texture": "#0"}, "down": {"uv": [0, 0, 16, 2], "texture": "#0"}}}, {"from": [0, 2, 6], "to": [16, 4, 7], "faces": {"north": {"uv": [16, 0, 0, 2], "texture": "#0"}, "east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}, {"from": [0, 2, 9], "to": [16, 4, 10], "faces": {"east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "south": {"uv": [0, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_5.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_5.json new file mode 100644 index 000000000..d1686e055 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_5.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "textures": {"0": "opensignals:blocks/railroad_gate/white_red", "particle": "opensignals:blocks/railroad_gate/white_red"}, "elements": [{"from": [0, 1, 7], "to": [16, 5, 9], "faces": {"north": {"uv": [16, 0, 0, 4], "texture": "#0"}, "east": {"uv": [14, 0, 16, 4], "texture": "#0"}, "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, "up": {"uv": [0, 0, 16, 2], "texture": "#0"}, "down": {"uv": [0, 0, 16, 2], "texture": "#0"}}}, {"from": [0, 2, 6], "to": [16, 4, 7], "faces": {"north": {"uv": [16, 0, 0, 2], "texture": "#0"}, "east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}, {"from": [0, 2, 9], "to": [16, 4, 10], "faces": {"east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "south": {"uv": [0, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_6.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_6.json new file mode 100644 index 000000000..d1686e055 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_6.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "textures": {"0": "opensignals:blocks/railroad_gate/white_red", "particle": "opensignals:blocks/railroad_gate/white_red"}, "elements": [{"from": [0, 1, 7], "to": [16, 5, 9], "faces": {"north": {"uv": [16, 0, 0, 4], "texture": "#0"}, "east": {"uv": [14, 0, 16, 4], "texture": "#0"}, "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, "up": {"uv": [0, 0, 16, 2], "texture": "#0"}, "down": {"uv": [0, 0, 16, 2], "texture": "#0"}}}, {"from": [0, 2, 6], "to": [16, 4, 7], "faces": {"north": {"uv": [16, 0, 0, 2], "texture": "#0"}, "east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}, {"from": [0, 2, 9], "to": [16, 4, 10], "faces": {"east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "south": {"uv": [0, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_7.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_7.json new file mode 100644 index 000000000..d1686e055 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_7.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "textures": {"0": "opensignals:blocks/railroad_gate/white_red", "particle": "opensignals:blocks/railroad_gate/white_red"}, "elements": [{"from": [0, 1, 7], "to": [16, 5, 9], "faces": {"north": {"uv": [16, 0, 0, 4], "texture": "#0"}, "east": {"uv": [14, 0, 16, 4], "texture": "#0"}, "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, "up": {"uv": [0, 0, 16, 2], "texture": "#0"}, "down": {"uv": [0, 0, 16, 2], "texture": "#0"}}}, {"from": [0, 2, 6], "to": [16, 4, 7], "faces": {"north": {"uv": [16, 0, 0, 2], "texture": "#0"}, "east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}, {"from": [0, 2, 9], "to": [16, 4, 10], "faces": {"east": {"uv": [15, 0, 16, 2], "texture": "#0"}, "south": {"uv": [0, 0, 16, 2], "texture": "#0"}, "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, "down": {"uv": [0, 0, 16, 1], "texture": "#0"}}}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base.json index 1e77cc3cc..7d0654bac 100644 --- a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base.json +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base.json @@ -1 +1,33 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/controlbox", "particle": "opensignals:blocks/default/controlbox"}, "elements": [{"from": [3, 0, 5], "to": [13, 16, 11], "faces": {"north": {"uv": [0, 0, 5, 8], "texture": "#0"}, "east": {"uv": [0, 0, 3, 8], "texture": "#0"}, "south": {"uv": [0, 0, 5, 8], "texture": "#0"}, "west": {"uv": [0, 0, 3, 8], "texture": "#0"}, "down": {"uv": [0, 0, 5, 3], "texture": "#0"}}}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/controlbox", + "particle": "opensignals:blocks/default/controlbox" + }, + "elements": [ + { + "from": [3, 0, 5], + "to": [13, 16, 11], + "faces": { + "north": {"uv": [0, 0, 5, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 5, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 5, 3], "texture": "#0"} + } + }, + { + "from": [3, 16, 5], + "to": [13, 22, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 16, 0]}, + "faces": { + "north": {"uv": [0, 0, 5, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 5, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 5, 3], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base_top.json b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base_top.json index dbb03be13..5e4bd9433 100644 --- a/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base_top.json +++ b/src/main/resources/assets/opensignals/models/block/railroad_gate/barrier_base_top.json @@ -1 +1,100 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/controlbox", "1": "opensignals:blocks/default/shield_black", "2": "opensignals:blocks/default/shield_gray", "particle": "opensignals:blocks/default/controlbox"}, "elements": [{"from": [3, 0, 5], "to": [13, 6, 11], "faces": {"north": {"uv": [0, 0, 5, 8], "texture": "#0"}, "east": {"uv": [0, 0, 3, 8], "texture": "#0"}, "south": {"uv": [0, 0, 5, 8], "texture": "#0"}, "west": {"uv": [0, 0, 3, 8], "texture": "#0"}, "up": {"uv": [0, 0, 5, 3], "texture": "#0"}}}, {"from": [17, 1, 6], "to": [18, 5, 10], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, "south": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 2], "texture": "#1"}}}, {"from": [15, 1, 5], "to": [17, 5, 6], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 1, 2], "texture": "#1"}, "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "south": {"uv": [0, 0, 1, 2], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "up": {"uv": [0, 0, 1, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#1"}}}, {"from": [6, 1, 4], "to": [15, 5, 5], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "south": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, "up": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"}}}, {"from": [-3, 1, 2], "to": [6, 5, 5], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, "east": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, "south": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, "west": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, "up": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"}, "down": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"}}}, {"from": [-3, 1, 11], "to": [6, 5, 14], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, "east": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, "south": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, "west": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, "up": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"}, "down": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"}}}, {"from": [6, 1, 11], "to": [15, 5, 12], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "south": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, "up": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"}}}, {"from": [15, 1, 10], "to": [17, 5, 11], "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, "faces": {"north": {"uv": [0, 0, 1, 2], "texture": "#1"}, "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "south": {"uv": [0, 0, 1, 2], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "up": {"uv": [0, 0, 1, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#1"}}}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "1": "opensignals:blocks/default/shield_black", + "2": "opensignals:blocks/default/shield_gray", + "particle": "opensignals:blocks/default/shield_black" + }, + "elements": [ + { + "from": [17, 1, 6], + "to": [18, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 2], "texture": "#1"} + } + }, + { + "from": [15, 1, 5], + "to": [17, 5, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 0.5], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 0.5], "texture": "#1"} + } + }, + { + "from": [6, 1, 4], + "to": [15, 5, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, + "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"}, + "down": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"} + } + }, + { + "from": [-3, 1, 2], + "to": [6, 5, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, + "east": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, + "west": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, + "up": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"}, + "down": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"} + } + }, + { + "from": [-3, 1, 11], + "to": [6, 5, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, + "east": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 4.5, 2], "texture": "#2"}, + "west": {"uv": [0, 0, 1.5, 2], "texture": "#2"}, + "up": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"}, + "down": {"uv": [0, 0, 4.5, 1.5], "texture": "#2"} + } + }, + { + "from": [6, 1, 11], + "to": [15, 5, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, + "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 4.5, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"}, + "down": {"uv": [0, 0, 4.5, 0.5], "texture": "#1"} + } + }, + { + "from": [15, 1, 10], + "to": [17, 5, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "east": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 0.5], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 0.5], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json new file mode 100644 index 000000000..121a896e5 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "8": "opensignals:blocks/semaphore/semaphore_lamps1_red"}, "elements": [{"name": "wing1", "from": [-14, 7, 3.5], "to": [18, 11, 4.5], "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "texture": "#4"}, "east": {"uv": [0, 6.5, 0.5, 8.5], "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 180, "texture": "#4"}, "west": {"uv": [15.5, 6.5, 16, 8.5], "texture": "#4"}, "up": {"uv": [0, 6, 16, 6.5], "texture": "#4"}, "down": {"uv": [0, 8.5, 16, 9], "texture": "#4"}}}, {"name": "wing1", "from": [-13, 11, 3.5], "to": [-9, 12, 4.5], "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "up": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "wing1", "from": [-13, 6, 3.5], "to": [-9, 7, 4.5], "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "down": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "shield", "from": [-3.6434, 0.06802, 4.5], "to": [6.3566, 6.06802, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#8"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -112, 0], "color": 0, "children": [{"name": "wing1", "origin": [0, 9, -5.5], "color": 0, "children": [0, 1, 2, {"name": "lamp1", "origin": [-1, 8, -5.5], "color": 0, "children": [3]}]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json new file mode 100644 index 000000000..5d9c6552a --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json @@ -0,0 +1 @@ +{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "9": "opensignals:blocks/semaphore/semaphore_lamps2_dark"}, "elements": [{"name": "wing2", "from": [9, 0, 3.5], "to": [13, 32, 4.5], "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [0, 6, 16, 6.5], "rotation": 90, "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 270, "texture": "#4"}, "west": {"uv": [0, 8.5, 16, 9], "rotation": 90, "texture": "#4"}, "up": {"uv": [15.5, 6.5, 16, 8.5], "rotation": 90, "texture": "#4"}, "down": {"uv": [0, 6.5, 0.5, 8.5], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [13, 27, 3.5], "to": [14, 31, 4.5], "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [8, 27, 3.5], "to": [9, 31, 4.5], "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "rotation": 270, "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "rotation": 90, "texture": "#4"}, "west": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "shield", "from": [-4.42893, 0.32233, 4.5], "to": [5.57107, 6.32233, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#9"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -80, 0], "color": 0, "children": [{"name": "wing2", "origin": [0, 11.5, -3.5], "color": 0, "children": [0, 1, 2, 3]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json b/src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json deleted file mode 100644 index 83080e716..000000000 --- a/src/main/resources/assets/opensignals/signalsystems/railroadgateanimated.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "systemProperties": { - "placementToolName": "signplacementtool", - "canLink": true, - "defaultHeight": 1 - }, - "seProperties": [ - { - "name": "barrier_length", - "enumClass": "RailroadGateLength", - "defaultState": "L1", - "autoname": true, - "changeableStage": "GUISTAGE" - }, - { - "name": "barrier_open", - "defaultState": false, - "changeableStage": "APISTAGE_NONE_CONFIG", - "autoname": true - } - ] -} \ No newline at end of file From 134625e245ea607f61387d6036eda6bd2fab79ff Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 8 Oct 2024 14:13:19 +0200 Subject: [PATCH 17/26] ref: changed to ModelInfoWrapper & fixed problem with 2 animations at the same time --- guilib | 2 +- .../signals/animation/SignalAnimation.java | 7 ++-- .../animation/SignalAnimationHandler.java | 37 +++++++++---------- .../animation/SignalAnimationRotation.java | 16 +++++--- .../animation/SignalAnimationTranslation.java | 16 +++++--- .../signals/parser/PredicateHolder.java | 4 +- .../opensignals/animations/railroadgate.json | 32 ++++++++-------- .../animations/semaphoresignal.json | 20 +++++----- 8 files changed, 71 insertions(+), 63 deletions(-) diff --git a/guilib b/guilib index ad95b16b0..a04db2209 160000 --- a/guilib +++ b/guilib @@ -1 +1 @@ -Subproject commit ad95b16b0d925c52b608c40129913ee907056fb6 +Subproject commit a04db2209664a5ff0e9a485e343881c52db1c827 diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java index 0b7e4e204..a3d0f6cb6 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java @@ -1,11 +1,10 @@ package com.troblecodings.signals.animation; -import java.util.Map; import java.util.function.Predicate; -import com.troblecodings.signals.SEProperty; +import com.troblecodings.signals.models.ModelInfoWrapper; -public interface SignalAnimation extends Predicate> { +public interface SignalAnimation extends Predicate { public void updateAnimation(); @@ -19,4 +18,6 @@ public interface SignalAnimation extends Predicate> { public void setUpAnimationValues(final ModelTranslation currentTranslation); + public SignalAnimation copy(); + } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java index 0f34bafb7..f8638251e 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.stream.Collectors; import com.google.common.collect.Maps; import com.mojang.blaze3d.vertex.VertexConsumer; @@ -15,6 +16,7 @@ import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.core.RenderAnimationInfo; import com.troblecodings.signals.core.SignalAngel; +import com.troblecodings.signals.models.ModelInfoWrapper; import com.troblecodings.signals.models.SignalCustomModel; import com.troblecodings.signals.tileentitys.SignalTileEntity; @@ -40,8 +42,8 @@ public void render(final RenderAnimationInfo info) { final BlockState state = tile.getBlockState(); final SignalAngel angle = state.getValue(Signal.ANGEL); final ModelBlockRenderer renderer = info.dispatcher.getModelRenderer(); - final VertexConsumer vertex = - info.source.getBuffer(ItemBlockRenderTypes.getRenderType(state, false)); + final VertexConsumer vertex = info.source + .getBuffer(ItemBlockRenderTypes.getRenderType(state, false)); final IModelData data = tile.getModelData(); animationPerModel.forEach((model, entry) -> { @@ -77,24 +79,20 @@ private void updateAnimation(final ModelTranslation translation) { public void updateStates(final Map newProperties, final Map oldProperties) { - final Map changedProperties = new HashMap<>(); - newProperties.entrySet().stream().filter(entry -> { - final String oldState = oldProperties.get(entry.getKey()); - return oldState != null && !entry.getValue().equals(oldState); - }).forEach(entry -> changedProperties.put(entry.getKey(), entry.getValue())); - - if (changedProperties.isEmpty()) { - updateToFinalizedAnimations(newProperties); + if (oldProperties.isEmpty()) { + updateToFinalizedAnimations(new ModelInfoWrapper(newProperties)); } else { - updateAnimations(changedProperties); + updateAnimations(new ModelInfoWrapper(newProperties)); } } - private void updateAnimations(final Map changedProperties) { + private void updateAnimations(final ModelInfoWrapper wrapper) { animationPerModel.values().forEach(entry -> { + entry.getKey().setRenderModel(false); for (final SignalAnimation animation : entry.getValue()) { - if (animation.test(changedProperties)) { + if (animation.test(wrapper)) { final ModelTranslation translation = entry.getKey(); + translation.setRenderModel(true); if (translation.isAnimationAssigned()) { final SignalAnimation other = translation.getAssigendAnimation(); other.reset(); @@ -107,10 +105,10 @@ private void updateAnimations(final Map changedProperties) { }); } - private void updateToFinalizedAnimations(final Map newProperties) { + private void updateToFinalizedAnimations(final ModelInfoWrapper wrapper) { animationPerModel.values().forEach((entry) -> { for (final SignalAnimation animation : entry.getValue()) { - if (animation.test(newProperties)) { + if (animation.test(wrapper)) { final ModelTranslation translation = entry.getKey(); translation.setUpNewTranslation(animation.getFinalModelTranslation()); translation.setRenderModel(true); @@ -126,10 +124,11 @@ public void updateAnimationListFromBlock() { map.forEach((entry, animations) -> { final BakedModel model = SignalCustomModel.getModelFromLocation( new ResourceLocation(OpenSignalsMain.MODID, entry.getKey())); - final ModelTranslation translation = - new ModelTranslation(VectorWrapper.ZERO, new Quaternion(0, 0, 0, 0)); - translation.setModelTranslation(entry.getValue()); - animationPerModel.put(model, Maps.immutableEntry(translation, animations)); + final ModelTranslation translation = new ModelTranslation(VectorWrapper.ZERO, + new Quaternion(0, 0, 0, 0)); + translation.setModelTranslation(entry.getValue().copy()); + animationPerModel.put(model, Maps.immutableEntry(translation, animations.stream() + .map(animation -> animation.copy()).collect(Collectors.toList()))); }); } diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index dc361bb2e..eaec529a7 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -1,25 +1,24 @@ package com.troblecodings.signals.animation; -import java.util.Map; import java.util.Objects; import java.util.function.Predicate; import com.mojang.math.Vector3f; import com.troblecodings.core.VectorWrapper; -import com.troblecodings.signals.SEProperty; +import com.troblecodings.signals.models.ModelInfoWrapper; public class SignalAnimationRotation implements SignalAnimation { private AnimationRotionCalc calc; - private final Predicate> predicate; + private final Predicate predicate; private final float animationSpeed; private final RotationAxis axis; private final float rotation; private final VectorWrapper pivot; private final float finalRotationValue; - public SignalAnimationRotation(final Predicate> predicate, + public SignalAnimationRotation(final Predicate predicate, final float animationSpeed, final RotationAxis axis, final float rotation, final VectorWrapper pivot) { this.predicate = predicate; @@ -81,8 +80,13 @@ public void reset() { } @Override - public boolean test(final Map properties) { - return predicate.test(properties); + public boolean test(final ModelInfoWrapper wrapper) { + return predicate.test(wrapper); + } + + @Override + public SignalAnimation copy() { + return new SignalAnimationRotation(predicate, animationSpeed, axis, rotation, pivot); } @Override diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java index 3fa33686a..e11fa0d20 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -1,22 +1,21 @@ package com.troblecodings.signals.animation; -import java.util.Map; import java.util.Objects; import java.util.function.Predicate; import com.troblecodings.core.VectorWrapper; -import com.troblecodings.signals.SEProperty; +import com.troblecodings.signals.models.ModelInfoWrapper; public class SignalAnimationTranslation implements SignalAnimation { private AnimationTranslationCalc calc; - private final Predicate> predicate; + private final Predicate predicate; private String model; private final float animationSpeed; private final VectorWrapper dest; - public SignalAnimationTranslation(Predicate> predicate, + public SignalAnimationTranslation(Predicate predicate, final float animationSpeed, final VectorWrapper dest) { this.predicate = predicate; this.animationSpeed = animationSpeed; @@ -57,8 +56,13 @@ public void reset() { } @Override - public boolean test(final Map properties) { - return predicate.test(properties); + public boolean test(final ModelInfoWrapper wrapper) { + return predicate.test(wrapper); + } + + @Override + public SignalAnimation copy() { + return new SignalAnimationTranslation(predicate, animationSpeed, dest); } @Override diff --git a/src/main/java/com/troblecodings/signals/parser/PredicateHolder.java b/src/main/java/com/troblecodings/signals/parser/PredicateHolder.java index 2fb294b3f..c11ca282f 100644 --- a/src/main/java/com/troblecodings/signals/parser/PredicateHolder.java +++ b/src/main/java/com/troblecodings/signals/parser/PredicateHolder.java @@ -23,8 +23,8 @@ public static Predicate hasNot(final SEProperty property) { @SuppressWarnings("unchecked") public static Predicate with(final ValuePack pack) { return ebs -> { - final Object test = ebs.get(pack.property); - return test != null && pack.predicate.test(test); + final String test = ebs.get(pack.property); + return test != null && pack.predicate.test(test.toUpperCase()); }; } diff --git a/src/main/resources/assets/opensignals/animations/railroadgate.json b/src/main/resources/assets/opensignals/animations/railroadgate.json index b427df0a1..ddf577f9a 100644 --- a/src/main/resources/assets/opensignals/animations/railroadgate.json +++ b/src/main/resources/assets/opensignals/animations/railroadgate.json @@ -6,7 +6,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE)", + "predicate": "with(BARRIER_OPEN.FALSE)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -15,7 +15,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE)", + "predicate": "with(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -31,7 +31,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE)", + "predicate": "with(BARRIER_OPEN.FALSE)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -40,7 +40,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE)", + "predicate": "with(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -56,7 +56,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L1) || config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L1) || with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -65,7 +65,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L1) || config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L1) || with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -81,7 +81,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -90,7 +90,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L2) || config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -106,7 +106,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -115,7 +115,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L3) || config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -131,7 +131,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -140,7 +140,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L4) || config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -156,7 +156,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE) && (config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -165,7 +165,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE) && (config(BARRIER_LENGTH.L5) || config(BARRIER_LENGTH.L6))", + "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, @@ -181,7 +181,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(BARRIER_OPEN.FALSE) && config(BARRIER_LENGTH.L6)", + "predicate": "with(BARRIER_OPEN.FALSE) && with(BARRIER_LENGTH.L6)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -190,7 +190,7 @@ "pivotZ": 0 }, { - "predicate": "config(BARRIER_OPEN.TRUE) && config(BARRIER_LENGTH.L6)", + "predicate": "with(BARRIER_OPEN.TRUE) && with(BARRIER_LENGTH.L6)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 90, diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 0ee496480..f5473c9cb 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -6,7 +6,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(WING1.FALSE) && config(SEMATYPE.MAIN)", + "predicate": "with(WING1.FALSE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -15,7 +15,7 @@ "pivotZ": 0 }, { - "predicate": "config(WING1.TRUE) && config(SEMATYPE.MAIN)", + "predicate": "with(WING1.TRUE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": -45, @@ -31,7 +31,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(WING2.FALSE) && config(SEMATYPE.MAIN)", + "predicate": "with(WING2.FALSE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -40,7 +40,7 @@ "pivotZ": 0 }, { - "predicate": "config(WING2.TRUE) && config(SEMATYPE.MAIN)", + "predicate": "with(WING2.TRUE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 45, @@ -56,7 +56,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(WING1.FALSE) && config(SEMATYPE.MAIN_SMALL)", + "predicate": "with(WING1.FALSE) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -65,7 +65,7 @@ "pivotZ": 0 }, { - "predicate": "config(WING1.TRUE) && config(SEMATYPE.MAIN_SMALL)", + "predicate": "with(WING1.TRUE) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": -45, @@ -81,7 +81,7 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "config(WING2.FALSE) && config(SEMATYPE.MAIN_SMALL)", + "predicate": "with(WING2.FALSE) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 0, @@ -90,7 +90,7 @@ "pivotZ": 0 }, { - "predicate": "config(WING2.TRUE) && config(SEMATYPE.MAIN_SMALL)", + "predicate": "with(WING2.TRUE) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", "rotation": 45, @@ -103,14 +103,14 @@ "semaphore_signals/sema_main_zs3": { "animationConfigs": [ { - "predicate": "!config(ZS3.OFF)" , + "predicate": "!with(ZS3.OFF)" , "mode": "TRANSLATION", "destX": 2, "destY": 2, "destZ": 2 }, { - "predicate": "config(ZS3.OFF)" , + "predicate": "with(ZS3.OFF)" , "mode": "TRANSLATION" } ] From 272b28b6b1325c26325d1cdebe3162058dabccd7 Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 8 Oct 2024 14:43:30 +0200 Subject: [PATCH 18/26] feat: added global pivot --- .../signals/contentpacks/SignalAnimationConfig.java | 8 +++++--- .../signals/contentpacks/SignalAnimationConfigParser.java | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java index 037e309f3..cfa5058fa 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfig.java @@ -16,6 +16,7 @@ public class SignalAnimationConfig { private String mode; private String rotationAxis; private float rotation = 0; + private float pivotX = 0; private float pivotY = 0; private float pivotZ = 0; @@ -24,13 +25,15 @@ public class SignalAnimationConfig { private float destY = 0; private float destZ = 0; - public SignalAnimation createAnimation(final FunctionParsingInfo info) { + public SignalAnimation createAnimation(final FunctionParsingInfo info, + final VectorWrapper pivot) { final AnimationMode mode = AnimationMode.of(this.mode); switch (mode) { case ROTATION: { final RotationAxis axis = RotationAxis.of(rotationAxis); return new SignalAnimationRotation(LogicParser.predicate(predicate, info), - animationSpeed, axis, rotation, new VectorWrapper(pivotX, pivotY, pivotZ)); + animationSpeed, axis, rotation, new VectorWrapper(pivotX + pivot.getX(), + pivotY + pivot.getY(), pivotZ + pivot.getZ())); } case TRANSLATION: { return new SignalAnimationTranslation(LogicParser.predicate(predicate, info), @@ -40,5 +43,4 @@ public SignalAnimation createAnimation(final FunctionParsingInfo info) { return null; } } - } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java index 655c74b92..868d4442a 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java @@ -44,7 +44,8 @@ public static void loadAllAnimations() { configs.translationY, configs.translationZ); final List animatinos = new ArrayList<>(); for (final SignalAnimationConfig config : configs.animationConfigs) { - animatinos.add(config.createAnimation(info)); + animatinos.add(config.createAnimation(info, + new VectorWrapper(configs.pivotX, configs.pivotY, configs.pivotZ))); } if (!animatinos.isEmpty()) modelToAnimation.put(Maps.immutableEntry(modelName, vec), animatinos); @@ -59,6 +60,11 @@ private class ModelAnimationConfig { private float translationX = 0; private float translationY = 0; private float translationZ = 0; + + private float pivotX = 0; + private float pivotY = 0; + private float pivotZ = 0; + private List animationConfigs; } From acf07b3d97c036e1782891b12ed2f7f5caa373ac Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 8 Oct 2024 22:05:54 +0200 Subject: [PATCH 19/26] fix: loading of animation models --- .../signals/models/SignalCustomModel.java | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java index 56d39bb9a..af692a593 100644 --- a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java +++ b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java @@ -23,6 +23,7 @@ import com.mojang.math.Vector3f; import com.mojang.math.Vector4f; import com.troblecodings.signals.OpenSignalsMain; +import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.core.SignalAngel; import net.minecraft.client.Minecraft; @@ -87,15 +88,15 @@ private static void transform(final BakedQuad quad, final Matrix4f quaterion) { private BakedModelPair transform(final SignalModelLoaderInfo info, final ModelBakery bakery, final ResourceLocation location, final Function function, final Map> material, final Quaternion rotation) { - final Transformation transformation = - new Transformation(new Vector3f(info.x, info.y, info.z), null, null, null); + final Transformation transformation = new Transformation( + new Vector3f(info.x, info.y, info.z), null, null, null); final BlockModel blockModel = (BlockModel) info.model; - final ImmutableMap> defaultMap = - ImmutableMap.copyOf(blockModel.textureMap); + final ImmutableMap> defaultMap = ImmutableMap + .copyOf(blockModel.textureMap); info.retexture.forEach((id, texture) -> blockModel.textureMap.computeIfPresent(id, (_u, old) -> material.get(texture))); - final BakedModel model = - info.model.bake(bakery, function, new SimpleModelState(transformation), location); + final BakedModel model = info.model.bake(bakery, function, + new SimpleModelState(transformation), location); blockModel.textureMap.putAll(defaultMap); final Matrix4f reverse = new Matrix4f(); reverse.setIdentity(); @@ -112,13 +113,6 @@ private BakedModelPair transform(final SignalModelLoaderInfo info, final ModelBa model.getQuads(null, direction, RANDOM, EmptyModelData.INSTANCE) .forEach(quad -> transform(quad, matrix)); } - if (angel.equals(SignalAngel.ANGEL0)) { - locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), - info.model.bake(bakery, function, - new SimpleModelState( - new Transformation(Vector3f.ZERO, null, null, null)), - location)); - } return new BakedModelPair(info.state, model); } @@ -145,8 +139,8 @@ public BakedModel bake(final ModelBakery bakery, final ResourceLocation resource) { list.forEach(info -> { if (info.model == null) { - final ResourceLocation location = - new ResourceLocation(OpenSignalsMain.MODID, "block/" + info.name); + final ResourceLocation location = new ResourceLocation(OpenSignalsMain.MODID, + "block/" + info.name); if (bakery instanceof ForgeModelBakery) { info.model = ((ForgeModelBakery) bakery).getModelOrLogError(location, String.format("Could not find %s!", location)); @@ -155,6 +149,7 @@ public BakedModel bake(final ModelBakery bakery, } } }); + loadAnimationModels(bakery, function, resource); final Quaternion quaternion = angel.getQuaternion(); return new SignalBakedModel( list.stream() @@ -163,6 +158,26 @@ public BakedModel bake(final ModelBakery bakery, .collect(Collectors.toUnmodifiableList())); } + private void loadAnimationModels(final ModelBakery bakery, + final Function function, + final ResourceLocation resource) { + if (!angel.equals(SignalAngel.ANGEL0)) + return; + final List modelNames = new ArrayList<>(); + SignalAnimationConfigParser.ALL_ANIMATIONS.values() + .forEach(map -> map.keySet().forEach(entry -> modelNames.add(entry.getKey()))); + for (final String name : modelNames) { + final UnbakedModel unbaked = bakery + .getModel(new ResourceLocation(OpenSignalsMain.MODID, "block/" + name)); + final BakedModel baked = unbaked.bake(bakery, function, + new SimpleModelState(new Transformation(Vector3f.ZERO, null, null, null)), + resource); + final ResourceLocation location = new ResourceLocation(OpenSignalsMain.MODID, name); + if (!locationToModel.containsKey(location)) + locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, name), baked); + } + } + public static BakedModel getModelFromLocation(final ResourceLocation location) { return locationToModel.getOrDefault(location, Minecraft.getInstance().getModelManager().getMissingModel()); From faab190546923b41b1421421e5f888ed573ab154 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 8 Oct 2024 22:19:47 +0200 Subject: [PATCH 20/26] ref: update animation models --- .../signals/animation/ModelTranslation.java | 4 +- .../opensignals/animations/railroadgate.json | 104 +++++++----------- .../animations/semaphoresignal.json | 75 ++++--------- .../assets/opensignals/animations/shmech.json | 60 ++++++++++ .../modeldefinitions/railroadgate.json | 90 --------------- .../modeldefinitions/semaphoresignal.json | 48 -------- .../opensignals/modeldefinitions/shmech.json | 36 +----- .../opensignals/models/block/sh/sh_mech.json | 49 +++++++++ .../models/block/sh/sh_mech_sh.json | 27 +++++ .../models/block/sh/sh_mech_sh_high.json | 27 +++++ .../opensignals/signalsystems/shmech.json | 8 -- 11 files changed, 235 insertions(+), 293 deletions(-) create mode 100644 src/main/resources/assets/opensignals/animations/shmech.json create mode 100644 src/main/resources/assets/opensignals/models/block/sh/sh_mech.json create mode 100644 src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json create mode 100644 src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index 6634a34e0..65fe43db0 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -26,7 +26,7 @@ public ModelTranslation(final VectorWrapper translation) { public void translate(final RenderAnimationInfo info) { info.stack.translate(modelTranslation.getX() - 0.5f, modelTranslation.getY() - 0.5f, - modelTranslation.getZ() - 0.5f); // Modell verschieben + modelTranslation.getZ() - 0.5f); if (!quaternion.equals(Quaternion.ONE)) { info.stack.mulPose(quaternion); @@ -35,7 +35,7 @@ public void translate(final RenderAnimationInfo info) { info.stack.translate(translation.getX(), translation.getY(), translation.getZ()); } info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), - pivotTranslation.getZ()); // Pivot Punkt + pivotTranslation.getZ()); } public Quaternion getQuaternion() { diff --git a/src/main/resources/assets/opensignals/animations/railroadgate.json b/src/main/resources/assets/opensignals/animations/railroadgate.json index ddf577f9a..a27a19bbd 100644 --- a/src/main/resources/assets/opensignals/animations/railroadgate.json +++ b/src/main/resources/assets/opensignals/animations/railroadgate.json @@ -4,24 +4,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": -0.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": -0.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": -0.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -29,24 +26,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 0.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 0.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 0.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -54,24 +48,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 1.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L1) || with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 1.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L1) || with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 1.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -79,24 +70,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 2.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 2.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 2.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -104,24 +92,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 3.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 3.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 3.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -129,24 +114,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 4.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 4.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 4.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -154,24 +136,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 5.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE) && (with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 5.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE) && (with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 5.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] }, @@ -179,24 +158,21 @@ "translationX": 0.5, "translationY": 1.1875, "translationZ": 0, + "pivotX": 6.5, + "pivotY": -0.1875, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(BARRIER_OPEN.FALSE) && with(BARRIER_LENGTH.L6)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": 6.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(BARRIER_OPEN.TRUE) && with(BARRIER_LENGTH.L6)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 90, - "pivotX": 6.5, - "pivotY": -0.1875, - "pivotZ": 0 + "rotation": 90 } ] } diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index f5473c9cb..362bf1879 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -4,24 +4,21 @@ "translationX": 0.6875, "translationY": 7.5625, "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(WING1.FALSE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(WING1.TRUE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": -45, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": -45 } ] }, @@ -29,24 +26,21 @@ "translationX": 0.6875, "translationY": 5.5625, "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, "animationConfigs": [ { "predicate": "with(WING2.FALSE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": 0 }, { "predicate": "with(WING2.TRUE) && with(SEMATYPE.MAIN)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 45, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": 45 } ] }, @@ -54,24 +48,21 @@ "translationX": 0.6875, "translationY": 4.5625, "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, "animationConfigs": [ { - "predicate": "with(WING1.FALSE) && with(SEMATYPE.MAIN_SMALL)", + "predicate": "!hasandis(WING1) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": 0 }, { - "predicate": "with(WING1.TRUE) && with(SEMATYPE.MAIN_SMALL)", + "predicate": "hasandis(WING1) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": -45, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": -45 } ] }, @@ -79,39 +70,21 @@ "translationX": 0.6875, "translationY": 2.5625, "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, "animationConfigs": [ { - "predicate": "with(WING2.FALSE) && with(SEMATYPE.MAIN_SMALL)", + "predicate": "!hasandis(WING2) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 0, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 + "rotation": 0 }, { - "predicate": "with(WING2.TRUE) && with(SEMATYPE.MAIN_SMALL)", + "predicate": "hasandis(WING2) && with(SEMATYPE.MAIN_SMALL)", "mode": "ROTATION", "rotationAxis": "Z", - "rotation": 45, - "pivotX": -0.6875, - "pivotY": -0.5625, - "pivotZ": 0 - } - ] - }, - "semaphore_signals/sema_main_zs3": { - "animationConfigs": [ - { - "predicate": "!with(ZS3.OFF)" , - "mode": "TRANSLATION", - "destX": 2, - "destY": 2, - "destZ": 2 - }, - { - "predicate": "with(ZS3.OFF)" , - "mode": "TRANSLATION" + "rotation": 45 } ] } diff --git a/src/main/resources/assets/opensignals/animations/shmech.json b/src/main/resources/assets/opensignals/animations/shmech.json new file mode 100644 index 000000000..e61b838aa --- /dev/null +++ b/src/main/resources/assets/opensignals/animations/shmech.json @@ -0,0 +1,60 @@ +{ + "animations": { + "sh/sh_mech_sh": { + "translationX": 0.5, + "translationY": 0.4375, + "translationZ": 0, + "pivotX": -0.5, + "pivotY": -0.4375, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "with(SH_MECH.SH0) && hasandisnot(sh_high)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0 + }, + { + "predicate": "with(SH_MECH.SH1) && hasandisnot(sh_high)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -45 + }, + { + "predicate": "with(SH_MECH.SH1_GSP2) && hasandisnot(sh_high)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -90 + } + ] + }, + "sh/sh_mech_sh_high": { + "translationX": 0.5, + "translationY": 2.4375, + "translationZ": 0, + "pivotX": -0.5, + "pivotY": -0.4375, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "with(SH_MECH.SH0) && hasandis(sh_high)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0 + }, + { + "predicate": "with(SH_MECH.SH1) && hasandis(sh_high)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -45 + }, + { + "predicate": "with(SH_MECH.SH1_GSP2) && hasandis(sh_high)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -90 + } + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/modeldefinitions/railroadgate.json b/src/main/resources/assets/opensignals/modeldefinitions/railroadgate.json index 2192f0289..4e500cffb 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/railroadgate.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/railroadgate.json @@ -6,96 +6,6 @@ {} ], "y": 0 - }, - "railroad_gate/barrier_base_top": { - "textures": [ - { - "blockstate": "hasandisnot(BARRIER_OPEN)" - } - ], - "y": 1 - }, - "railroad_gate/barrier_base_top_open": { - "textures": [ - { - "blockstate": "hasandis(BARRIER_OPEN)" - } - ], - "y": 1 - }, - "railroad_gate/barrier_1": { - "textures": [ - { - "blockstate": "hasandisnot(BARRIER_OPEN)" - } - ], - "y": 1, - "x": 1 - }, - "railroad_gate/barrier_2": { - "textures": [ - { - "blockstate": "hasandisnot(BARRIER_OPEN) && (with(BARRIER_LENGTH.L1) || with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))" - }, - { - "blockstate": "hasandisnot(BARRIER_OPEN) && (with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "x": 1 - }, - { - "blockstate": "hasandisnot(BARRIER_OPEN) && (with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "x": 2 - }, - { - "blockstate": "hasandisnot(BARRIER_OPEN) && (with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "x": 3 - }, - { - "blockstate": "hasandisnot(BARRIER_OPEN) && (with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "x": 4 - }, - { - "blockstate": "hasandisnot(BARRIER_OPEN) && with(BARRIER_LENGTH.L6)", - "x": 5 - } - ], - "y": 1, - "x": 2 - }, - "railroad_gate/barrier_1_open": { - "textures": [ - { - "blockstate": "hasandis(BARRIER_OPEN)" - } - ], - "y": 2 - }, - "railroad_gate/barrier_2_open": { - "textures": [ - { - "blockstate": "hasandis(BARRIER_OPEN) && (with(BARRIER_LENGTH.L1) || with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))" - }, - { - "blockstate": "hasandis(BARRIER_OPEN) && (with(BARRIER_LENGTH.L2) || with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "y": 1 - }, - { - "blockstate": "hasandis(BARRIER_OPEN) && (with(BARRIER_LENGTH.L3) || with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "y": 2 - }, - { - "blockstate": "hasandis(BARRIER_OPEN) && (with(BARRIER_LENGTH.L4) || with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "y": 3 - }, - { - "blockstate": "hasandis(BARRIER_OPEN) && (with(BARRIER_LENGTH.L5) || with(BARRIER_LENGTH.L6))", - "y": 4 - }, - { - "blockstate": "hasandis(BARRIER_OPEN) && with(BARRIER_LENGTH.L6)", - "y": 5 - } - ], - "y": 3 } } } \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json index b59bb403a..eb36fb3c7 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json @@ -312,54 +312,6 @@ "y": 0, "x": -1 }, - "semaphore_signals/sema_main_wing1": { - "textures": [ - { - "blockstate": "with(SEMATYPE.MAIN) && hasandisnot(WING1)" - }, - { - "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandisnot(WING1)", - "y": -3 - } - ], - "y": 7 - }, - "semaphore_signals/sema_main_wing1_on": { - "textures": [ - { - "blockstate": "with(SEMATYPE.MAIN) && hasandis(WING1)" - }, - { - "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(WING1)", - "y": -3 - } - ], - "y": 7 - }, - "semaphore_signals/sema_main_wing2": { - "textures": [ - { - "blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2) && hasandisnot(WING2)" - }, - { - "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2) && hasandisnot(WING2)", - "y": -3 - } - ], - "y": 5 - }, - "semaphore_signals/sema_main_wing2_on": { - "textures": [ - { - "blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2) && hasandis(WING2)" - }, - { - "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2) && hasandis(WING2)", - "y": -3 - } - ], - "y": 5 - }, "semaphore_signals/sema_distant_base": { "textures": [ { diff --git a/src/main/resources/assets/opensignals/modeldefinitions/shmech.json b/src/main/resources/assets/opensignals/modeldefinitions/shmech.json index 8e1ec656b..e6034f918 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/shmech.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/shmech.json @@ -13,49 +13,25 @@ ], "y": 0 }, - "sh/sh0_mech": { - "textures": [ - { - "blockstate": "with(SH_MECH.SH0) && hasandisnot(sh_high)" - }, - { - "blockstate": "with(SH_MECH.SH0) && hasandis(sh_high)", - "y": 2 - } - ], - "y": 0 - }, - "sh/sh1_mech": { - "textures": [ - { - "blockstate": "with(SH_MECH.SH1) && hasandisnot(sh_high)" - }, - { - "blockstate": "with(SH_MECH.SH1) && hasandis(sh_high)", - "y": 2 - } - ], - "y": 0 - }, - "sh/sh1_gsp2_mech": { + "sh/sh_mech_number": { "textures": [ { - "blockstate": "with(SH_MECH.SH1_GSP2) && hasandisnot(sh_high)" + "blockstate": "hasandis(CUSTOMNAME) && hasandisnot(sh_high)" }, { - "blockstate": "with(SH_MECH.SH1_GSP2) && hasandis(sh_high)", + "blockstate": "hasandis(CUSTOMNAME) && hasandis(sh_high)", "y": 2 } ], "y": 0 }, - "sh/sh_mech_number": { + "sh/sh_mech": { "textures": [ { - "blockstate": "hasandis(CUSTOMNAME) && hasandisnot(sh_high)" + "blockstate": "hasandisnot(sh_high)" }, { - "blockstate": "hasandis(CUSTOMNAME) && hasandis(sh_high)", + "blockstate": "hasandis(sh_high)", "y": 2 } ], diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json b/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json new file mode 100644 index 000000000..4aacb2be6 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json @@ -0,0 +1,49 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/shield_black", + "1": "opensignals:blocks/default/mast", + "particle": "opensignals:blocks/default/shield_black" + }, + "elements": [ + { + "name": "body", + "from": [3, 2, 5], + "to": [13, 12, 11], + "faces": { + "north": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#0"}, + "south": {"uv": [0, 0, 5, 5], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 5], "texture": "#0"}, + "up": {"uv": [0, 0, 5, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 5, 3], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [7, 0, 7], + "to": [9, 2, 9], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "body", + "origin": [8, 7, 5], + "color": 0, + "children": [0, 1] + }, + { + "name": "sh", + "origin": [8, 7, 5], + "color": 0, + "children": [] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json new file mode 100644 index 000000000..766c37523 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json @@ -0,0 +1,27 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "2": "opensignals:blocks/sh/sh", + "particle": "opensignals:blocks/sh/sh" + }, + "elements": [ + { + "name": "sh", + "from": [4, 3, 4.9], + "to": [12, 11, 4.9], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 7, 5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ], + "groups": [ + { + "name": "sh", + "origin": [8, 7, 5], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json new file mode 100644 index 000000000..766c37523 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json @@ -0,0 +1,27 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "2": "opensignals:blocks/sh/sh", + "particle": "opensignals:blocks/sh/sh" + }, + "elements": [ + { + "name": "sh", + "from": [4, 3, 4.9], + "to": [12, 11, 4.9], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 7, 5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ], + "groups": [ + { + "name": "sh", + "origin": [8, 7, 5], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/signalsystems/shmech.json b/src/main/resources/assets/opensignals/signalsystems/shmech.json index 3cbc27c49..2cc15f1ee 100644 --- a/src/main/resources/assets/opensignals/signalsystems/shmech.json +++ b/src/main/resources/assets/opensignals/signalsystems/shmech.json @@ -12,9 +12,6 @@ }, "signalHeights": { "config(SH_HIGH.TRUE)": 2 - }, - "animate": { - "config(ANIMATE.TRUE)": true } }, "seProperties": [ @@ -29,11 +26,6 @@ "name": "sh_high", "defaultState": false, "changeableStage": "GUISTAGE" - }, - { - "name": "animate", - "defaultState": false, - "changeableStage": "APISTAGE_NONE_CONFIG" } ] } \ No newline at end of file From d71d29b07e729c04782648a640d8cb7e50db0e72 Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 8 Oct 2024 23:11:42 +0200 Subject: [PATCH 21/26] fix: problems with models in animation --- .../SignalAnimationConfigParser.java | 2 ++ .../signals/models/CustomModelLoader.java | 11 ++++++++ .../signals/models/SignalCustomModel.java | 26 +++---------------- .../signals/models/SignalModelLoaderInfo.java | 5 ++-- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java index 868d4442a..5b1900ace 100644 --- a/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java +++ b/src/main/java/com/troblecodings/signals/contentpacks/SignalAnimationConfigParser.java @@ -24,6 +24,8 @@ public class SignalAnimationConfigParser { ALL_ANIMATIONS = new HashMap<>(); public static void loadAllAnimations() { + if (!ALL_ANIMATIONS.isEmpty()) + return; OpenSignalsMain.contentPacks.getFiles("animations").forEach(entry -> { final String signalName = entry.getKey().replace(".json", "").toLowerCase(); final Signal signal = Signal.SIGNALS.get(signalName); diff --git a/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java b/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java index f984180db..7595dbe04 100644 --- a/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java +++ b/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java @@ -7,8 +7,11 @@ import java.util.Map.Entry; import java.util.function.Predicate; +import com.troblecodings.core.VectorWrapper; import com.troblecodings.signals.OpenSignalsMain; +import com.troblecodings.signals.animation.SignalAnimation; import com.troblecodings.signals.blocks.Signal; +import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.core.SignalAngel; import com.troblecodings.signals.parser.FunctionParsingInfo; import com.troblecodings.signals.parser.LogicParser; @@ -211,6 +214,14 @@ public void onResourceManagerReload(final ResourceManager manager) { } } } + SignalAnimationConfigParser.loadAllAnimations(); + final Map, List> animations = // + SignalAnimationConfigParser.ALL_ANIMATIONS.get(signaltype); + if (animations != null) { + animations.keySet().forEach( + entry -> accumulator.add(new SignalModelLoaderInfo(entry.getKey(), + predicate -> false, 0, 0, 0, new HashMap<>()).setOnAnimation())); + } registeredModels.put(lowercaseName, accumulator); } } diff --git a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java index af692a593..03acef81c 100644 --- a/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java +++ b/src/main/java/com/troblecodings/signals/models/SignalCustomModel.java @@ -23,7 +23,6 @@ import com.mojang.math.Vector3f; import com.mojang.math.Vector4f; import com.troblecodings.signals.OpenSignalsMain; -import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.core.SignalAngel; import net.minecraft.client.Minecraft; @@ -113,6 +112,10 @@ private BakedModelPair transform(final SignalModelLoaderInfo info, final ModelBa model.getQuads(null, direction, RANDOM, EmptyModelData.INSTANCE) .forEach(quad -> transform(quad, matrix)); } + + if (angel.equals(SignalAngel.ANGEL0) && info.isAnimation) { + locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, info.name), model); + } return new BakedModelPair(info.state, model); } @@ -149,7 +152,6 @@ public BakedModel bake(final ModelBakery bakery, } } }); - loadAnimationModels(bakery, function, resource); final Quaternion quaternion = angel.getQuaternion(); return new SignalBakedModel( list.stream() @@ -158,26 +160,6 @@ public BakedModel bake(final ModelBakery bakery, .collect(Collectors.toUnmodifiableList())); } - private void loadAnimationModels(final ModelBakery bakery, - final Function function, - final ResourceLocation resource) { - if (!angel.equals(SignalAngel.ANGEL0)) - return; - final List modelNames = new ArrayList<>(); - SignalAnimationConfigParser.ALL_ANIMATIONS.values() - .forEach(map -> map.keySet().forEach(entry -> modelNames.add(entry.getKey()))); - for (final String name : modelNames) { - final UnbakedModel unbaked = bakery - .getModel(new ResourceLocation(OpenSignalsMain.MODID, "block/" + name)); - final BakedModel baked = unbaked.bake(bakery, function, - new SimpleModelState(new Transformation(Vector3f.ZERO, null, null, null)), - resource); - final ResourceLocation location = new ResourceLocation(OpenSignalsMain.MODID, name); - if (!locationToModel.containsKey(location)) - locationToModel.put(new ResourceLocation(OpenSignalsMain.MODID, name), baked); - } - } - public static BakedModel getModelFromLocation(final ResourceLocation location) { return locationToModel.getOrDefault(location, Minecraft.getInstance().getModelManager().getMissingModel()); diff --git a/src/main/java/com/troblecodings/signals/models/SignalModelLoaderInfo.java b/src/main/java/com/troblecodings/signals/models/SignalModelLoaderInfo.java index 74cae0857..2345b7fa5 100644 --- a/src/main/java/com/troblecodings/signals/models/SignalModelLoaderInfo.java +++ b/src/main/java/com/troblecodings/signals/models/SignalModelLoaderInfo.java @@ -16,6 +16,7 @@ public class SignalModelLoaderInfo { public final float y; public final float z; public final Map retexture; + public boolean isAnimation = false; public UnbakedModel model; public SignalModelLoaderInfo(final String name, final Predicate state, @@ -28,8 +29,8 @@ public SignalModelLoaderInfo(final String name, final Predicate Date: Tue, 8 Oct 2024 23:25:23 +0200 Subject: [PATCH 22/26] ref: add semaphore distant animation --- .../animations/semaphoresignal.json | 44 +++++++++++++++++++ .../modeldefinitions/semaphoresignal.json | 40 ----------------- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 362bf1879..89cd92cd7 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -87,6 +87,50 @@ "rotation": 45 } ] + }, + "semaphore_signals/sema_distant_plate_on": { + "translationX": 0, + "translationY": 3.875, + "translationZ": 0.59375, + "pivotX": 0, + "pivotY": 0.125, + "pivotZ": -0.59375, + "animationConfigs": [ + { + "predicate": "with(SEMATYPE.DIST) && !with(SEMAVR.VR1)", + "mode": "ROTATION", + "rotationAxis": "X", + "rotation": 0 + }, + { + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)", + "mode": "ROTATION", + "rotationAxis": "X", + "rotation": 90 + } + ] + }, + "semaphore_signals/sema_distant_vr0": { + "translationX": 0.5, + "translationY": 2.5, + "translationZ": 0, + "pivotX": -0.5, + "pivotY": -0.5, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "with(SEMATYPE.DIST) && !with(SEMAVR.VR2)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": 0 + }, + { + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)", + "mode": "ROTATION", + "rotationAxis": "Z", + "rotation": -45 + } + ] } } } \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json index eb36fb3c7..f4669c1f1 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json @@ -344,46 +344,6 @@ ], "y": 3 }, - "semaphore_signals/sema_distant_plate_off": { - "textures": [ - { - "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)" - } - ], - "y": 4 - }, - "semaphore_signals/sema_distant_plate_on": { - "textures": [ - { - "blockstate": "with(SEMATYPE.DIST) && !with(SEMAVR.VR1)" - } - ], - "y": 4 - }, - "semaphore_signals/sema_distant_vr0": { - "textures": [ - { - "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR0)" - } - ], - "y": 2 - }, - "semaphore_signals/sema_distant_vr1": { - "textures": [ - { - "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)" - } - ], - "y": 2 - }, - "semaphore_signals/sema_distant_vr2": { - "textures": [ - { - "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)" - } - ], - "y": 2 - }, "semaphore_signals/sema_distant_ne2_2": { "textures": [ { From 107f42fed630b5909aafef66706a33da78d3dff6 Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 10 Oct 2024 00:04:24 +0200 Subject: [PATCH 23/26] fix: issue with wrong things showed in SignalController --- guilib | 2 +- .../signals/animation/ModelTranslation.java | 13 ++--- .../signals/animation/SignalAnimation.java | 2 + .../animation/SignalAnimationHandler.java | 2 +- .../animation/SignalAnimationRotation.java | 5 ++ .../animation/SignalAnimationTranslation.java | 5 ++ .../signals/guis/PreviewSideBar.java | 56 ++++++++++++++++++- .../signals/models/CustomModelLoader.java | 7 ++- 8 files changed, 77 insertions(+), 15 deletions(-) diff --git a/guilib b/guilib index a04db2209..fc3cddac8 160000 --- a/guilib +++ b/guilib @@ -1 +1 @@ -Subproject commit a04db2209664a5ff0e9a485e343881c52db1c827 +Subproject commit fc3cddac8dc8f06b13c542787ba138a1865e1033 diff --git a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java index 65fe43db0..a4f9edff5 100644 --- a/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/ModelTranslation.java @@ -2,9 +2,9 @@ import java.util.Objects; +import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Quaternion; import com.troblecodings.core.VectorWrapper; -import com.troblecodings.signals.core.RenderAnimationInfo; public class ModelTranslation { @@ -24,18 +24,17 @@ public ModelTranslation(final VectorWrapper translation) { this.translation = translation; } - public void translate(final RenderAnimationInfo info) { - info.stack.translate(modelTranslation.getX() - 0.5f, modelTranslation.getY() - 0.5f, + public void translate(final PoseStack stack) { + stack.translate(modelTranslation.getX() - 0.5f, modelTranslation.getY() - 0.5f, modelTranslation.getZ() - 0.5f); if (!quaternion.equals(Quaternion.ONE)) { - info.stack.mulPose(quaternion); + stack.mulPose(quaternion); } if (!translation.equals(VectorWrapper.ZERO)) { - info.stack.translate(translation.getX(), translation.getY(), translation.getZ()); + stack.translate(translation.getX(), translation.getY(), translation.getZ()); } - info.stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), - pivotTranslation.getZ()); + stack.translate(pivotTranslation.getX(), pivotTranslation.getY(), pivotTranslation.getZ()); } public Quaternion getQuaternion() { diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java index a3d0f6cb6..766e2a737 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimation.java @@ -20,4 +20,6 @@ public interface SignalAnimation extends Predicate { public SignalAnimation copy(); + public Predicate getPredicate(); + } \ No newline at end of file diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java index f8638251e..28abe954a 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -54,7 +54,7 @@ public void render(final RenderAnimationInfo info) { info.stack.pushPose(); info.stack.translate(0.5f, 0.5f, 0.5f); info.stack.mulPose(angle.getQuaternion()); - translation.translate(info); + translation.translate(info.stack); renderer.renderModel(info.stack.last(), vertex, state, model, 0, 0, 0, info.lightColor, info.overlayTexture, data); info.stack.popPose(); diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java index eaec529a7..0cb82a609 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationRotation.java @@ -89,6 +89,11 @@ public SignalAnimation copy() { return new SignalAnimationRotation(predicate, animationSpeed, axis, rotation, pivot); } + @Override + public Predicate getPredicate() { + return predicate; + } + @Override public int hashCode() { return Objects.hash(animationSpeed, axis, pivot, calc, rotation); diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java index e11fa0d20..31061e6b9 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationTranslation.java @@ -65,6 +65,11 @@ public SignalAnimation copy() { return new SignalAnimationTranslation(predicate, animationSpeed, dest); } + @Override + public Predicate getPredicate() { + return predicate; + } + @Override public int hashCode() { return Objects.hash(animationSpeed, dest, model); diff --git a/src/main/java/com/troblecodings/signals/guis/PreviewSideBar.java b/src/main/java/com/troblecodings/signals/guis/PreviewSideBar.java index c4a827846..a4e0351de 100644 --- a/src/main/java/com/troblecodings/signals/guis/PreviewSideBar.java +++ b/src/main/java/com/troblecodings/signals/guis/PreviewSideBar.java @@ -1,28 +1,45 @@ package com.troblecodings.signals.guis; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import java.util.function.Predicate; import com.mojang.math.Quaternion; +import com.troblecodings.core.VectorWrapper; import com.troblecodings.guilib.ecs.entitys.UIBlockRender; import com.troblecodings.guilib.ecs.entitys.UIBlockRenderInfo; import com.troblecodings.guilib.ecs.entitys.UIEntity; +import com.troblecodings.guilib.ecs.entitys.UIMultiBlockRender; import com.troblecodings.guilib.ecs.entitys.input.UIDrag; import com.troblecodings.guilib.ecs.entitys.render.UIColor; import com.troblecodings.guilib.ecs.entitys.render.UIScissor; +import com.troblecodings.signals.OpenSignalsMain; import com.troblecodings.signals.SEProperty; +import com.troblecodings.signals.animation.ModelTranslation; +import com.troblecodings.signals.animation.SignalAnimation; import com.troblecodings.signals.blocks.Signal; +import com.troblecodings.signals.contentpacks.SignalAnimationConfigParser; import com.troblecodings.signals.enums.ChangeableStage; import com.troblecodings.signals.models.ModelInfoWrapper; +import com.troblecodings.signals.models.SignalCustomModel; + +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.resources.ResourceLocation; public class PreviewSideBar { public static final float MODIFIER = 0.1f; - private final UIBlockRender blockRender; + private UIBlockRender blockRender; private final Map properties = new HashMap<>(); private final UIEntity blockRenderEntity = new UIEntity(); + private final float height; + private final List animationInfos = new ArrayList<>(); public PreviewSideBar(final float height) { + this.height = height; blockRender = new UIBlockRender(20, height); blockRenderEntity.setInheritHeight(true); blockRenderEntity.setWidth(60); @@ -69,8 +86,41 @@ public void clear() { properties.clear(); } + private void buildRenderListForAnimations(final Signal signal, final ModelInfoWrapper wrapper) { + animationInfos.clear(); + final Map, List> // + map = SignalAnimationConfigParser.ALL_ANIMATIONS.get(signal); + map.forEach((entry, list) -> { + for (final SignalAnimation animation : list) { + final Predicate predicate = animation.getPredicate(); + final ModelTranslation modelTranslation = animation.getFinalModelTranslation(); + modelTranslation.setModelTranslation(entry.getValue().copy()); + + final BakedModel model = SignalCustomModel.getModelFromLocation( + new ResourceLocation(OpenSignalsMain.MODID, entry.getKey())); + + final UIBlockRenderInfo info = new UIBlockRenderInfo(model, + signal.defaultBlockState(), wrapper, new VectorWrapper(0.5f, 0.5f, 0.5f)); + info.predicate = p -> predicate.test(wrapper); + info.consumer = d -> { + modelTranslation.translate(d.stack); + }; + animationInfos.add(info); + } + }); + } + public void update(final Signal signal) { - blockRender.setBlockState(new UIBlockRenderInfo(signal.defaultBlockState(), - new ModelInfoWrapper(properties))); + final ModelInfoWrapper wrapper = new ModelInfoWrapper(properties); + blockRenderEntity.remove(blockRender); + if (signal.hasAnimation()) { + buildRenderListForAnimations(signal, wrapper); + blockRender = new UIMultiBlockRender(20, height); + animationInfos.forEach(blockRender::setBlockState); + } else { + blockRender = new UIBlockRender(20, height); + } + blockRender.setBlockState(new UIBlockRenderInfo(signal.defaultBlockState(), wrapper)); + blockRenderEntity.add(blockRender); } } diff --git a/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java b/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java index 7595dbe04..551c67f85 100644 --- a/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java +++ b/src/main/java/com/troblecodings/signals/models/CustomModelLoader.java @@ -218,9 +218,10 @@ public void onResourceManagerReload(final ResourceManager manager) { final Map, List> animations = // SignalAnimationConfigParser.ALL_ANIMATIONS.get(signaltype); if (animations != null) { - animations.keySet().forEach( - entry -> accumulator.add(new SignalModelLoaderInfo(entry.getKey(), - predicate -> false, 0, 0, 0, new HashMap<>()).setOnAnimation())); + animations.keySet() + .forEach(entry -> accumulator.add( + new SignalModelLoaderInfo(entry.getKey(), predicate -> false, 0, + 0, 0, new HashMap<>()).setOnAnimation())); } registeredModels.put(lowercaseName, accumulator); } From df9a787a904bade63a7805ae24f10e09b665105d Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 10 Oct 2024 00:22:35 +0200 Subject: [PATCH 24/26] fix: issue in guilib --- guilib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilib b/guilib index fc3cddac8..a423b2d10 160000 --- a/guilib +++ b/guilib @@ -1 +1 @@ -Subproject commit fc3cddac8dc8f06b13c542787ba138a1865e1033 +Subproject commit a423b2d10248c20129b3bdea04453e1ed0540f50 From 04828d7de0d38319978024e5639aa4a0ed034786 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 4 Nov 2024 23:18:49 +0100 Subject: [PATCH 25/26] ref: rework semaphore dist lamps --- .../animations/semaphoresignal.json | 42 ++++++- .../modeldefinitions/semaphoresignal.json | 22 +++- .../semaphore_signals/sema_distant_arrow.json | 75 +++++++++++ .../semaphore_signals/sema_distant_lamp1.json | 39 ++++++ .../semaphore_signals/sema_distant_lamp2.json | 52 ++++++++ .../semaphore_signals/sema_distant_lamps.json | 1 - .../semaphore_signals/sema_distant_mast2.json | 118 +++++++++++++++++- ..._plate_on.json => sema_distant_plate.json} | 0 .../sema_distant_plate_off.json | 1 - .../semaphore_signals/sema_distant_vr0.json | 1 - .../semaphore_signals/sema_distant_vr1.json | 1 - .../semaphore_signals/sema_distant_vr2.json | 1 - .../opensignals/models/block/sh/sh0_mech.json | 1 - .../models/block/sh/sh1_gsp2_mech.json | 1 - .../opensignals/models/block/sh/sh1_mech.json | 1 - .../opensignals/models/block/sh/sh_mech.json | 3 +- .../models/block/sh/sh_mech_sh.json | 4 +- .../models/block/sh/sh_mech_sh_high.json | 4 +- .../textures/blocks/semaphore/lamp_green.png | Bin 0 -> 4321 bytes .../blocks/semaphore/lamp_green_e.png | Bin 0 -> 4308 bytes .../textures/blocks/semaphore/lamp_red.png | Bin 0 -> 4321 bytes .../textures/blocks/semaphore/lamp_red_e.png | Bin 0 -> 4307 bytes .../textures/blocks/semaphore/lamp_yellow.png | Bin 0 -> 4321 bytes .../blocks/semaphore/lamp_yellow_e.png | Bin 0 -> 4308 bytes .../blocks/semaphore/lamps_shield_off.png | Bin 0 -> 5202 bytes .../semaphore/semaphore_lamps1_green.png | Bin 340 -> 0 bytes .../semaphore/semaphore_lamps1_green_e.png | Bin 340 -> 0 bytes .../blocks/semaphore/semaphore_lamps1_red.png | Bin 340 -> 0 bytes .../semaphore/semaphore_lamps1_red_e.png | Bin 340 -> 0 bytes .../blocks/semaphore/semaphore_lamps2.png | Bin 331 -> 0 bytes .../semaphore/semaphore_lamps2_dark.png | Bin 331 -> 0 bytes .../blocks/semaphore/semaphore_lamps2_e.png | Bin 331 -> 0 bytes .../semaphore/semaphore_lamps3_green.png | Bin 340 -> 0 bytes .../semaphore/semaphore_lamps3_green_e.png | Bin 340 -> 0 bytes .../semaphore/semaphore_lamps3_yellow.png | Bin 340 -> 0 bytes .../semaphore/semaphore_lamps3_yellow_e.png | Bin 340 -> 0 bytes .../opensignals/textures/blocks/sh/sh.png | Bin 351 -> 4195 bytes .../opensignals/textures/blocks/sh/sh_e.png | Bin 351 -> 0 bytes .../textures/blocks/sh/shield_mech.png | Bin 0 -> 4213 bytes .../textures/blocks/sh/shield_mech_e.png | Bin 0 -> 4237 bytes 40 files changed, 347 insertions(+), 20 deletions(-) create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_arrow.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamps.json rename src/main/resources/assets/opensignals/models/block/semaphore_signals/{sema_distant_plate_on.json => sema_distant_plate.json} (100%) delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate_off.json delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr0.json delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr1.json delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr2.json delete mode 100644 src/main/resources/assets/opensignals/models/block/sh/sh0_mech.json delete mode 100644 src/main/resources/assets/opensignals/models/block/sh/sh1_gsp2_mech.json delete mode 100644 src/main/resources/assets/opensignals/models/block/sh/sh1_mech.json create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_green.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_green_e.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red_e.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow_e.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamps_shield_off.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_green.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_green_e.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_red.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_red_e.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2_dark.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2_e.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_green.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_green_e.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_yellow.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_yellow_e.png delete mode 100644 src/main/resources/assets/opensignals/textures/blocks/sh/sh_e.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/sh/shield_mech.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/sh/shield_mech_e.png diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 89cd92cd7..12d3b6d8e 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -88,7 +88,7 @@ } ] }, - "semaphore_signals/sema_distant_plate_on": { + "semaphore_signals/sema_distant_plate": { "translationX": 0, "translationY": 3.875, "translationZ": 0.59375, @@ -110,7 +110,7 @@ } ] }, - "semaphore_signals/sema_distant_vr0": { + "semaphore_signals/sema_distant_arrow": { "translationX": 0.5, "translationY": 2.5, "translationZ": 0, @@ -131,6 +131,44 @@ "rotation": -45 } ] + }, + "semaphore_signals/sema_distant_lamp1": { + "translationX": 0, + "translationY": 2, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "with(SEMATYPE.DIST) && (with(SEMAVR.VR0) || with(SEMAVR.VR2))", + "mode": "TRANSLATION", + "animationSpeed": 0.25, + "destY": 0 + }, + { + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)", + "mode": "TRANSLATION", + "animationSpeed": 0.25, + "destY": -0.25 + } + ] + }, + "semaphore_signals/sema_distant_lamp2": { + "translationX": 0, + "translationY": 2, + "translationZ": 0, + "animationConfigs": [ + { + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR0)", + "mode": "TRANSLATION", + "animationSpeed": 0.25, + "destY": 0 + }, + { + "predicate": "with(SEMATYPE.DIST) && (with(SEMAVR.VR1) || with(SEMAVR.VR2))", + "mode": "TRANSLATION", + "animationSpeed": 0.25, + "destY": 0.25 + } + ] } } } \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json index 54a4d725a..4f4bab576 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json @@ -1,9 +1,10 @@ { "textures": { - "lamp_green": "opensignals:blocks/lamps/lamp_green", "lamp_white": "opensignals:blocks/lamps/lamp_white", - "lamp_red": "opensignals:blocks/lamps/lamp_red", - "lamp_yellow": "opensignals:blocks/lamps/lamp_yellow" + "lamp_yellow": "opensignals:blocks/lamps/lamp_yellow", + "lamp_red_shield": "opensignals:blocks/semaphore/lamp_red", + "lamp_green_shield": "opensignals:blocks/semaphore/lamp_green", + "lamp_yellow_shield": "opensignals:blocks/semaphore/lamp_yellow" }, "models": { "semaphore_signals/sema_main_base": { @@ -354,7 +355,20 @@ "semaphore_signals/sema_distant_mast2": { "textures": [ { - "blockstate": "with(SEMATYPE.DIST)" + "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR0)" + }, + { + "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)", + "retexture": { + "lamp1": "lamp_green_shield", + "lamp2": "lamp_green_shield" + } + }, + { + "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)", + "retexture": { + "lamp2": "lamp_green_shield" + } } ], "y": 2 diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_arrow.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_arrow.json new file mode 100644 index 000000000..b7b5ae536 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_arrow.json @@ -0,0 +1,75 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "15": "opensignals:blocks/semaphore/semaphore_distant", + "particle": "opensignals:blocks/default/shield_black" + }, + "elements": [ + { + "name": "wing", + "from": [7, -5, 5], + "to": [9, -4, 6], + "faces": { + "north": {"uv": [2, 13, 4, 13.5], "texture": "#15"}, + "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, + "south": {"uv": [0, 14, 1, 14.5], "texture": "#15"}, + "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, + "down": {"uv": [0, 14, 1, 14.5], "texture": "#15"} + } + }, + { + "name": "wing", + "from": [6.5, -4, 5], + "to": [9.5, -3, 6], + "faces": { + "north": {"uv": [1.5, 12.5, 4.5, 13], "texture": "#15"}, + "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, + "south": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}, + "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, + "down": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"} + } + }, + { + "name": "wing", + "from": [6, -3, 5], + "to": [10, 22, 6], + "faces": { + "north": {"uv": [1, 0, 5, 12.5], "texture": "#15"}, + "east": {"uv": [0, 0, 0.5, 12.5], "texture": "#15"}, + "south": {"uv": [6.5, 0, 8.5, 12.5], "texture": "#15"}, + "west": {"uv": [5.5, 0, 6, 12.5], "texture": "#15"}, + "up": {"uv": [2, 14, 4, 14.5], "texture": "#15"}, + "down": {"uv": [2, 14, 4, 14.5], "texture": "#15"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Vor", + "origin": [0, 0, 0], + "color": 0, + "children": [ + { + "name": "vr2", + "origin": [0, -32, 0], + "color": 0, + "children": [0, 1, 2] + } + ] + }, + { + "name": "Formsignal_Vor", + "origin": [0, -32, 0], + "color": 0, + "children": [ + { + "name": "lamp3", + "origin": [-1, 88, -5.5], + "color": 0, + "children": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json new file mode 100644 index 000000000..b1eb73fdf --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json @@ -0,0 +1,39 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "1": "opensignals:blocks/default/shield_black", + "3": "opensignals:blocks/semaphore/lamps_shield_off", + "particle": "opensignals:blocks/default/shield_black" + }, + "elements": [ + { + "name": "shield", + "from": [10.5, 2, 6], + "to": [16.5, 12, 7], + "faces": { + "north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"}, + "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, + "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Vor", + "origin": [0, -32, 0], + "color": 0, + "children": [ + { + "name": "lamp3", + "origin": [-1, 88, -5.5], + "color": 0, + "children": [0] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json new file mode 100644 index 000000000..dea9cb314 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json @@ -0,0 +1,52 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "1": "opensignals:blocks/default/shield_black", + "3": "opensignals:blocks/semaphore/lamps_shield_off", + "particle": "opensignals:blocks/default/shield_black" + }, + "elements": [ + { + "name": "shield", + "from": [-0.5, 13, 6], + "to": [5.5, 23, 7], + "faces": { + "north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#3"}, + "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, + "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Vor", + "origin": [0, 0, 0], + "color": 0, + "children": [ + { + "name": "vr2", + "origin": [0, -32, 0], + "color": 0, + "children": [] + } + ] + }, + { + "name": "Formsignal_Vor", + "origin": [0, -32, 0], + "color": 0, + "children": [ + { + "name": "lamp3", + "origin": [-1, 88, -5.5], + "color": 0, + "children": [0] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamps.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamps.json deleted file mode 100644 index 7e8860c7f..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamps.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "18": "opensignals:blocks/semaphore/semaphore_lamps3"}, "elements": [{"name": "shield", "from": [-0.5, 13, 6], "to": [5.5, 23, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}, {"name": "shield", "from": [10.5, 2, 6], "to": [16.5, 12, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Vor", "origin": [0, -32, 0], "color": 0, "children": [{"name": "lamp3", "origin": [-1, 88, -5.5], "color": 0, "children": [0, 1]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json index c63058240..954818c29 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json @@ -1 +1,117 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/mast", "2": "opensignals:blocks/default/shield_gray"}, "elements": [{"name": "mast", "from": [7, 0, 7], "to": [9, 16, 9], "faces": {"north": {"uv": [0, 0, 1, 8], "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "texture": "#0"}, "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, "west": {"uv": [0, 0, 1, 8], "texture": "#0"}, "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, "down": {"uv": [0, 0, 1, 1], "texture": "#0"}}}, {"name": "wire_wing4", "from": [7.75, 0, 10.5], "to": [8.25, 16, 11], "faces": {"north": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}, "east": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}, "south": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}, "west": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}}}, {"name": "bracket1", "from": [4, 19, 7], "to": [7, 21, 9], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#0"}, "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, "down": {"uv": [0, 0, 2, 2], "texture": "#0"}}}, {"name": "lamp1", "from": [0.5, 18, 7], "to": [4.5, 22, 11], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#0"}, "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, "down": {"uv": [0, 0, 2, 2], "texture": "#0"}}}, {"name": "lamp2", "from": [11.5, 3, 7], "to": [15.5, 7, 11], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#0"}, "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, "down": {"uv": [0, 0, 2, 2], "texture": "#0"}}}, {"name": "bracket2", "from": [9, 4, 7], "to": [11.5, 6, 9], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#0"}, "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, "down": {"uv": [0, 0, 2, 2], "texture": "#0"}}}, {"name": "bracket", "from": [7.5, 8, 4], "to": [8.5, 9, 7], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}], "groups": [{"name": "Formsignal_Vor", "origin": [0, -32, 0], "color": 0, "children": [{"name": "mast9", "origin": [0, -32, 0], "color": 0, "children": [0, 1, 2, 3, 4, 5, 6]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/mast", + "2": "opensignals:blocks/default/shield_gray", + "particle": "opensignals:blocks/semaphore/lamp_yellow", + "lamp1": "opensignals:blocks/semaphore/lamp_yellow", + "lamp2": "opensignals:blocks/semaphore/lamp_yellow" + }, + "elements": [ + { + "name": "mast", + "from": [7, 0, 7], + "to": [9, 16, 9], + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "name": "wire_wing4", + "from": [7.75, 0, 10.5], + "to": [8.25, 16, 11], + "faces": { + "north": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}, + "south": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 2.5], "texture": "#2"} + } + }, + { + "name": "bracket1", + "from": [4.5, 19, 7], + "to": [7, 21, 9], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + }, + { + "name": "lamp1", + "from": [0.5, 18, 7], + "to": [4.5, 22, 11], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#lamp1"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + }, + { + "name": "lamp2", + "from": [11.5, 3, 7], + "to": [15.5, 7, 11], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#lamp2"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + }, + { + "name": "bracket2", + "from": [9, 4, 7], + "to": [11.5, 6, 9], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + }, + { + "name": "bracket", + "from": [7.5, 8, 4], + "to": [8.5, 9, 7], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Vor", + "origin": [0, -32, 0], + "color": 0, + "children": [ + { + "name": "mast9", + "origin": [0, -32, 0], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate_on.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate.json similarity index 100% rename from src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate_on.json rename to src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate.json diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate_off.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate_off.json deleted file mode 100644 index fb02fb816..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_plate_off.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "15": "opensignals:blocks/semaphore/semaphore_distant"}, "elements": [{"name": "sign", "from": [5.5, 1.5, 3.5], "to": [10.5, 2.5, 4.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"north": {"uv": [11, 7, 13.5, 7.5], "rotation": 180, "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 0.5], "rotation": 270, "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 0.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [11, 7, 13.5, 7.5], "rotation": 180, "texture": "#15"}, "down": {"uv": [11, 15.5, 13.5, 16], "texture": "#15"}}}, {"name": "sign", "from": [3.5, 1.5, 4.5], "to": [12.5, 2.5, 5.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"north": {"uv": [10, 6.5, 14.5, 7], "rotation": 180, "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 0.5], "rotation": 270, "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 0.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [10, 6.5, 14.5, 7], "rotation": 180, "texture": "#15"}, "down": {"uv": [10, 15, 14.5, 15.5], "texture": "#15"}}}, {"name": "sign", "from": [2.5, 1.5, 5.5], "to": [13.5, 2.5, 6.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"north": {"uv": [9.5, 6, 15, 6.5], "rotation": 180, "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 0.5], "rotation": 270, "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 0.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [9.5, 6, 15, 6.5], "rotation": 180, "texture": "#15"}, "down": {"uv": [9.5, 14.5, 15, 15], "texture": "#15"}}}, {"name": "sign", "from": [1.5, 1.5, 6.5], "to": [14.5, 2.5, 8.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"north": {"uv": [9, 5.5, 15.5, 6], "rotation": 180, "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 1], "rotation": 270, "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 1], "rotation": 90, "texture": "#15"}, "up": {"uv": [9, 5, 15.5, 6], "rotation": 180, "texture": "#15"}, "down": {"uv": [9, 13.5, 15.5, 14.5], "texture": "#15"}}}, {"name": "sign", "from": [0.5, 1.5, 8.5], "to": [15.5, 2.5, 13.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"north": {"uv": [8.5, 4.5, 16, 5], "rotation": 180, "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 2.5], "rotation": 270, "texture": "#15"}, "south": {"uv": [8.5, 2.5, 16, 3], "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 2.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [8.5, 2.5, 16, 5], "rotation": 180, "texture": "#15"}, "down": {"uv": [8.5, 11, 16, 13.5], "texture": "#15"}}}, {"name": "sign", "from": [1.5, 1.5, 13.5], "to": [14.5, 2.5, 15.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"east": {"uv": [0, 0, 0.5, 1], "rotation": 270, "texture": "#15"}, "south": {"uv": [9, 1.5, 15.5, 2], "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 1], "rotation": 90, "texture": "#15"}, "up": {"uv": [9, 1.5, 15.5, 2.5], "rotation": 180, "texture": "#15"}, "down": {"uv": [9, 10, 15.5, 11], "texture": "#15"}}}, {"name": "sign", "from": [2.5, 1.5, 15.5], "to": [13.5, 2.5, 16.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"east": {"uv": [0, 0, 0.5, 0.5], "rotation": 270, "texture": "#15"}, "south": {"uv": [9.5, 1, 15, 1.5], "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 0.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [9.5, 1, 15, 1.5], "rotation": 180, "texture": "#15"}, "down": {"uv": [9.5, 9.5, 15, 10], "texture": "#15"}}}, {"name": "sign", "from": [3.5, 1.5, 16.5], "to": [12.5, 2.5, 17.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"east": {"uv": [0, 0, 0.5, 0.5], "rotation": 270, "texture": "#15"}, "south": {"uv": [10, 0.5, 14.5, 1], "texture": "#15"}, "west": {"uv": [0, 0, 0.5, 0.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [10, 0.5, 14.5, 1], "rotation": 180, "texture": "#15"}, "down": {"uv": [10, 9, 14.5, 9.5], "texture": "#15"}}}, {"name": "sign", "from": [5.5, 1.5, 17.5], "to": [10.5, 2.5, 18.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"east": {"uv": [11, 0, 13.5, 0.5], "rotation": 270, "texture": "#15"}, "south": {"uv": [11, 0, 13.5, 0.5], "texture": "#15"}, "west": {"uv": [11, 0, 13.5, 0.5], "rotation": 90, "texture": "#15"}, "up": {"uv": [11, 0, 13.5, 0.5], "rotation": 180, "texture": "#15"}, "down": {"uv": [11, 8.5, 13.5, 9], "texture": "#15"}}}, {"name": "coil_wire_wing5", "from": [7.5, -2.5, 9.5], "to": [8.5, 1.5, 10.5], "rotation": {"angle": 0, "axis": "x", "origin": [8, -1.5, 9]}, "faces": {"north": {"uv": [0, 0, 1.5, 0.5], "rotation": 180, "texture": "#1"}, "east": {"uv": [0, 0, 1.5, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 1.5, 0.5], "texture": "#1"}, "west": {"uv": [0, 0, 1.5, 0.5], "rotation": 90, "texture": "#1"}, "up": {"uv": [0, 0, 1.5, 0.5], "rotation": 180, "texture": "#1"}, "down": {"uv": [0, 0, 1.5, 0.5], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Vor", "origin": [0, -64, 0], "color": 0, "children": [{"name": "sign", "origin": [0, -2, 0], "color": 0, "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr0.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr0.json deleted file mode 100644 index af7c7dae7..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr0.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "15": "opensignals:blocks/semaphore/semaphore_distant", "18": "opensignals:blocks/semaphore/semaphore_lamps3_yellow", "particle": "opensignals:blocks/default/shield_black"}, "elements": [{"name": "wing", "from": [7, -5, 5], "to": [9, -4, 6], "faces": {"north": {"uv": [2, 13, 4, 13.5], "texture": "#15"}, "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, "south": {"uv": [0, 14, 1, 14.5], "texture": "#15"}, "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, "down": {"uv": [0, 14, 1, 14.5], "texture": "#15"}}}, {"name": "wing", "from": [6.5, -4, 5], "to": [9.5, -3, 6], "faces": {"north": {"uv": [1.5, 12.5, 4.5, 13], "texture": "#15"}, "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, "south": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}, "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, "down": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}}}, {"name": "wing", "from": [6, -3, 5], "to": [10, 22, 6], "faces": {"north": {"uv": [1, 0, 5, 12.5], "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 12.5], "texture": "#15"}, "south": {"uv": [6.5, 0, 8.5, 12.5], "texture": "#15"}, "west": {"uv": [5.5, 0, 6, 12.5], "texture": "#15"}, "up": {"uv": [2, 14, 4, 14.5], "texture": "#15"}, "down": {"uv": [2, 14, 4, 14.5], "texture": "#15"}}}, {"name": "shield", "from": [-0.5, 13, 6], "to": [5.5, 23, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}, {"name": "shield", "from": [10.5, 2, 6], "to": [16.5, 12, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Vor", "origin": [0, 0, 0], "color": 0, "children": [{"name": "vr2", "origin": [0, -32, 0], "color": 0, "children": [0, 1, 2]}]}, {"name": "Formsignal_Vor", "origin": [0, -32, 0], "color": 0, "children": [{"name": "lamp3", "origin": [-1, 88, -5.5], "color": 0, "children": [3, 4]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr1.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr1.json deleted file mode 100644 index ce1306f58..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr1.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "15": "opensignals:blocks/semaphore/semaphore_distant", "18": "opensignals:blocks/semaphore/semaphore_lamps3_green", "particle": "opensignals:blocks/default/shield_black"}, "elements": [{"name": "wing", "from": [7, -5, 5], "to": [9, -4, 6], "rotation": {"angle": 0, "axis": "z", "origin": [8, 8.5, 4]}, "faces": {"north": {"uv": [2, 13, 4, 13.5], "texture": "#15"}, "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, "south": {"uv": [0, 14, 1, 14.5], "texture": "#15"}, "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, "down": {"uv": [0, 14, 1, 14.5], "texture": "#15"}}}, {"name": "wing", "from": [6.5, -4, 5], "to": [9.5, -3, 6], "rotation": {"angle": 0, "axis": "z", "origin": [8, 8.5, 4]}, "faces": {"north": {"uv": [1.5, 12.5, 4.5, 13], "texture": "#15"}, "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, "south": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}, "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, "down": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}}}, {"name": "wing", "from": [6, -3, 5], "to": [10, 22, 6], "rotation": {"angle": 0, "axis": "z", "origin": [8, 8.5, 4]}, "faces": {"north": {"uv": [1, 0, 5, 12.5], "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 12.5], "texture": "#15"}, "south": {"uv": [6.5, 0, 8.5, 12.5], "texture": "#15"}, "west": {"uv": [5.5, 0, 6, 12.5], "texture": "#15"}, "up": {"uv": [2, 14, 4, 14.5], "texture": "#15"}, "down": {"uv": [2, 14, 4, 14.5], "texture": "#15"}}}, {"name": "shield", "from": [-0.5, 17, 6], "to": [5.5, 27, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}, {"name": "shield", "from": [10.5, -2, 6], "to": [16.5, 8, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Vor", "origin": [0, 0, 0], "color": 0, "children": [{"name": "vr2", "origin": [0, -32, 0], "color": 0, "children": [0, 1, 2]}]}, {"name": "Formsignal_Vor", "origin": [0, -32, 0], "color": 0, "children": [{"name": "lamp3", "origin": [-1, 88, -5.5], "color": 0, "children": [3, 4]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr2.json deleted file mode 100644 index 7a1ed0034..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_vr2.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "3": "opensignals:blocks/semaphore/semaphore_lamps3_yellow", "15": "opensignals:blocks/semaphore/semaphore_distant", "18": "opensignals:blocks/semaphore/semaphore_lamps3_green", "particle": "opensignals:blocks/default/shield_black"}, "elements": [{"name": "wing", "from": [7, -5, 5], "to": [9, -4, 6], "rotation": {"angle": -45, "axis": "z", "origin": [8, 8.5, 4]}, "faces": {"north": {"uv": [2, 13, 4, 13.5], "texture": "#15"}, "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, "south": {"uv": [0, 14, 1, 14.5], "texture": "#15"}, "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, "down": {"uv": [0, 14, 1, 14.5], "texture": "#15"}}}, {"name": "wing", "from": [6.5, -4, 5], "to": [9.5, -3, 6], "rotation": {"angle": -45, "axis": "z", "origin": [8, 8.5, 4]}, "faces": {"north": {"uv": [1.5, 12.5, 4.5, 13], "texture": "#15"}, "east": {"uv": [0.5, 13, 1, 13.5], "texture": "#15"}, "south": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}, "west": {"uv": [5, 13, 5.5, 13.5], "texture": "#15"}, "down": {"uv": [0, 15, 1.5, 15.5], "texture": "#15"}}}, {"name": "wing", "from": [6, -3, 5], "to": [10, 22, 6], "rotation": {"angle": -45, "axis": "z", "origin": [8, 8.5, 4]}, "faces": {"north": {"uv": [1, 0, 5, 12.5], "texture": "#15"}, "east": {"uv": [0, 0, 0.5, 12.5], "texture": "#15"}, "south": {"uv": [6.5, 0, 8.5, 12.5], "texture": "#15"}, "west": {"uv": [5.5, 0, 6, 12.5], "texture": "#15"}, "up": {"uv": [2, 14, 4, 14.5], "texture": "#15"}, "down": {"uv": [2, 14, 4, 14.5], "texture": "#15"}}}, {"name": "shield", "from": [-0.5, 17, 6], "to": [5.5, 27, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#18"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}, {"name": "shield", "from": [10.5, 2, 6], "to": [16.5, 12, 7], "faces": {"north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"}, "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Vor", "origin": [0, 0, 0], "color": 0, "children": [{"name": "vr2", "origin": [0, -32, 0], "color": 0, "children": [0, 1, 2]}]}, {"name": "Formsignal_Vor", "origin": [0, -32, 0], "color": 0, "children": [{"name": "lamp3", "origin": [-1, 88, -5.5], "color": 0, "children": [3, 4]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh0_mech.json b/src/main/resources/assets/opensignals/models/block/sh/sh0_mech.json deleted file mode 100644 index 24827c68d..000000000 --- a/src/main/resources/assets/opensignals/models/block/sh/sh0_mech.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/shield_black", "1": "opensignals:blocks/default/mast", "2": "opensignals:blocks/sh/sh", "particle": "opensignals:blocks/default/shield_black"}, "elements": [{"name": "body", "from": [3, 2, 5], "to": [13, 12, 11], "faces": {"north": {"uv": [0, 0, 10, 10], "texture": "#0"}, "east": {"uv": [0, 0, 3, 5], "texture": "#0"}, "south": {"uv": [0, 0, 5, 5], "texture": "#0"}, "west": {"uv": [0, 0, 3, 5], "texture": "#0"}, "up": {"uv": [0, 0, 5, 3], "texture": "#0"}, "down": {"uv": [0, 0, 5, 3], "texture": "#0"}}}, {"name": "mast", "from": [7, 0, 7], "to": [9, 2, 9], "faces": {"north": {"uv": [0, 0, 1, 1], "texture": "#1"}, "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, "west": {"uv": [0, 0, 1, 1], "texture": "#1"}}}, {"name": "sh", "from": [4, 3, 4.9], "to": [12, 11, 4.9], "rotation": {"angle": 0, "axis": "z", "origin": [8, 7, 5]}, "faces": {"north": {"uv": [0, 0, 16, 16], "texture": "#2"}}}], "groups": [{"name": "body", "origin": [8, 7, 5], "color": 0, "children": [0, 1]}, {"name": "sh", "origin": [8, 7, 5], "color": 0, "children": [2]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh1_gsp2_mech.json b/src/main/resources/assets/opensignals/models/block/sh/sh1_gsp2_mech.json deleted file mode 100644 index b6003d724..000000000 --- a/src/main/resources/assets/opensignals/models/block/sh/sh1_gsp2_mech.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/shield_black", "1": "opensignals:blocks/default/mast", "2": "opensignals:blocks/sh/sh", "particle": "opensignals:blocks/default/shield_black"}, "elements": [{"name": "body", "from": [3, 2, 5], "to": [13, 12, 11], "faces": {"north": {"uv": [0, 0, 10, 10], "texture": "#0"}, "east": {"uv": [0, 0, 3, 5], "texture": "#0"}, "south": {"uv": [0, 0, 5, 5], "texture": "#0"}, "west": {"uv": [0, 0, 3, 5], "texture": "#0"}, "up": {"uv": [0, 0, 5, 3], "texture": "#0"}, "down": {"uv": [0, 0, 5, 3], "texture": "#0"}}}, {"name": "mast", "from": [7, 0, 7], "to": [9, 2, 9], "faces": {"north": {"uv": [0, 0, 1, 1], "texture": "#1"}, "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, "west": {"uv": [0, 0, 1, 1], "texture": "#1"}}}, {"name": "sh", "from": [4, 3, 4.9], "to": [12, 11, 4.9], "rotation": {"angle": 0, "axis": "z", "origin": [8, 7, 5]}, "faces": {"north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}}}], "groups": [{"name": "body", "origin": [8, 7, 5], "color": 0, "children": [0, 1]}, {"name": "sh", "origin": [8, 7, 5], "color": 0, "children": [2]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh1_mech.json b/src/main/resources/assets/opensignals/models/block/sh/sh1_mech.json deleted file mode 100644 index 5f10425ad..000000000 --- a/src/main/resources/assets/opensignals/models/block/sh/sh1_mech.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/shield_black", "1": "opensignals:blocks/default/mast", "2": "opensignals:blocks/sh/sh", "particle": "opensignals:blocks/default/shield_black"}, "elements": [{"name": "body", "from": [3, 2, 5], "to": [13, 12, 11], "faces": {"north": {"uv": [0, 0, 10, 10], "texture": "#0"}, "east": {"uv": [0, 0, 3, 5], "texture": "#0"}, "south": {"uv": [0, 0, 5, 5], "texture": "#0"}, "west": {"uv": [0, 0, 3, 5], "texture": "#0"}, "up": {"uv": [0, 0, 5, 3], "texture": "#0"}, "down": {"uv": [0, 0, 5, 3], "texture": "#0"}}}, {"name": "mast", "from": [7, 0, 7], "to": [9, 2, 9], "faces": {"north": {"uv": [0, 0, 1, 1], "texture": "#1"}, "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, "west": {"uv": [0, 0, 1, 1], "texture": "#1"}}}, {"name": "sh", "from": [4, 3, 4.9], "to": [12, 11, 4.9], "rotation": {"angle": -45, "axis": "z", "origin": [8, 7, 5]}, "faces": {"north": {"uv": [0, 0, 16, 16], "texture": "#2"}}}], "groups": [{"name": "body", "origin": [8, 7, 5], "color": 0, "children": [0, 1]}, {"name": "sh", "origin": [8, 7, 5], "color": 0, "children": [2]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json b/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json index 4aacb2be6..13bab9028 100644 --- a/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json +++ b/src/main/resources/assets/opensignals/models/block/sh/sh_mech.json @@ -4,6 +4,7 @@ "textures": { "0": "opensignals:blocks/default/shield_black", "1": "opensignals:blocks/default/mast", + "2": "opensignals:blocks/sh/shield_mech", "particle": "opensignals:blocks/default/shield_black" }, "elements": [ @@ -12,7 +13,7 @@ "from": [3, 2, 5], "to": [13, 12, 11], "faces": { - "north": {"uv": [0, 0, 10, 10], "texture": "#0"}, + "north": {"uv": [3, 3, 13, 13], "texture": "#2"}, "east": {"uv": [0, 0, 3, 5], "texture": "#0"}, "south": {"uv": [0, 0, 5, 5], "texture": "#0"}, "west": {"uv": [0, 0, 3, 5], "texture": "#0"}, diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json index 766c37523..a4f0a103d 100644 --- a/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json +++ b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh.json @@ -8,8 +8,8 @@ "elements": [ { "name": "sh", - "from": [4, 3, 4.9], - "to": [12, 11, 4.9], + "from": [3.5, 3, 4.9], + "to": [12.5, 11, 4.9], "rotation": {"angle": 0, "axis": "z", "origin": [8, 7, 5]}, "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#2"} diff --git a/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json index 766c37523..a4f0a103d 100644 --- a/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json +++ b/src/main/resources/assets/opensignals/models/block/sh/sh_mech_sh_high.json @@ -8,8 +8,8 @@ "elements": [ { "name": "sh", - "from": [4, 3, 4.9], - "to": [12, 11, 4.9], + "from": [3.5, 3, 4.9], + "to": [12.5, 11, 4.9], "rotation": {"angle": 0, "axis": "z", "origin": [8, 7, 5]}, "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#2"} diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_green.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_green.png new file mode 100644 index 0000000000000000000000000000000000000000..c948b55b1052216bb61fd84115a5386df64b889f GIT binary patch literal 4321 zcmeHKeNYtV8DF#lIpdM&5Q%2$x}-+Mz5Temy}ccd1MiT#A%~zSRO83q?t8H1?)KbU zxC18|5FAZvrII*?T6GlBq}A5yr~@?G31TKT#9-1ylNe((A8k5dQ)}9&>ATDKG&31y zn*X?&z1@A@-}8H)=l4F(JMV5SEXbQ;m|;K=WQy10UIOnAX;*S0{GavJw>-T4y{5QS zUBbuEh$081AVAgX2tYwx3Lr@Q%C@5Sw{?=qcVnp~6B6(4d+f8HtV&vWzaY5#spTua z*pgXG)z;SEyS=`C@1@hq#p0ix-2FgnYuA*5gM9vZ&y}|(Hg|7Id3VyLsU4uctGoBw z$9db|_*LhN&dIBOJ)=WibK=vx|F|)oc7Np{CU}Y*Rb$C#_@>)`MUaFB$>l2a zx?F>a!*q8){Y!`E)$GU4t#P*OPfg0$!itC6N*_vHw_w?Vx`v+RQEosZ~O-=isd;aS)Ef=w_O`mM&XuorMeNud8YHQm4x%&>c z?s@ineK5Q%xnuwI4G;RKeu9}#xNE41@7}6RNmG(+TzdEoa=c<^NnZLnXY_!^TpYYrsgM%4^KX4+{x{FL2Za{ zW*214zq$Un@xty?Y{m;SDn4vFL+&am>3Qmqy^h`4m_2pE<8K!(nluMH@p4O==dBHY zKIaU6({y9UYs(VT&rf){5WTXY&-wL-M~ZgsQFhc(`~G(B4_S+9&zdg&cI99090S(H z$VcYL!ISsiNhI%hYyNnoVf!=pL)Wgi9r3O|d(%k%vt?^rd45*&)rARh=K=Zkgo&rJ z-)z3LvSQYuls2lv%4*pNE3`_2m00R~ zk`v^Ri5F!*FvUX=SfU7$>5NBsp#rF=ACyU92iDtu216y$ft6T&q%YzE<&vjH0ZVHN ziiMgA!7gIXEJJ3Tg9IU<@@PC13`e=R1Jijq_^g=;4AmiOg##<~6{0R#0jR}fF_Cy~ zT&kk6ECZUUhyiYid(i*|d~;yssv6-4A{L98VrG-9lo6EOZYM~ZplKW;@Mv{d<>Pob znyyjwbGSiNP^5?|$zfFEcB8Kjt<5biuim(^x^1$3Q!Ls&PNE!L=vG8G14Qd z=2k(Hfq=f#BU%g_npgs&a-|}G+$s=O(??Q>!jONYQVHtmhynqEAOxXNI4d=3$~>>H zaL7ZGpiBxybT26OD5NR{hQ%5cn>M1SGcpk9KEyi;J(#-=hA5wpbIU@d7M|Dbz_j@} zQ5GbT(;oqAHrqv!#H|8r!7U8K;(nTE@PL(MMKdGP3~3!f7$iq`s zRv-b5(`JUjEj%Bz;nj@JE z626YW%c2yh{ywzUK4@nDqI;w$oWEK(_4m|Lu&)2D|1~J-&4i+QTX4M4pF)(c0-_!# z8Y;6m$!g}HZBu?A?eulAG0u*T;%^sBl zYK&JvP8rk@Y6S~a*9x6GuvGI#<74GOTL&l^PEq)j>|PJ*O(L-6L`G3#^oB50%HP? zSJ(edF2nH06bQo;Pz-)5@%7*%_?eaH&(Cus8OQ>JEd5~qLTGs);`wP5K}_k|l@LGZ ztb)cQ)$7Ym`h4<_QY}fhdUkX{)1zu`sp^tL+L;{D4~jrUW0G2qY6r!VTH|yGa(LZ2 z#q0&)?UaAr{dV5jt+m=uel=_Ja}}q|bR)8BZS$jPX=#m@-80W-&t7}|{oki_=LELb d6_EzdL?o0xB{~0TqXLN#Z*GD6=)$#i{{?SOI?_XAV`|4*jWOf>FS-541X8@2|i<6p~a}T2|MF?i*YF{8Z10 z{*q;l>s~6@(dB*0bhE)VbFgpq&pW%WEo$O!7hJA=90aa^?`XPb>8u9X(2$%n&BZk8 z?lZ2(p7xm!-^*H()b+M5yY=$mr*D7u?oS7Le*ODJbFNf3f4J>JK7u6e5*-eY%i$Qw z9Om1&?PYuMAM(E4QI?xHI#-wVoJBa%TADt$a>e=;^}DWa2z+qy=2aqabx-1)CH2${ zUGBWs^oA>~?77tXPjt_n-nsASkA5=Ho_Gg)bLWk^^KJd-w(8=G<~A?*GV{oZ=EKi- z{xBF`pK|`_{JKYdvu|L=GtOFS`XBFC&6-tq7qfLg?0e=pS7&W zT7GNmX?=I&SxZ*K!itafwUY-nZoInrxV7H0e^1`*X-nVt6wY`8JM(H{LGinFmpgKU z5BA;M`_}s8jLvDVdeGjwd$|K2om_k1u)MdPI`V19>p6uxE*ReV<)&->Eg*Xh@)u*I z={FBQNGAJTwQro<_2VCW8T#aU>q*zv3%B&-7m3}ifmJz&K3CQ!mYb7mi?fg*1QZU9hl1fK8@FQ`FALvQGl8KRM5(Z2rEU-EkYs=|2F5_*1#z*O z#&S|on=JU*5@+Es1#H=|fTBcLf{4XphM3VH$>juPwOR?1CTJRm2s~O7R=7AGj%KJ7 zLmW;J5g(7bED1A6OtOC@7h;tEwGLS?lM2z={Dh1V$ zWH_L&^oV-liY7`xRH~ABP*4rRO2&8!fgkmcRLMat9f2o65QHE!3P+_T3|ZuIdqzD} z3ChJ#MDv1TPe3Z7e@v_iv8g>;I^zR@?xVaD&?C8PV2EYIxa+Gx(l`9-oxG)b?DoAb+ArEQJ_WS*2 zD^BtZhci5+uv$5QTa0Fsw34KcqM30NYh)2tB^MkYl}aT*Duy9R6T?xs$w)yeL7;I9 z!rOL372afs^DzC$7RQ8136~#1UbbI9pD-e z!-5oxj&*s(5Ll;hs-BeD2$L~W3~e@1rfka?XakU=uohKTiZmEaT8}z0EKCPV%c+$L z2{b#*hIPn*QzY3dNkKcN28F7gqup+}paf3goSXt6DM>RdMX@B~rD-;sW@##mgw1hy zNf7-t{|l`yAJjH9>BV9cj$fmhhStnn5YC$^`N+MhkiZ;5iV!G*V4^D z1250!zK3O%mHpe3X(Xfd%?B+_FC-RRxRjTcw|jo!#mogW;6D`|{b{y&?`@W#E8;3x L?L4*enfm_#nZ^xa literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red.png new file mode 100644 index 0000000000000000000000000000000000000000..13f4f8c77077e95f7e5f68e00155609054f9b391 GIT binary patch literal 4321 zcmeHKe{d639^Y1MYlKwviYR(43&W4Lo88UN%}&xEG;NcEKq$rb4rg$)`_isWvLV?f zX&K>YuZ&7nq%A|M0~~}F^~wzg3fFR025J#*Y_EzS3a0`yFsA}{o=`d9-fr5G&N<_B z=KQaj+3ddW`+Ps|`~AG{d-L84t|i4&RFA6=1exNn+e+a3A^Ay5f&VlAb(e*&Z);1- zr4lxR27;nT@B&n-2>=vC1rLHm&%U&5<;%y&v|IfPzE7KUy#7Lr5Ja+XX2+~=!m(Gk zWNPRIwExVip5mKVj8@K-3a$?|Ew{6xA`!6$h6D=t@$qxN@ z_0hID%};(LSiUSv%$kNMF{#V6&7pZ$zYtDXssdbjMscoKm>Vv)NEzH&ysUf<7&d$ob zv}V8hPj2i3hNZ~gb%EXQ z+&+~;-f-0ZrL*Cc-`??k@l{u+W6gV))Z}-u7rH7J<+Pn&m=w+3C7wvS?_gek+ea&_ zW_G0KZRq;VyGd&G`h6JqWB1|i?)?YX^&j}*R?@Yr!B0DKV(Vauh6PxP<<7+nC;Buj zFS>yy>I=XcMG#AFG{ACIKtkQ1LhxI$tKB^qD)3gU%-|%QfdWt|*lUAedF_%?uC|IZ z^H^?<$`WNDfe%P58ufYoAtq|Y6kY~?%Vq*Y6^K-2#mb#7v_K33RIkx%NW3sAgtb_X z3bh1z4^v_*8m53PD^@8<0frzVk%%Uu(}=+ef-;-U1gRyoS{x$qP>o+=qqsjbTc(I} z*g%L23IRzF{iw{zy2WbAiea!H9f{8ua5_in{h?tMpdLh&4G@%uBz!(1(IX@kh9Svt zKtJjcDupYWC;=g{I>>>-Fz`#W6DfFZ)IU%i^eXA_909z*2caQ2Dm7-vVu#Z;>LE)| zA@~A{7ZiI8QW8A(#2OQu+@qwE7zlJ9)mcW?j}6|=S-wdZzA<1aX`g5(+j@)-0co+bg0 zn^{VS>wytccz83;8x3v)?KZJm6PZAKG(66_ zX%FtEIgTgItl6XUC{#Sh6p29}3#U`?u@!&__$!nSS#T!b<*;H}O?*_v;_|YR2Rgtt zAozJP61oR26?|a1#L9Y7CLL)qm`H=sXf}{!g8x$>7=pDZvr?o+XH?wfiD6(mP+C^5 zR7jxMVKz)b5U`RMEEPqs6_Z0iWzW%WCtOfGE3r0K0+5u{>KTe+NPVeR%NR(;V8|k2 zGXXF1f~V%E(DL#@E%8aW3n4gujbe(gspVjGycKVH1!XazsIn{=mW!tlV#9z};)GoB zF0PXGR{*$w3>WN(UHFk=&~X$`b0miwNF9gkjkFebyFFT*^Jv`$y`IvUJzy+*Nc2b% zHVE=7ppH;0SfGkl==|ZSS}+zLsRZ&oK*?~5!tY6D#E9W!334JPH6hoy6c`tHqPiyJ8kYj&0#8)e z|4lB{y~`Bv!xK;hUX^^8C)L1fR*HL3u?@*WvJtZU^UQ_N@<71;>kxuyX3I}fba!qT z8dD{QvoQ7YgOf6}^we*sKL<^ZNrmN7f#{RZhb_O9 zKFJNFfB&C#ZH{m53UlAS`@@lKcOSD)YV2tJ*rjj1)7@)-F=_GSUnI9T=K(sk)v78w dG9R6SAV)(}G;P(dG(sN4QMkmmci}U2{{_&f843UZ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red_e.png new file mode 100644 index 0000000000000000000000000000000000000000..7794eca0787944af826f34a983058f660038c8d1 GIT binary patch literal 4307 zcmeHKe{dA_72jaFzyXJbrXXrrH>hB;x4XCZbLTEUxJ$?hM=lUZ3bD!F?)UE2+}$2~ zo7|C%goK14RTPOjh$%351WE;mCId7knd$(x7N!dHyLv+!HkLIqM&HS@`<8zN|uC z%*N5EB>IIAK;>0YfP#eJN07w14W%D%I8ILZKAu@VPV@ct2fuja$@CR>7KJ)0mo2}# zeql9AZf&{!Z9~hpvxlTJWltUGnAq9*)|7&s?1GywbT^a)HB;@C<2ADrCyO^c^hs0J zb6Z~}+PWHbJ!X^Zs=oWmt#6J`pY_hSv5oXbtNHAeS+`I&kj$$3b?JfSKQI4yS^e@i zpMT$ZV!uyJ4J#faQf*<_h^FAWjw=sFhs@*p} zJ@03~)#=~uVGe1VFQu>VTHC(knHO&zO`gHtTKn1R!@V~THKZpV$n2bPXU_KBom+qP zc1tL-bi&~s(^pUSWqgLw-L87-p1hZ+d5`ChP5Sd%Wnm)z|ZGUD#W?d8@RkncDvM6TizXYC5Jr^ZJUv+}saLCCDdq zbmxKFA85#%?)o?Pwm!e+PWaNNJ$u~^$1dy0e(``@cI74;VTaZUuoEjh3mHxf z>sem(0evDIg)NF8_Pj)txzB%5sz;hZHa$y|= z=?~}!En;PGK@*EXOsthSP*?{da@KGNo*T4})=D8Y9iAgV2!x?(40@$TxSa3ycn2*M z3Iakns#-y^M`+4|e~7FRu_-fZI>Q5j=7YE+vCeCW&Y<`MXp?Hod5~VN;%PEA}03f1~fI6WN&J=jv4$Pn@ha}z*EBm1V zTmwRc7vr&^sWKr9mdLEaCuN~Yi^)P-4Dex~Q?69RWk8C-UQ|#iQcs&zbEPm0Ob1fS zDxC@eR5{FsaY}%dMX5{_Lk>)VKo!fuX%AdbJS(#vn21WPFg%z?>3@c}HL_H`19*qlf5LFI}FE63d*b} zxoUV>|D62SU1R&XMvVc<>M1(gcyNZBTGQ4vb4>>EY;!58MG>Us%%oEfUG4ilG)3Hn Li(LEWRX6_!ajObf literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..7e917859b0c588e22c8fbb86c70c6457d84c811e GIT binary patch literal 4321 zcmeHKdvFuS89(!|T>)}J;^sj*T+R%^nA7d)dAdk8Ao-zyKsF|JN@wWlZY5tW>163_ z2|G2xt}`JmO~5fB4g-uahLAvqKnk^K4UYMa~lRen5HBQ_=tIe+_Zy^<`~o zxm?1<@Nh)(i2;bqYr+tRanXli@rxUZSN-w>kbe72_SflCPBva`r$h<#%-;RvKWf@H zZl3?})7ebu{Oaz)Tc00qY3wLD*uOO0WD3ojzoGo}6RtA@FZc#8zyIFx9aE&ode49J z1KZ!PoqxV)>)-r4D@z*{THuFUvNy*V;M4@;jhpKWnXyK||tmxoW!+QnVVUut_rZyeMWr$09*qowclXC}|y z=rVrQ7;l|(Y}p0T_Sdq-lU{o><0tYP-+cV$pLbG&+bf$anVV|%w%%GXfMF?3qQl{F zIUFOIqkOmibfdlK{e@4QSe@72mYJ6G5+m&CEPo)gYQf3{4NZN|R-8NjSszu=_iFnQ zMzeovTHg2H*6L1ovPU!xm(yN4*x20m^Ve>5xAzjiZ@gN6wCm=Py0rML%#KIz&D*i3 zW82F;KMRCbrXOv4q<*@0=2gOQ$XQEI{&=uDBV+Y-!glKJrR_VHpPn`SM*0WE9iPt~ zOdTBPc&qBur?dw)&3kD3L(8wpi>?&zU!v`<(p?#innZwY-*r)d~xF4+=6w-biMDa`sn5XXj+c_ z#Sq^0>$~St!A)1~Z}&C5^1{8~+HwJ^ z7i;uHt_HV71Rq=CEEuLhEjv*m%VCzHVzHPmX3$9yKSf)uRto4Ty`Dq}GP))tb8#{h z%~B{598MVJBVt$s83O}J!D#hbc*yZS#yW<|6^hDSh=&RlBG-wC$IO_# zjKSg~d5h6X8ZBNQ$uJfR>9s(;$!M@x41gI!u{$UjIz%0;SgP>9gJX;_|f*hJoG06EL6%P5;4n=Twk;i2x^g1wV@dP;8 zhaAuv5JQ3#i;i}cib1$S<`g|?6spB!0W{D9v)*VN1w9KRQB;cxD-Co8v)ZFf42#l1 z(sD|rA_CQpvSA$&$jMTqRFVRALJ102Jd@pSw4ek|=A4`i5h>6cS(;{nu~e^TO@IZ~ z9Dtf*@RA_<*8DHDvV3q`V$zGmC>no_YD%oB6|gGNN;Ctax|ncWT^20ICsK%VH87zu z;!1S!6Fn~6jXmdi=Bzsiy z$uTYh7x|HnNGnvJs#f^C;i<}2RZHSy6;PQ6BpFH5WKuFDE;XDirR*3Z+1jZ8(!-_# z#%wXjFJVJl7upG_lqV&= zE3XC_(`1)BKkeGIDVciB1*_{WGCd~em&*<*sGP|$^`Hm^JSNH&xN=Y|Tc>>lfov}4 zqEhA*-<$FEouRew{&Q%kxn<~!w7PqK{6TPU`#ZmATTkEAWo4%V+LOLzx^~ZT>&by) epeaZZF>KxI8M?VMLk)-rbLB5{?qB@lhW`KtaTikn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow_e.png new file mode 100644 index 0000000000000000000000000000000000000000..727dba6815155562e275733d3ce2cf7e7ee82cfe GIT binary patch literal 4308 zcmeHKd2kd}8t){K#3+M;ED&XB8__JGr;q8*%(R(ILMF!uLqZZDily}NCevhQdNSR~ zbb=cs7zz&*0#QtH6$J2Dup*SfBr9$q;=&eU)U{yM4I&m4)Fzbd!mbPK>zSOjR#~ai z|I$@`yzltE@B6*)d-eLc;)MkhQc_b81exG2bd|vO-Nv1q2%j^5xXr`YKkCZLwGuvp zhQf+h_5)O_4FMGBvKK-0v+EcAZNgD9`M=lioe`H%Prmd+Q%BD6-q|0yOW!DId-2?Y zo~Q4)eEGe`1y6s}d!5QmIrd}JDpY`bUt$K6XIHKv1`DfZ6P5A9OH*=-2 z+%u_rZMU9WbfbAE^8NQ~Qnv~9D^&T~(Ob1k^n}SpHG3@lIUj<=HOjfU#qQkPfy`mP zTYtaNQFt`_{$o!$TX#)KN?&J_UhgQsdrH;Z#d8}PyO;RB_|tdYgs*!;>tS2Uf$>Ss z-@IiqpX%Tar!@2=tvk48)2xWk+>Gw_9JMC85&e!*DfByKh z{@~)|u3b~>?-C}R$1I0jbyUKaSF0yZe5x1AJbCl09lMK8-FH`C@`sD|UV7+i;?*mA z->CZLVN+XE+To@QjGnFUbKdxR|DrA1!%Yp;&dbN%$;w~-f%)_wmi_g58(@o&zgt3k z-o5!nB6;0i_s9K>FF$iD(DQA_e)q}`E||z`t7| z%9;BnX0Ppd{QWqSX>}V0-tO$`>^#`M>XSqN`7y4qH+*JaR_iKQqBSxs#d6OAPE-PB zUQz^L)&n6}qX?4e)I+>j2{cpy6>`vl^>!Y?P+4+dOIZ);3FQKxTv!(drF9F-#JWn+ zE@95BluVt200E%!s2=bKRZe$cQCtpw8)5=Oqb6FV11t9wqq#~Lpp2O@lX#vk*U(s2 z3Yr;~yj+PZzaIjQ9GFkjLL5OvA`x@MVphTx1ZB6|36dsg8iy9RS{u}O9S^Fr42T$p z3#ejP4r#IyL=8+{P^vWthCw|#5MLnV@eINT)qWNrAB4__2+B+nfdDbwL)G$XAV_~e zKk1>C!Hy{}A~2vJxLJlc6i-?tQj~Dg zLQ6P9+E`owRsk36qQrVhVDXCVFo>eC46Bm&50A=#k|0zD!)NdmE#Qn~Vc-KuxIpqG z&UzVMvays^WSA(FBy#ymIKac@lmmPPAVR^4sKOwe%PDp{FxpHGNs9fv=7kQh2jrln zMARWwnH&J68gKAPSuLcMwZc4L7Nj*}$Y==&tFRUgREjiPVj5#%IG7HkmNzOD0z^Gv zHe7BP@R|}XQxv}gGlD`5&q1{ZHk8C`yo=WW1SM&PqbQDK%4nKnNzOv0lW;i9UXf&P z?ax^o?Sp2<7QIkb;rz8xQLLv*K~-!N8~WvFGofg-EjV6`rJ(XPK#Il*v0^IG#|J9_ z+&}sYc0exwL@`)d0Vc*XxZTD8oDu96+(t42Zlwg?Zlg13ixjJ;L3CB|Y7ssRaw;H? zkSkcAQLfOm{-yfe$Y>%yV5|eA45ui3h%y=@`jaJ$9b+KdOyd9e$c!2c+hU+!Oa`|u zxDyhCTVX$6FxFr5>R*Rna|#q4n`Bh{j?pzn*Qgj6mGM}0jnOqK21aE(R$adsT`5C9 zQy>UWKoR(>baV5XLin4ND9kT#A?e6mge?DR&O9i&BUJd9iXi4$#vP~can?X#lIHg0 zC0)F8+!Pv(Z+Iphil%FMeNG$Lz0)Ho1r?CBp{O$SY-B-)5h;!es4B{?4E7!MM1`m z(PFI|4lN9bP?1*D7HGk`;4T6p%T%q_eW|0spz|dl;+dW^$1~Ia%sF{^-~I0WefR$E zlDy=Ehs|Es|e_t#YpMk3Z6yzr&+QvjqLR?tpLoORJ8Q zzHL8Yo!^@h5Y#v0p@uytdQsAqp0-?hEy zi*X(MxurWBE`BchWXT509qwIH%2=;&SBguwUW8p20c9#(ksKJHr?c_MpdQg~rVmfh3& zu_ZE8XY@@(V!O77IQ?*JjN|Z2;fWPCBjD+>%UKe;@AU;uW!<-9H0yRvtlK)g?!EFA zM-Dys9yzwyA^0Or*`{$%Mo*;Y>Yg|VM-`;3+x}T??D82N%}^#?;+LNt&_b*gx%O4Q zzuFe7MGHETHWlu)Vz?X*liB&WyB0^twwxGIIVwPAyC?I~*BQ?ttJygd^R8##uoaxF zOghRuxLAxfI;SQp8Jh#0hY7|y#5Zh1(x-X<5*|9WVM}CK9xu*Ye0^KgnYhPSN9Wq) zgyoSg5vbP$-qH*E_Lh9r&@xPLnryAV)Hpj}x9#Q;9W3qi8(r>`9?9+>UppzSCBplw zdF%O2i@#i2wQ$0>=PJ?P?dmzr>hB!qR=Hfwc3%p(u%M4zWR>}PA?izPbs-d>ODSoMSAs_yY6xh)@MMMb++^w_y&jpU+?lS6JJ7cbr}&QCvaFsGn}?*1LW9vgT63r8!<+2Ro+}B;@-yS-I}pv2S*z zPt(oqX)S8!xvF@dw5<>B+?F?8Elp~C?JJ9S0u0I4VYz|N9B#pCZv+si#Wo0Fd9)ON<4>@J_(^ZqT*bMyA>p82wOrd7@2 zUuyQGTTksdbRpg4{z3?{T1^K9g@*tS;7(3Av!FDdpv;)~rc>KQ&8MtoSbX zvF`(Y`i7}hiJV$bm!IO=E3%t&5(H(~%}*7Z=aXBX?=W51Gs4whw>jzRmQ8sX5ZZO>1my zouVUFWlb-`ygWDucRzf%5qrU_9<7^ScO2d5l(=cK|8uv0-M{QBpI04PU~}%7qRs8v zOzpTtp{lpH<(oFojF;mNT{!Y${aB9Wc*`Me0bFAw0E|()g)kjebCVZx_aS{ zXCffTc|HvW=mPm%jL@i9IH^%kER#wL1}p^m`J1#jkwh673MzqCOPCLi)G!$|DPhL) z<%nDxL?zO)G#wR{78XsUB@tqh=|984&x8R06=lE~CRMUpkC`M)3oZuk&0;o_VNo$8 zNtg@d;fx@Sj$-gwJQe~=O>`=UIm3bBrz4eEWN^p;1XxL!i3WofW3!D$Bg@ETX>RbCRnX^H$(Je1XFrKM{5nVM$Ir|;tI_&gM`Th`;1rqskCzW zAiP>XzyjcdZNjx|l!dTWD)vwdy+N7^Kn5K8T?>6Q_#R?MQhLoY9YIM`DYe0UChLM-4=e3(Os_%Kf);KCvSiojeh#UX`! zF~LXBArSL)G^k2Ed8k)rC=x&^DFGMdaz!w~=b|u=%NN49QlWrRQo$t!D33t+JPQ;_ zU?Ccv3J2+=Rd@o$)~XXM8)m|>fbdWWlf&wF+#(52#tlkf0D6E{lNzJ`wQ@AAqM{7A znNL*6MTC4VUx0{Ep;*9wtrSD)^q>~as3^kX3M@P3#9$yCKrL>rQ~+R+gJ`fI9fcb- zx@e6iS;92Cz%W}5Zp%SKk+=a5#tjqzML0YRMKOdI%|S6f2jd|=2v`o$*O0Vw`G3}6qVAy>R%?)mS$owENy||M1Kf+Je49XegdriEg}(DCs1I1 z3>54uIsH4uz(bWHltKxRHvtLrIEV|-nm@(X5gcy=QV#7XjYcVXyYmGuB}I14-?i-CF*L6~uc{qjtpAbW|Y zuPggAZf;%{)$SE(_CO&8PZ!4!j_b(+ER1Xl0wF>sY{o59ru6a#N)%}BNSejSP&u91 zuz$+`%RsfNC9V-ADTyViR>?)FK#IZ0z{p6~&=81142`V}OsotIwG9lc3=DpiWQ3t; g$jwj5OsmAyU|pc4Gl52%5`)78&qol`;+0G}*b1^@s6 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_green_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_green_e.png deleted file mode 100644 index 3cd6ecc1172286ef940731534bfee020212c60a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF|-nm@(X5gcy=QV#7XjYcVXyYmGuB}I14-?i-CF*L6~uc{qjtpAbW|Y zuPggAZf;%{HKB#(tw13KPZ!4!j_b(+ER1Xl0wF>sY{o59ru6a#N)%}BNSejSP&u91 zuz$+`%RsfNC9V-ADTyViR>?)FK#IZ0z{p6~&=81142`V}OsotIwG9lc3=DpiWQ3t; g$jwj5OsmAyU|pc4Gl52%5`)78&qol`;+0A7$-o&W#< diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_red.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_red.png deleted file mode 100644 index 8c875091209141c69b9473fd120fe58364625879..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFN#POMYt90i_sAg8YIR9G=}s196hP-CYFdh=jGLR6MYBmxO9UvS;OXKR!f`!WfQ6AwK_EoPgw42R%9LK-K#2m)9Z9no87ikU z8}?86e;KG&wZt`|BqgyV)hf9t6-Y4{85kMq8X5voh@r8Sfr*u&p|*j6m4U&pl8i7E h4Y~O#nQ4`n8Vt-K8dQRx`T;dCc)I$ztaD0e0ssXKSP=jK diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_red_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps1_red_e.png deleted file mode 100644 index 3571480f4fc4fa2bb82c2cf01f004bfd076050a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFN#POMYt90i_sAg8YIR9G=}s196hP-CYFdh=jGLR6MLFs8VUUXzJY5_^IIbrPurRVI2!sfkuo<^ZnbOM}C{dufBWV^RL*;a4 z!~QA%F9X%8mbgZgq$HN4S|t~y0x1R~10y3{Lqi}6F*LR^FtIW;)HX1%GBEg6k`acY gAvZrIGp!O+gMm3jgG%sIKcEH%Pgg&ebxsLQ0Iu3uCjbBd diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2.png deleted file mode 100644 index 06b0456c1962e2ab4e934d1a415b338f8e8d777d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 331 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CDO3=9p;3=BX21L>Cx45bDP46hOx7_4S6Fo@?*ia+WGRLc|K6XN>+|9@>Aga4D2 zfegEoGTVUSj3q&S!3+-1Zlr-YN#5=*3>~bp9zYIffk$L90|S2|2s5s*U!DmRWH0gb zb!C6bA;ind>iQ%7E>K9y)5S4_<9ad&FK!lvI6-E$sR$z z3=CDO3=9p;3=BX21L>Cx45bDP46hOx7_4S6Fo@?*ia+WGRLc|K6XN>+|9@>A12c6N zAmc($)=Z!{V@Z%-FoVOh8)+a;lDE4HLkFv@2av;A;1OBOz`&mf!i+2ImuCV6*-Jcq zUD=;;bMvwY+?8G=0~C_-ba4#fxSq_x%bSqU!6X85sO3$p}Nykei>9nO2FZ Y!N44%K_&R9A5a5>r>mdKI;Vst0LqV400000 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps2_e.png deleted file mode 100644 index 06b0456c1962e2ab4e934d1a415b338f8e8d777d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 331 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CDO3=9p;3=BX21L>Cx45bDP46hOx7_4S6Fo@?*ia+WGRLc|K6XN>+|9@>Aga4D2 zfegEoGTVUSj3q&S!3+-1Zlr-YN#5=*3>~bp9zYIffk$L90|S2|2s5s*U!DmRWH0gb zb!C6bA;ind>iQ%7E>K9y)5S4_<9ad&FK`{kKHLG}_) zUsv{L+}yk@BDc!Yzz*?raSY+Oo-Dw^$fh6=B4om5+%jcKFK?hkf#!~+S&R&o)0qwX zr~JPR)UI0M8c~vxSdwa$T$Bo=7>o>zjC2hRfhfe#*vi1f%Fs~Tz`)AD;8#gT7>b76 f{FKbJN=yv~<`4}k!B72w8W=oX{an^LB{Ts5XlGg8 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_green_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_green_e.png deleted file mode 100644 index 59a130b9ac363318992285ed684bad68b43da562..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF`{kKHLG}_) zUsv{L+}yk@LdK$pftE2Sc)B=-a9mFoU}0oa5C{=6VKZ)-GNqR{P@+I{N75`thRW&8 zhW%6iUk0jGEpd$~Nl7e8wMs5Z1yT$~21Z7@hK4{CVrXn-U}9xxsBK_iWnl2DBqIz( gLvDUbW?Cht1_N`529@Baen1Tjp00i_>zopr02fbLTmS$7 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_yellow.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_yellow.png deleted file mode 100644 index 2b7b649936ef04cd8b60960d6c7dd37fccdefea4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF`sfGj48P7Li+JX<&zVx;Tb#Tu&BYVPsPf2oW-2Gj5qOrI$BQqCj&;(kw=X%IVC8 z{Zsy525MI=ag8WRNi0dVN-jzTQVd20Mn<}ZhCmczXl!L*Vr6KkZD3$!VDPIXBMe1D fZhlH;S|z3i19ON5mEfm-Kn)C@u6{1-oD!M<=u}xu diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_yellow_e.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/semaphore_lamps3_yellow_e.png deleted file mode 100644 index aed099ee9187a07f06cbfde83376d97bb9b45cbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF`sfGj48P7KzITwDf>N3Z5>GAsp9}1y~r_6a+$qOxTQDrcCMO4U{O*+>tbkk)d)r zvtj>~|CfPkRZCnWN>UO_QmvAUQh^kMk%5tsuAw0ig%}!J8JJiZ8fqIDSQ!}nD#-{# h(U6;;l9^VCslmV;qCqA2sUJ`SgQu&X%Q~loCIARBS%3fl diff --git a/src/main/resources/assets/opensignals/textures/blocks/sh/sh.png b/src/main/resources/assets/opensignals/textures/blocks/sh/sh.png index 1b6c089cc5253f0f76abf0d882434325dc07ea69..8ddcd866114cf27835875c28688cfcf67868f6af 100644 GIT binary patch literal 4195 zcmeHKYitx%6dnrN2ew;+NL5IuQzIyyoyWd9W0$4uE_Ne}Yg@6r(%zl9vmNN}?9R@1 zx0Q#Y5W!b0K^_)TzycN#2^K^&h9Fczq7XxTBx-{gtCAF7lo%B6%=Q^gOcVXrO?GGQ zx!?KjIp00!X77f;f(LVR?#jV1EZ0}zsYK6w{hM_w`YrtBCP0tV&DAwpB}n2?RgvTd zh-*zzh{KdDVOZ*maNuO_DLU)M;~QUig1fXe)_U*ecgnk{ytg;*A!4`Y?RZjK`PHFc zd(JFsDOo`-&e^tMqk5#RWyu4~rq+V&=j%H56`owU_Pwibz1&my+x$(Hkvqt#yMDhd z_)7NX^M@R}u4k$CFTRml-etW zbm51%yX`vGW6nM}dHrpjXPyflo|F6J;g0E-zuvLFoytD9Xw8v1voB)UxTj^eJK%G> z2NFVQw61!|S#fI4w9~a!?UnaWzY_2ixf2)6_g|{%sF^Ua{owhIr_Q$5o`1E-7mMA# zbYkA>l7-Wkwk8tMDHBeb@*> znP-pR=;(QTUE!XrUJ36rU|cX!!=zT>X0wo3ZW?nxVj`HqrHxtBio zKlI(Z4^In1U(xItJFPuyKX`HJmSwBIS*q4_Z!0Q(W#^2%Nzb;MUp}#QbMEHU`qJI| z@A`Hkw`IylOIj~3-_hB7wzgnq{j59R_+(mn#zPgvEtA+E_P6Csd}Oh$a{jBb>#I|) zE7z+ox14=+Tya;%@<0){`l{>tmj@TM?o>Br#M*A2KI%GyeQiF!{IhF)hr`DfV7-=T zd*Vjty>y?idCwm23r}?0qp>e9Ty}P=nOUyyTZ*`rEqenc8NH!j{Y`Z}cU(Pm{JqY; z*zcJ5+JSHH?(WVnpdPu_{9@9i^BPUU>X;Ge{lF6hwX)!Bmh+;U7qiB|5SrQ@0cvD0JDKZi-)+y2)9vBx? zIjYG@1lKu1P)TS`f)5NK|n(~ z2uP8!my%XnshtFNi-WX6=#V(hW~UiAjLH{@Yak*(oeGhgWyAv|hsa7+nuJ!tN?JJw zO_tIuAOT(a%b{2}z z1}&wMK_v?OJVgxyw4HJogdi1-gp3JYaK1d?a}umMy{cgeGyqLP4yXs@h^QpvL*QyT z468Jt>&ZAQG|SjIhuy|8w8J(8S_suRszsfZq0JV%F{5t`kJ3TX0=-fZfni74@NN|X zO;M{ArNK$)A>g{_;Itn#ln6B70UAW4G;8Gq v3T_#1DpQ?Aq{h!XS%+b>y2j02HvZ>75ft-z7kJ*7TetQv#x~Sz literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF2OC7#SED>Ka(+8d`)H8e18dSQ(jV n8yHv_7`&?vu|v_2o1c=IR*74~e6=@CKn)C@u6{1-oD!M2OC7#SED>Ka(+8d`)H8e18dSQ(jV n8yHv_7`&?vu|v_2o1c=IR*74~e6=@CKn)C@u6{1-oD!M- z|GLTU%slV!`MuBcd!F~nPMd$_ih{hkc?g0OaFw1Kct!PZ)-?Fb9qT^t0veS#w{>Rlldyo%qmv-=+Ga^|$1AzS?{A@pGN) zdJmU!vDnPD`O`O+uP#}8Ad!g9y5)4?j8M)3@12Xj-o(A+{cBFo%~UcS8=O94|3feD zZzUi2xV-FztqKGUy7ZxnR|ZeIdfIDDD6ZtFHFE{8bNI zYpM=QuK%2IUA{$Cy_di_kBL6k_uK#3U z@bB`8l}OqW?M&P_elIb|wRCiNw{PyVMPr|Tc-h&f=H$A*+*!)(-21Y>JUbow&ez<~ zUwrLvC*M9k82bSc|MJR}yZZWO%*Iy@wCqS0YJ&smeNCHOS9$dU7UPb?)@zbri`Dz8 zSV57^yr=|#IVDG7?;%KqD;4F14M0N!AS6Ycru371Xw@ ztP@%`2#jcQEy=4$v5-Ip8jq&ra3s#AoF;>ph4;D{H=zbZ+u$_S`~0X|Q2|PuX)}R& zQ&JOUT9SuWsA7<<@hl&vfKN_Sqoze!98V^b=A^}}s3DwW7zQUOoT4y@z~apjjZa~b zc$rR-;qZXCph{6qQX;6%$p@5#<}{h$Iyw@c9QFA|=_B!B6`&q?ijU%?nZRWkAMX*@ zyiJf~IG|tjh}XfBir0X+l28TUZ2}RkY&?Z1jQU3tYS>6e6mSp*GK9wAuH=L*S8zW6 zsD~~=NRp$57ZiH}Qj>yXVoiumUop}d9|&|G<(+^Y$=v`$l+VX{6d|F9$9bG4eScO| z1W9C#TdOrl(Y)P(0V+sibbw|shfQQKYk&e4lA=k9C&p26k+{Z31fWwva!H=jgHz9w?F5cn_}uNJ>yNOA;)_)R8upwy}hL zF+sA#IJ_cC!RB8>>&FMJ$P~R&io^Yz4O8Y!)q+^&Df1YXjKhSY#<5^|A(KL!Zvvtb zC*;a335|Rt1mOG_ZrBmK^b5^kcM!oqz$#**h2miu2@A#pUcl@Y%0iHKnzRM!iR^JD zs3mz7EDb>&p;oX#4Xx0H!=+j@5ua=XdL5u-7)fAbk~vKHaI&~QF-Eejz<;Jkg#j2h zVxV8f21gg1g!t$v9M(%8I=|y*xDLPL4v>0klS%12CD)W(lTu((;HmDKl50{5ObR^J zUB8)Jd1EhAAOimZCE=^m7ydoF;cM1y{;E3f;&NhW=zs4Xk<-v}d$e**96<_s{hQV0 zIwC=1j>h@CIsJJhh34Ge&4C@zRKj_d*5zIh8qnfvn>H5>Y-%_=G<3EowonxF WZ}z9H+ZOGCK!o$I^t`sLVarcs;^jvG literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/opensignals/textures/blocks/sh/shield_mech_e.png b/src/main/resources/assets/opensignals/textures/blocks/sh/shield_mech_e.png new file mode 100644 index 0000000000000000000000000000000000000000..1db3c7a7d305511247686376f0b5c9fa21b69e36 GIT binary patch literal 4237 zcmeHLYj6|S6<#}}b`7?mLki(BUCRtkj92^6YOUR|kX=h)5o8qGNlZ&?R=aoQ1wB@~ zD@#@iCN!jwWI{{h@TkK8j>987Chb5>X{Tje;xd^w(2kQn2zDrG-3CTUOEGQfs$ z-a(MOr{%i3fUmA@JSCV&_oi>T>icUJU1)9UZLC;)Bj72mOI)^9Tx&VjGGk`%iA%@6 zezCXp(krFDczo`Z;0X#n*oAf8-B8ShFYye5K3F_tPU=f3kDk?yqeA-8!{pcyDRhclMW;%z3WY z_R_gMUBz9gXPk$QEcjq1yZeEkf4O^b!^@{L7hC5))VA!wlfPV4oBv3?_5L~3pNJMW!X+r3}?c7FW8zb~9|zljXl zE^YYL?a|jGZ!{noyV9GudwMA`>Pz?Zcwg8u%qa2qE?;*Is|AJbKkh1JckO;PP??_z z-ST&=ANl-8r_TQH^l1F=hkYP2+(;n6$wW*F6FYCyd1nY%(xXbA^Jv_wZ$Jm>tZTE zX&Y@LFmFn3r>x71&}vnbxJJ*4F$(zPvbO2E!r^!_nY1PCwwM~iNtR`Cg2E{Zg9uFP zi0XU_i)v*CMV7+@G(nXWU5-UjgOd-&61vN3h2!XWd=bU(pP-LwV=6#B@D#7$q>aEM z5j@vJ)4lDGWGtXh^w64Nr{ax3izQS6c-ui#FUzG6g$aKpp@z+LL;(k35P?t)&Pq<2 za;487nD8(p2+0w}^nzkfLh7<~PpnC?86##oxq(3U3EoNQ@!U-?MEU)kCnh9}@O&PZ z)tH|XV}dMl=B+&_Ivp&-V?e56G1@7KSdeu{7)z5ZFEMrkP-G63FRJN$Q~(AQB)7?s zhbKupLk1a)l_UnE#h`@ofF`jjilCg3pL7USITUMD8CE49&W*~T5+Ris1Wb@+2uvWI z4vaQVK}Mo6hGYl_LE1^dA(~X8z^#a>5gsn59N|L%SE3{IqJESt@QqGnrgypT;niWOQRdnxT3Pj->P!fJB6+7mB2tTtvtJJU65X8b8N8S-fIRzP_O?zrEs!UqSK;YYE;;%tU#OH1Boc!YYt^WZ|>+cQ# literal 0 HcmV?d00001 From 2ec6becb9fcb159b966eed94261c416973176274 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 5 Nov 2024 14:48:09 +0100 Subject: [PATCH 26/26] ref: rework semaphore lamps --- .../animations/semaphoresignal.json | 96 +++ .../modeldefinitions/semaphoresignal.json | 32 +- .../semaphore_signals/sema_distant_lamp1.json | 11 +- .../semaphore_signals/sema_distant_lamp2.json | 11 +- .../semaphore_signals/sema_distant_mast2.json | 45 +- .../sema_main_mast5_hp2.json | 92 ++- .../semaphore_signals/sema_main_mast7.json | 606 +++++++++++++++++- .../semaphore_signals/sema_main_wing1.json | 72 ++- .../sema_main_wing1_lamp.json | 42 ++ .../semaphore_signals/sema_main_wing1_on.json | 1 - .../sema_main_wing1_small.json | 72 ++- .../sema_main_wing1_small_lamp.json | 42 ++ .../semaphore_signals/sema_main_wing2.json | 62 +- .../sema_main_wing2_lamp.json | 35 + .../semaphore_signals/sema_main_wing2_on.json | 1 - .../sema_main_wing2_small.json | 62 +- .../sema_main_wing2_small_lamp.json | 35 + .../sema_mainsmall_mast2_hp2.json | 92 ++- .../sema_mainsmall_mast4.json | 591 ++++++++++++++++- .../textures/blocks/semaphore/lamp_green.png | Bin 4321 -> 4544 bytes .../textures/blocks/semaphore/lamp_off.png | Bin 0 -> 4540 bytes .../textures/blocks/semaphore/lamp_red.png | Bin 4321 -> 4543 bytes .../textures/blocks/semaphore/lamp_yellow.png | Bin 4321 -> 4543 bytes .../blocks/semaphore/lamps_shield_half.png | Bin 0 -> 5340 bytes 24 files changed, 1948 insertions(+), 52 deletions(-) create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_lamp.json delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_on.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small_lamp.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_lamp.json delete mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_on.json create mode 100644 src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small_lamp.json create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_off.png create mode 100644 src/main/resources/assets/opensignals/textures/blocks/semaphore/lamps_shield_half.png diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 12d3b6d8e..9ba77f465 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -22,6 +22,30 @@ } ] }, + "semaphore_signals/sema_main_wing1_lamp": { + "translationX": 0.6875, + "translationY": 7.5625, + "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "with(WING1.FALSE) && with(SEMATYPE.MAIN)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": 0 + }, + { + "predicate": "with(WING1.TRUE) && with(SEMATYPE.MAIN)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": -25 + } + ] + }, "semaphore_signals/sema_main_wing2": { "translationX": 0.6875, "translationY": 5.5625, @@ -44,6 +68,30 @@ } ] }, + "semaphore_signals/sema_main_wing2_lamp": { + "translationX": 0.6875, + "translationY": 5.5625, + "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "with(WING2.FALSE) && with(SEMATYPE.MAIN)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": 0 + }, + { + "predicate": "with(WING2.TRUE) && with(SEMATYPE.MAIN)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": -25 + } + ] + }, "semaphore_signals/sema_main_wing1_small": { "translationX": 0.6875, "translationY": 4.5625, @@ -66,6 +114,30 @@ } ] }, + "semaphore_signals/sema_main_wing1_small_lamp": { + "translationX": 0.6875, + "translationY": 4.5625, + "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "!hasandis(WING1) && with(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": 0 + }, + { + "predicate": "hasandis(WING1) && with(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": -25 + } + ] + }, "semaphore_signals/sema_main_wing2_small": { "translationX": 0.6875, "translationY": 2.5625, @@ -88,6 +160,30 @@ } ] }, + "semaphore_signals/sema_main_wing2_small_lamp": { + "translationX": 0.6875, + "translationY": 2.5625, + "translationZ": 0, + "pivotX": -0.6875, + "pivotY": -0.5625, + "pivotZ": 0, + "animationConfigs": [ + { + "predicate": "!hasandis(WING2) && with(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": 0 + }, + { + "predicate": "hasandis(WING2) && with(SEMATYPE.MAIN_SMALL)", + "mode": "ROTATION", + "rotationAxis": "Z", + "animationSpeed": 0.5, + "rotation": -25 + } + ] + }, "semaphore_signals/sema_distant_plate": { "translationX": 0, "translationY": 3.875, diff --git a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json index 4f4bab576..5d7f136b9 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json @@ -66,7 +66,13 @@ "semaphore_signals/sema_mainsmall_mast2_hp2": { "textures": [ { - "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2)" + "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2) && with(WING2.FALSE)" + }, + { + "blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2) && with(WING2.TRUE)", + "retexture": { + "lamp": "lamp_yellow_shield" + } } ], "y": 2 @@ -106,7 +112,13 @@ "semaphore_signals/sema_mainsmall_mast4": { "textures": [ { - "blockstate": "with(SEMATYPE.MAIN_SMALL)" + "blockstate": "with(SEMATYPE.MAIN_SMALL) && with(WING1.FALSE)" + }, + { + "blockstate": "with(SEMATYPE.MAIN_SMALL) && with(WING1.TRUE)", + "retexture": { + "lamp": "lamp_green_shield" + } } ], "y": 4 @@ -122,7 +134,13 @@ "semaphore_signals/sema_main_mast5_hp2": { "textures": [ { - "blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2)" + "blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2) && with(WING2.FALSE)" + }, + { + "blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2) && with(WING2.TRUE)", + "retexture": { + "lamp": "lamp_yellow_shield" + } } ], "y": 5 @@ -138,7 +156,13 @@ "semaphore_signals/sema_main_mast7": { "textures": [ { - "blockstate": "with(SEMATYPE.MAIN)" + "blockstate": "with(SEMATYPE.MAIN) && with(WING1.FALSE)" + }, + { + "blockstate": "with(SEMATYPE.MAIN) && with(WING1.TRUE)", + "retexture": { + "lamp": "lamp_green_shield" + } } ], "y": 7 diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json index b1eb73fdf..76d8fb764 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp1.json @@ -2,22 +2,17 @@ "credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": { - "1": "opensignals:blocks/default/shield_black", "3": "opensignals:blocks/semaphore/lamps_shield_off", "particle": "opensignals:blocks/default/shield_black" }, "elements": [ { "name": "shield", - "from": [10.5, 2, 6], - "to": [16.5, 12, 7], + "from": [10.5, 2, 6.9], + "to": [16.5, 12, 6.9], "faces": { "north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"}, - "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, - "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, - "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, - "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, - "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"} + "south": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"} } } ], diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json index dea9cb314..f08a65cbb 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_lamp2.json @@ -2,22 +2,17 @@ "credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": { - "1": "opensignals:blocks/default/shield_black", "3": "opensignals:blocks/semaphore/lamps_shield_off", "particle": "opensignals:blocks/default/shield_black" }, "elements": [ { "name": "shield", - "from": [-0.5, 13, 6], - "to": [5.5, 23, 7], + "from": [-0.5, 13, 6.9], + "to": [5.5, 23, 6.9], "faces": { "north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#3"}, - "east": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, - "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, - "west": {"uv": [0, 0, 0.5, 5], "texture": "#1"}, - "up": {"uv": [0, 0, 3, 0.5], "texture": "#1"}, - "down": {"uv": [0, 0, 3, 0.5], "texture": "#1"} + "south": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"} } } ], diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json index 954818c29..aa8fa4b46 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_distant_mast2.json @@ -4,6 +4,7 @@ "textures": { "0": "opensignals:blocks/default/mast", "2": "opensignals:blocks/default/shield_gray", + "3": "opensignals:blocks/default/shield_black", "particle": "opensignals:blocks/semaphore/lamp_yellow", "lamp1": "opensignals:blocks/semaphore/lamp_yellow", "lamp2": "opensignals:blocks/semaphore/lamp_yellow" @@ -38,12 +39,12 @@ "from": [4.5, 19, 7], "to": [7, 21, 9], "faces": { - "north": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + "north": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#3"} } }, { @@ -52,11 +53,11 @@ "to": [4.5, 22, 11], "faces": { "north": {"uv": [0, 0, 4, 4], "texture": "#lamp1"}, - "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + "east": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#3"} } }, { @@ -65,11 +66,11 @@ "to": [15.5, 7, 11], "faces": { "north": {"uv": [0, 0, 4, 4], "texture": "#lamp2"}, - "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + "east": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#3"} } }, { @@ -77,12 +78,12 @@ "from": [9, 4, 7], "to": [11.5, 6, 9], "faces": { - "north": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "east": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "south": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "west": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + "north": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#3"} } }, { diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast5_hp2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast5_hp2.json index 382b85ce6..86477982d 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast5_hp2.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast5_hp2.json @@ -1 +1,91 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/mast", "1": "opensignals:blocks/default/shield_black", "2": "opensignals:blocks/default/shield_gray"}, "elements": [{"name": "wire_wing2", "from": [11, 0, 8.25], "to": [11.5, 11, 8.75], "faces": {"north": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, "east": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, "south": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, "west": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}}}, {"name": "mast", "from": [10.5, 8, 6.5], "to": [12, 9, 9], "faces": {"north": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, "east": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, "south": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, "west": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, "up": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"}, "down": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"}}}, {"name": "mast", "from": [10.5, 8, 2.5], "to": [11.5, 9, 5.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}, {"name": "lamp", "from": [3.5, 3, 6.5], "to": [8.5, 5, 8.5], "faces": {"north": {"uv": [0, 0, 3, 5], "texture": "#1"}, "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 5], "texture": "#1"}}}, {"name": "lamp", "from": [-0.5, 2, 5.5], "to": [3.5, 6, 9.5], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#1"}, "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, "down": {"uv": [0, 0, 2, 2], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -80, 0], "color": 0, "children": [{"name": "mast5_hp2", "origin": [0, -80, 0], "color": 0, "children": [0, 1, 2, 3, 4]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/mast", + "1": "opensignals:blocks/default/shield_black", + "2": "opensignals:blocks/default/shield_gray", + "particle": "opensignals:blocks/semaphore/lamp_off", + "lamp": "opensignals:blocks/semaphore/lamp_off" + }, + "elements": [ + { + "name": "wire_wing2", + "from": [11, 0, 8.25], + "to": [11.5, 11, 8.75], + "faces": { + "north": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, + "south": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"} + } + }, + { + "name": "mast", + "from": [10.5, 8, 6.5], + "to": [12, 9, 9], + "faces": { + "north": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"}, + "down": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"} + } + }, + { + "name": "mast", + "from": [10.5, 8, 2.5], + "to": [11.5, 9, 5.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + }, + { + "name": "lamp", + "from": [3.5, 3, 6.5], + "to": [8.5, 5, 8.5], + "faces": { + "north": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "down": {"uv": [0, 0, 3, 5], "texture": "#1"} + } + }, + { + "name": "lamp", + "from": [-0.5, 2, 5.5], + "to": [3.5, 6, 9.5], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#lamp"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -80, 0], + "color": 0, + "children": [ + { + "name": "mast5_hp2", + "origin": [0, -80, 0], + "color": 0, + "children": [0, 1, 2, 3, 4] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast7.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast7.json index 9de525659..fe1d8e4ec 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast7.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_mast7.json @@ -1 +1,605 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/mast", "1": "opensignals:blocks/default/shield_black", "2": "opensignals:blocks/default/shield_gray", "6": "opensignals:blocks/default/white", "10": "opensignals:blocks/default/red"}, "elements": [{"name": "mast", "from": [12.5, 0, 5.5], "to": [13.5, 13, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 0, 5.5], "to": [9.5, 13, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 0, 9.5], "to": [9.5, 13, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 13, 5.5], "to": [13.5, 16, 10.5], "faces": {"north": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "east": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "south": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "west": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "up": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"}, "down": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 0, 9.5], "to": [13.5, 13, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 0, 5.5], "to": [10.5, 1, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 2, 5.5], "to": [10.5, 3, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 3, 5.5], "to": [11.5, 4, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 4, 5.5], "to": [12.5, 5, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 6, 5.5], "to": [12.5, 13, 6.5], "faces": {"north": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, "south": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, "up": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 12, 8.5], "to": [9.5, 13, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 11, 7.5], "to": [9.5, 12, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 10, 6.5], "to": [9.5, 11, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 8, 6.5], "to": [9.5, 9, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 7, 7.5], "to": [9.5, 8, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 6, 8.5], "to": [9.5, 7, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 2, 6.5], "to": [9.5, 5, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 0, 6.5], "to": [9.5, 1, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 0, 9.5], "to": [12.5, 1, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 2, 9.5], "to": [12.5, 3, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 3, 9.5], "to": [11.5, 4, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 4, 9.5], "to": [10.5, 5, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 6, 9.5], "to": [10.5, 7, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 7, 9.5], "to": [11.5, 8, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 8, 9.5], "to": [12.5, 9, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 10, 9.5], "to": [12.5, 11, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 11, 9.5], "to": [11.5, 12, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 12, 9.5], "to": [10.5, 13, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 12, 6.5], "to": [13.5, 13, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 11, 7.5], "to": [13.5, 12, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 10, 8.5], "to": [13.5, 11, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 8, 8.5], "to": [13.5, 9, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 8.5, 2.5], "to": [11.5, 9.5, 5.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 7, 7.5], "to": [13.5, 8, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 6, 6.5], "to": [13.5, 7, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 4, 6.5], "to": [13.5, 5, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 3, 7.5], "to": [13.5, 4, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 2, 8.5], "to": [13.5, 3, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 0, 8.5], "to": [13.5, 1, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "bracket_wire_wing1", "from": [13.5, 3, 7.5], "to": [15.5, 4, 8.5], "faces": {"north": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"}}}, {"name": "bracket_wire_wing1", "from": [14.25, 8.5, 4.5], "to": [15.25, 9.5, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, "east": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, "west": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 2], "texture": "#1"}}}, {"name": "wire_wing1", "from": [14.5, 0, 7.75], "to": [15, 9, 8.25], "faces": {"north": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, "east": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, "south": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, "west": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}}}, {"name": "lamp", "from": [-0.5, 1, 5.5], "to": [3.5, 5, 9.5], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#1"}, "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, "down": {"uv": [0, 0, 2, 2], "texture": "#1"}}}, {"name": "lamp", "from": [3.5, 2, 6.5], "to": [8.5, 4, 8.5], "faces": {"north": {"uv": [0, 0, 3, 5], "texture": "#1"}, "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 5], "texture": "#1"}}}, {"name": "sign1", "from": [9, -7, 4.5], "to": [13, 7, 5.5], "faces": {"north": {"uv": [0, 0, 2, 16], "texture": "#10"}, "east": {"uv": [0, 0, 2, 13], "texture": "#6"}, "south": {"uv": [0, 0, 2, 13], "texture": "#6"}, "west": {"uv": [0, 0, 2, 13], "texture": "#6"}, "up": {"uv": [0, 0, 2, 13], "texture": "#6"}, "down": {"uv": [0, 0, 2, 13], "texture": "#6"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -112, 0], "color": 0, "children": [{"name": "mast7", "origin": [0, -16, 0], "color": 0, "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/mast", + "1": "opensignals:blocks/default/shield_black", + "2": "opensignals:blocks/default/shield_gray", + "6": "opensignals:blocks/default/white", + "10": "opensignals:blocks/default/red", + "particle": "opensignals:blocks/semaphore/lamp_red", + "lamp": "opensignals:blocks/semaphore/lamp_red" + }, + "elements": [ + { + "name": "mast", + "from": [12.5, 0, 5.5], + "to": [13.5, 13, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 0, 5.5], + "to": [9.5, 13, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 0, 9.5], + "to": [9.5, 13, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 13, 5.5], + "to": [13.5, 16, 10.5], + "faces": { + "north": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "east": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "south": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "west": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "up": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"}, + "down": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 0, 9.5], + "to": [13.5, 13, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 0, 5.5], + "to": [10.5, 1, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 2, 5.5], + "to": [10.5, 3, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 3, 5.5], + "to": [11.5, 4, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 4, 5.5], + "to": [12.5, 5, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 6, 5.5], + "to": [12.5, 13, 6.5], + "faces": { + "north": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, + "south": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, + "up": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 12, 8.5], + "to": [9.5, 13, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 11, 7.5], + "to": [9.5, 12, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 10, 6.5], + "to": [9.5, 11, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 8, 6.5], + "to": [9.5, 9, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 7, 7.5], + "to": [9.5, 8, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 6, 8.5], + "to": [9.5, 7, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 2, 6.5], + "to": [9.5, 5, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 0, 6.5], + "to": [9.5, 1, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 0, 9.5], + "to": [12.5, 1, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 2, 9.5], + "to": [12.5, 3, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 3, 9.5], + "to": [11.5, 4, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 4, 9.5], + "to": [10.5, 5, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 6, 9.5], + "to": [10.5, 7, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 7, 9.5], + "to": [11.5, 8, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 8, 9.5], + "to": [12.5, 9, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 10, 9.5], + "to": [12.5, 11, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 11, 9.5], + "to": [11.5, 12, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 12, 9.5], + "to": [10.5, 13, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 12, 6.5], + "to": [13.5, 13, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 11, 7.5], + "to": [13.5, 12, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 10, 8.5], + "to": [13.5, 11, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 8, 8.5], + "to": [13.5, 9, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 8.5, 2.5], + "to": [11.5, 9.5, 5.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 7, 7.5], + "to": [13.5, 8, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 6, 6.5], + "to": [13.5, 7, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 4, 6.5], + "to": [13.5, 5, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 3, 7.5], + "to": [13.5, 4, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 2, 8.5], + "to": [13.5, 3, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 0, 8.5], + "to": [13.5, 1, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "bracket_wire_wing1", + "from": [13.5, 3, 7.5], + "to": [15.5, 4, 8.5], + "faces": { + "north": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"} + } + }, + { + "name": "bracket_wire_wing1", + "from": [14.25, 8.5, 4.5], + "to": [15.25, 9.5, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 2], "texture": "#1"} + } + }, + { + "name": "wire_wing1", + "from": [14.5, 0, 7.75], + "to": [15, 9, 8.25], + "faces": { + "north": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, + "south": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"} + } + }, + { + "name": "lamp", + "from": [-0.5, 1, 5.5], + "to": [3.5, 5, 9.5], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#lamp"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#1"} + } + }, + { + "name": "lamp", + "from": [3.5, 2, 6.5], + "to": [8.5, 4, 8.5], + "faces": { + "north": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "down": {"uv": [0, 0, 3, 5], "texture": "#1"} + } + }, + { + "name": "sign1", + "from": [9, -7, 4.5], + "to": [13, 7, 5.5], + "faces": { + "north": {"uv": [0, 0, 2, 16], "texture": "#10"}, + "east": {"uv": [0, 0, 2, 13], "texture": "#6"}, + "south": {"uv": [0, 0, 2, 13], "texture": "#6"}, + "west": {"uv": [0, 0, 2, 13], "texture": "#6"}, + "up": {"uv": [0, 0, 2, 13], "texture": "#6"}, + "down": {"uv": [0, 0, 2, 13], "texture": "#6"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -112, 0], + "color": 0, + "children": [ + { + "name": "mast7", + "origin": [0, -16, 0], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1.json index 121a896e5..4f7ec4adc 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1.json @@ -1 +1,71 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "8": "opensignals:blocks/semaphore/semaphore_lamps1_red"}, "elements": [{"name": "wing1", "from": [-14, 7, 3.5], "to": [18, 11, 4.5], "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "texture": "#4"}, "east": {"uv": [0, 6.5, 0.5, 8.5], "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 180, "texture": "#4"}, "west": {"uv": [15.5, 6.5, 16, 8.5], "texture": "#4"}, "up": {"uv": [0, 6, 16, 6.5], "texture": "#4"}, "down": {"uv": [0, 8.5, 16, 9], "texture": "#4"}}}, {"name": "wing1", "from": [-13, 11, 3.5], "to": [-9, 12, 4.5], "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "up": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "wing1", "from": [-13, 6, 3.5], "to": [-9, 7, 4.5], "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "down": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "shield", "from": [-3.6434, 0.06802, 4.5], "to": [6.3566, 6.06802, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#8"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -112, 0], "color": 0, "children": [{"name": "wing1", "origin": [0, 9, -5.5], "color": 0, "children": [0, 1, 2, {"name": "lamp1", "origin": [-1, 8, -5.5], "color": 0, "children": [3]}]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "4": "opensignals:blocks/semaphore/semaphore" + }, + "elements": [ + { + "name": "wing1", + "from": [-14, 7, 3.5], + "to": [18, 11, 4.5], + "faces": { + "north": {"uv": [0, 0.5, 16, 2.5], "texture": "#4"}, + "east": {"uv": [0, 6.5, 0.5, 8.5], "texture": "#4"}, + "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 180, "texture": "#4"}, + "west": {"uv": [15.5, 6.5, 16, 8.5], "texture": "#4"}, + "up": {"uv": [0, 6, 16, 6.5], "texture": "#4"}, + "down": {"uv": [0, 8.5, 16, 9], "texture": "#4"} + } + }, + { + "name": "wing1", + "from": [-13, 11, 3.5], + "to": [-9, 12, 4.5], + "faces": { + "north": {"uv": [13.5, 0, 15.5, 0.5], "texture": "#4"}, + "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "south": {"uv": [13.5, 3, 15.5, 3.5], "texture": "#4"}, + "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "up": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"} + } + }, + { + "name": "wing1", + "from": [-13, 6, 3.5], + "to": [-9, 7, 4.5], + "faces": { + "north": {"uv": [13.5, 2.5, 15.5, 3], "texture": "#4"}, + "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "south": {"uv": [13.5, 5.5, 15.5, 6], "texture": "#4"}, + "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "down": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -112, 0], + "color": 0, + "children": [ + { + "name": "wing1", + "origin": [0, 9, -5.5], + "color": 0, + "children": [ + 0, + 1, + 2, + { + "name": "lamp1", + "origin": [-1, 8, -5.5], + "color": 0, + "children": [] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_lamp.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_lamp.json new file mode 100644 index 000000000..35b464c00 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_lamp.json @@ -0,0 +1,42 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "8": "opensignals:blocks/semaphore/lamps_shield_off", + "particle": "opensignals:blocks/semaphore/lamps_shield_off" + }, + "elements": [ + { + "name": "shield", + "from": [-3.6434, 0.06802, 5.4], + "to": [6.3566, 6.06802, 5.4], + "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 10, 6], "texture": "#8"}, + "south": {"uv": [0, 0, 10, 6], "texture": "#8"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -112, 0], + "color": 0, + "children": [ + { + "name": "wing1", + "origin": [0, 9, -5.5], + "color": 0, + "children": [ + { + "name": "lamp1", + "origin": [-1, 8, -5.5], + "color": 0, + "children": [0] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_on.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_on.json deleted file mode 100644 index 0c211d580..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_on.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "8": "opensignals:blocks/semaphore/semaphore_lamps1_green"}, "elements": [{"name": "wing1", "from": [-9.09404, 18.84404, 3.5], "to": [22.90596, 22.84404, 4.5], "rotation": {"angle": -45, "axis": "z", "origin": [-0.84404, 20.84404, 4]}, "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "texture": "#4"}, "east": {"uv": [0, 6.5, 0.5, 8.5], "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 180, "texture": "#4"}, "west": {"uv": [15.5, 6.5, 16, 8.5], "texture": "#4"}, "up": {"uv": [0, 6, 16, 6.5], "texture": "#4"}, "down": {"uv": [0, 8.5, 16, 9], "texture": "#4"}}}, {"name": "wing1", "from": [-8.09404, 22.84404, 3.5], "to": [-4.09404, 23.84404, 4.5], "rotation": {"angle": -45, "axis": "z", "origin": [-0.84404, 20.84404, 4]}, "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "up": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "wing1", "from": [-8.09404, 17.84404, 3.5], "to": [-4.09404, 18.84404, 4.5], "rotation": {"angle": -45, "axis": "z", "origin": [-0.84404, 20.84404, 4]}, "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "down": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "shield", "from": [-8.6434, 0.06802, 4.5], "to": [1.3566, 6.06802, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#8"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -112, 0], "color": 0, "children": [{"name": "wing1", "origin": [0, 9, -5.5], "color": 0, "children": [0, 1, 2, {"name": "lamp1", "origin": [-1, 8, -5.5], "color": 0, "children": [3]}]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json index 121a896e5..4f7ec4adc 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small.json @@ -1 +1,71 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "8": "opensignals:blocks/semaphore/semaphore_lamps1_red"}, "elements": [{"name": "wing1", "from": [-14, 7, 3.5], "to": [18, 11, 4.5], "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "texture": "#4"}, "east": {"uv": [0, 6.5, 0.5, 8.5], "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 180, "texture": "#4"}, "west": {"uv": [15.5, 6.5, 16, 8.5], "texture": "#4"}, "up": {"uv": [0, 6, 16, 6.5], "texture": "#4"}, "down": {"uv": [0, 8.5, 16, 9], "texture": "#4"}}}, {"name": "wing1", "from": [-13, 11, 3.5], "to": [-9, 12, 4.5], "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "up": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "wing1", "from": [-13, 6, 3.5], "to": [-9, 7, 4.5], "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "texture": "#4"}, "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "texture": "#4"}, "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, "down": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"}}}, {"name": "shield", "from": [-3.6434, 0.06802, 4.5], "to": [6.3566, 6.06802, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#8"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -112, 0], "color": 0, "children": [{"name": "wing1", "origin": [0, 9, -5.5], "color": 0, "children": [0, 1, 2, {"name": "lamp1", "origin": [-1, 8, -5.5], "color": 0, "children": [3]}]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "4": "opensignals:blocks/semaphore/semaphore" + }, + "elements": [ + { + "name": "wing1", + "from": [-14, 7, 3.5], + "to": [18, 11, 4.5], + "faces": { + "north": {"uv": [0, 0.5, 16, 2.5], "texture": "#4"}, + "east": {"uv": [0, 6.5, 0.5, 8.5], "texture": "#4"}, + "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 180, "texture": "#4"}, + "west": {"uv": [15.5, 6.5, 16, 8.5], "texture": "#4"}, + "up": {"uv": [0, 6, 16, 6.5], "texture": "#4"}, + "down": {"uv": [0, 8.5, 16, 9], "texture": "#4"} + } + }, + { + "name": "wing1", + "from": [-13, 11, 3.5], + "to": [-9, 12, 4.5], + "faces": { + "north": {"uv": [13.5, 0, 15.5, 0.5], "texture": "#4"}, + "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "south": {"uv": [13.5, 3, 15.5, 3.5], "texture": "#4"}, + "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "up": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"} + } + }, + { + "name": "wing1", + "from": [-13, 6, 3.5], + "to": [-9, 7, 4.5], + "faces": { + "north": {"uv": [13.5, 2.5, 15.5, 3], "texture": "#4"}, + "east": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "south": {"uv": [13.5, 5.5, 15.5, 6], "texture": "#4"}, + "west": {"uv": [11.5, 9.5, 12, 10], "texture": "#4"}, + "down": {"uv": [12.5, 9.5, 14.5, 10], "texture": "#4"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -112, 0], + "color": 0, + "children": [ + { + "name": "wing1", + "origin": [0, 9, -5.5], + "color": 0, + "children": [ + 0, + 1, + 2, + { + "name": "lamp1", + "origin": [-1, 8, -5.5], + "color": 0, + "children": [] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small_lamp.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small_lamp.json new file mode 100644 index 000000000..35b464c00 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing1_small_lamp.json @@ -0,0 +1,42 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "8": "opensignals:blocks/semaphore/lamps_shield_off", + "particle": "opensignals:blocks/semaphore/lamps_shield_off" + }, + "elements": [ + { + "name": "shield", + "from": [-3.6434, 0.06802, 5.4], + "to": [6.3566, 6.06802, 5.4], + "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 10, 6], "texture": "#8"}, + "south": {"uv": [0, 0, 10, 6], "texture": "#8"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -112, 0], + "color": 0, + "children": [ + { + "name": "wing1", + "origin": [0, 9, -5.5], + "color": 0, + "children": [ + { + "name": "lamp1", + "origin": [-1, 8, -5.5], + "color": 0, + "children": [0] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2.json index 5d9c6552a..c6cdc19c9 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2.json @@ -1 +1,61 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "9": "opensignals:blocks/semaphore/semaphore_lamps2_dark"}, "elements": [{"name": "wing2", "from": [9, 0, 3.5], "to": [13, 32, 4.5], "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [0, 6, 16, 6.5], "rotation": 90, "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 270, "texture": "#4"}, "west": {"uv": [0, 8.5, 16, 9], "rotation": 90, "texture": "#4"}, "up": {"uv": [15.5, 6.5, 16, 8.5], "rotation": 90, "texture": "#4"}, "down": {"uv": [0, 6.5, 0.5, 8.5], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [13, 27, 3.5], "to": [14, 31, 4.5], "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [8, 27, 3.5], "to": [9, 31, 4.5], "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "rotation": 270, "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "rotation": 90, "texture": "#4"}, "west": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "shield", "from": [-4.42893, 0.32233, 4.5], "to": [5.57107, 6.32233, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#9"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -80, 0], "color": 0, "children": [{"name": "wing2", "origin": [0, 11.5, -3.5], "color": 0, "children": [0, 1, 2, 3]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "4": "opensignals:blocks/semaphore/semaphore" + }, + "elements": [ + { + "name": "wing2", + "from": [9, 0, 3.5], + "to": [13, 32, 4.5], + "faces": { + "north": {"uv": [0, 0.5, 16, 2.5], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 6, 16, 6.5], "rotation": 90, "texture": "#4"}, + "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 8.5, 16, 9], "rotation": 90, "texture": "#4"}, + "up": {"uv": [15.5, 6.5, 16, 8.5], "rotation": 90, "texture": "#4"}, + "down": {"uv": [0, 6.5, 0.5, 8.5], "rotation": 90, "texture": "#4"} + } + }, + { + "name": "wing2", + "from": [13, 27, 3.5], + "to": [14, 31, 4.5], + "faces": { + "north": {"uv": [13.5, 0, 15.5, 0.5], "rotation": 270, "texture": "#4"}, + "east": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, + "south": {"uv": [13.5, 3, 15.5, 3.5], "rotation": 90, "texture": "#4"}, + "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"} + } + }, + { + "name": "wing2", + "from": [8, 27, 3.5], + "to": [9, 31, 4.5], + "faces": { + "north": {"uv": [13.5, 2.5, 15.5, 3], "rotation": 270, "texture": "#4"}, + "south": {"uv": [13.5, 5.5, 15.5, 6], "rotation": 90, "texture": "#4"}, + "west": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, + "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -80, 0], + "color": 0, + "children": [ + { + "name": "wing2", + "origin": [0, 11.5, -3.5], + "color": 0, + "children": [0, 1, 2] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_lamp.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_lamp.json new file mode 100644 index 000000000..d00195935 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_lamp.json @@ -0,0 +1,35 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "9": "opensignals:blocks/semaphore/lamps_shield_half", + "particle": "opensignals:blocks/semaphore/lamps_shield_half" + }, + "elements": [ + { + "name": "shield", + "from": [-4.42893, 0.32233, 5.4], + "to": [5.57107, 6.32233, 5.4], + "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 10, 6], "texture": "#9"}, + "south": {"uv": [0, 0, 10, 6], "rotation": 180, "texture": "#9"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -80, 0], + "color": 0, + "children": [ + { + "name": "wing2", + "origin": [0, 11.5, -3.5], + "color": 0, + "children": [0] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_on.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_on.json deleted file mode 100644 index 2ca9c7036..000000000 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_on.json +++ /dev/null @@ -1 +0,0 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "9": "opensignals:blocks/semaphore/semaphore_lamps2"}, "elements": [{"name": "wing2", "from": [9, 0, 3.5], "to": [13, 32, 4.5], "rotation": {"angle": 45, "axis": "z", "origin": [11, 8.5, 3]}, "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [0, 6, 16, 6.5], "rotation": 90, "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 270, "texture": "#4"}, "west": {"uv": [0, 8.5, 16, 9], "rotation": 90, "texture": "#4"}, "up": {"uv": [15.5, 6.5, 16, 8.5], "rotation": 90, "texture": "#4"}, "down": {"uv": [0, 6.5, 0.5, 8.5], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [13, 27, 3.5], "to": [14, 31, 4.5], "rotation": {"angle": 45, "axis": "z", "origin": [11, 8.5, 3]}, "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [8, 27, 3.5], "to": [9, 31, 4.5], "rotation": {"angle": 45, "axis": "z", "origin": [11, 8.5, 3]}, "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "rotation": 270, "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "rotation": 90, "texture": "#4"}, "west": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "shield", "from": [-8.42893, 0.32233, 4.5], "to": [1.57107, 6.32233, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#9"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -80, 0], "color": 0, "children": [{"name": "wing2", "origin": [0, 11.5, -3.5], "color": 0, "children": [0, 1, 2, 3]}]}]} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json index 5d9c6552a..c6cdc19c9 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small.json @@ -1 +1,61 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"1": "opensignals:blocks/default/shield_black", "4": "opensignals:blocks/semaphore/semaphore", "9": "opensignals:blocks/semaphore/semaphore_lamps2_dark"}, "elements": [{"name": "wing2", "from": [9, 0, 3.5], "to": [13, 32, 4.5], "faces": {"north": {"uv": [0, 0.5, 16, 2.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [0, 6, 16, 6.5], "rotation": 90, "texture": "#4"}, "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 270, "texture": "#4"}, "west": {"uv": [0, 8.5, 16, 9], "rotation": 90, "texture": "#4"}, "up": {"uv": [15.5, 6.5, 16, 8.5], "rotation": 90, "texture": "#4"}, "down": {"uv": [0, 6.5, 0.5, 8.5], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [13, 27, 3.5], "to": [14, 31, 4.5], "faces": {"north": {"uv": [13.5, 0, 15.5, 0.5], "rotation": 270, "texture": "#4"}, "east": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "south": {"uv": [13.5, 3, 15.5, 3.5], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "wing2", "from": [8, 27, 3.5], "to": [9, 31, 4.5], "faces": {"north": {"uv": [13.5, 2.5, 15.5, 3], "rotation": 270, "texture": "#4"}, "south": {"uv": [13.5, 5.5, 15.5, 6], "rotation": 90, "texture": "#4"}, "west": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}}}, {"name": "shield", "from": [-4.42893, 0.32233, 4.5], "to": [5.57107, 6.32233, 5.5], "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, "faces": {"north": {"uv": [0, 0, 10, 6], "texture": "#9"}, "east": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "rotation": 270, "texture": "#1"}, "west": {"uv": [0, 0, 3, 0.5], "rotation": 270, "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 5], "rotation": 270, "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -80, 0], "color": 0, "children": [{"name": "wing2", "origin": [0, 11.5, -3.5], "color": 0, "children": [0, 1, 2, 3]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "4": "opensignals:blocks/semaphore/semaphore" + }, + "elements": [ + { + "name": "wing2", + "from": [9, 0, 3.5], + "to": [13, 32, 4.5], + "faces": { + "north": {"uv": [0, 0.5, 16, 2.5], "rotation": 270, "texture": "#4"}, + "east": {"uv": [0, 6, 16, 6.5], "rotation": 90, "texture": "#4"}, + "south": {"uv": [0, 3.5, 16, 5.5], "rotation": 270, "texture": "#4"}, + "west": {"uv": [0, 8.5, 16, 9], "rotation": 90, "texture": "#4"}, + "up": {"uv": [15.5, 6.5, 16, 8.5], "rotation": 90, "texture": "#4"}, + "down": {"uv": [0, 6.5, 0.5, 8.5], "rotation": 90, "texture": "#4"} + } + }, + { + "name": "wing2", + "from": [13, 27, 3.5], + "to": [14, 31, 4.5], + "faces": { + "north": {"uv": [13.5, 0, 15.5, 0.5], "rotation": 270, "texture": "#4"}, + "east": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, + "south": {"uv": [13.5, 3, 15.5, 3.5], "rotation": 90, "texture": "#4"}, + "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"} + } + }, + { + "name": "wing2", + "from": [8, 27, 3.5], + "to": [9, 31, 4.5], + "faces": { + "north": {"uv": [13.5, 2.5, 15.5, 3], "rotation": 270, "texture": "#4"}, + "south": {"uv": [13.5, 5.5, 15.5, 6], "rotation": 90, "texture": "#4"}, + "west": {"uv": [12.5, 9.5, 14.5, 10], "rotation": 90, "texture": "#4"}, + "up": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"}, + "down": {"uv": [11.5, 9.5, 12, 10], "rotation": 90, "texture": "#4"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -80, 0], + "color": 0, + "children": [ + { + "name": "wing2", + "origin": [0, 11.5, -3.5], + "color": 0, + "children": [0, 1, 2] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small_lamp.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small_lamp.json new file mode 100644 index 000000000..d00195935 --- /dev/null +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_main_wing2_small_lamp.json @@ -0,0 +1,35 @@ +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "9": "opensignals:blocks/semaphore/lamps_shield_half", + "particle": "opensignals:blocks/semaphore/lamps_shield_half" + }, + "elements": [ + { + "name": "shield", + "from": [-4.42893, 0.32233, 5.4], + "to": [5.57107, 6.32233, 5.4], + "rotation": {"angle": -45, "axis": "z", "origin": [0, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 10, 6], "texture": "#9"}, + "south": {"uv": [0, 0, 10, 6], "rotation": 180, "texture": "#9"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -80, 0], + "color": 0, + "children": [ + { + "name": "wing2", + "origin": [0, 11.5, -3.5], + "color": 0, + "children": [0] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast2_hp2.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast2_hp2.json index 382b85ce6..86477982d 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast2_hp2.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast2_hp2.json @@ -1 +1,91 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/mast", "1": "opensignals:blocks/default/shield_black", "2": "opensignals:blocks/default/shield_gray"}, "elements": [{"name": "wire_wing2", "from": [11, 0, 8.25], "to": [11.5, 11, 8.75], "faces": {"north": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, "east": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, "south": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, "west": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}}}, {"name": "mast", "from": [10.5, 8, 6.5], "to": [12, 9, 9], "faces": {"north": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, "east": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, "south": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, "west": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, "up": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"}, "down": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"}}}, {"name": "mast", "from": [10.5, 8, 2.5], "to": [11.5, 9, 5.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}, {"name": "lamp", "from": [3.5, 3, 6.5], "to": [8.5, 5, 8.5], "faces": {"north": {"uv": [0, 0, 3, 5], "texture": "#1"}, "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 5], "texture": "#1"}}}, {"name": "lamp", "from": [-0.5, 2, 5.5], "to": [3.5, 6, 9.5], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#1"}, "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, "down": {"uv": [0, 0, 2, 2], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -80, 0], "color": 0, "children": [{"name": "mast5_hp2", "origin": [0, -80, 0], "color": 0, "children": [0, 1, 2, 3, 4]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/mast", + "1": "opensignals:blocks/default/shield_black", + "2": "opensignals:blocks/default/shield_gray", + "particle": "opensignals:blocks/semaphore/lamp_off", + "lamp": "opensignals:blocks/semaphore/lamp_off" + }, + "elements": [ + { + "name": "wire_wing2", + "from": [11, 0, 8.25], + "to": [11.5, 11, 8.75], + "faces": { + "north": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, + "south": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 5.5], "texture": "#2"} + } + }, + { + "name": "mast", + "from": [10.5, 8, 6.5], + "to": [12, 9, 9], + "faces": { + "north": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0.75, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 1.25, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"}, + "down": {"uv": [0, 0, 0.75, 1.25], "texture": "#1"} + } + }, + { + "name": "mast", + "from": [10.5, 8, 2.5], + "to": [11.5, 9, 5.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + }, + { + "name": "lamp", + "from": [3.5, 3, 6.5], + "to": [8.5, 5, 8.5], + "faces": { + "north": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "down": {"uv": [0, 0, 3, 5], "texture": "#1"} + } + }, + { + "name": "lamp", + "from": [-0.5, 2, 5.5], + "to": [3.5, 6, 9.5], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#lamp"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -80, 0], + "color": 0, + "children": [ + { + "name": "mast5_hp2", + "origin": [0, -80, 0], + "color": 0, + "children": [0, 1, 2, 3, 4] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast4.json b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast4.json index dd91d7d70..eb27a2da5 100644 --- a/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast4.json +++ b/src/main/resources/assets/opensignals/models/block/semaphore_signals/sema_mainsmall_mast4.json @@ -1 +1,590 @@ -{"credit": "Made with Blockbench by Mc_Jeronimo", "texture_size": [32, 32], "textures": {"0": "opensignals:blocks/default/mast", "1": "opensignals:blocks/default/shield_black", "2": "opensignals:blocks/default/shield_gray"}, "elements": [{"name": "mast", "from": [12.5, 0, 5.5], "to": [13.5, 13, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 0, 5.5], "to": [9.5, 13, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 0, 9.5], "to": [9.5, 13, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 13, 5.5], "to": [13.5, 16, 10.5], "faces": {"north": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "east": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "south": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "west": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, "up": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"}, "down": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 0, 9.5], "to": [13.5, 13, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 0, 5.5], "to": [10.5, 1, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 2, 5.5], "to": [10.5, 3, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 3, 5.5], "to": [11.5, 4, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 4, 5.5], "to": [12.5, 5, 6.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 6, 5.5], "to": [12.5, 13, 6.5], "faces": {"north": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, "south": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, "up": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 12, 8.5], "to": [9.5, 13, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 11, 7.5], "to": [9.5, 12, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 10, 6.5], "to": [9.5, 11, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 8, 6.5], "to": [9.5, 9, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 7, 7.5], "to": [9.5, 8, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 6, 8.5], "to": [9.5, 7, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 2, 6.5], "to": [9.5, 5, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}, {"name": "mast", "from": [8.5, 0, 6.5], "to": [9.5, 1, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 0, 9.5], "to": [12.5, 1, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 2, 9.5], "to": [12.5, 3, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 3, 9.5], "to": [11.5, 4, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 4, 9.5], "to": [10.5, 5, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 6, 9.5], "to": [10.5, 7, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 7, 9.5], "to": [11.5, 8, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 8, 9.5], "to": [12.5, 9, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [11.5, 10, 9.5], "to": [12.5, 11, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 11, 9.5], "to": [11.5, 12, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [9.5, 12, 9.5], "to": [10.5, 13, 10.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 12, 6.5], "to": [13.5, 13, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 11, 7.5], "to": [13.5, 12, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 10, 8.5], "to": [13.5, 11, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 8, 8.5], "to": [13.5, 9, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [10.5, 8.5, 2.5], "to": [11.5, 9.5, 5.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 7, 7.5], "to": [13.5, 8, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 6, 6.5], "to": [13.5, 7, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 4, 6.5], "to": [13.5, 5, 7.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 3, 7.5], "to": [13.5, 4, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 2, 8.5], "to": [13.5, 3, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "mast", "from": [12.5, 0, 8.5], "to": [13.5, 1, 9.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}}}, {"name": "bracket_wire_wing1", "from": [13.5, 3, 7.5], "to": [15.5, 4, 8.5], "faces": {"north": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "south": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, "up": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"}}}, {"name": "bracket_wire_wing1", "from": [14.25, 8.5, 4.5], "to": [15.25, 9.5, 8.5], "faces": {"north": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, "east": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, "west": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, "up": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, "down": {"uv": [0, 0, 0.5, 2], "texture": "#1"}}}, {"name": "wire_wing1", "from": [14.5, 0, 7.75], "to": [15, 9, 8.25], "faces": {"north": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, "east": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, "south": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, "west": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}}}, {"name": "lamp", "from": [-0.5, 1, 5.5], "to": [3.5, 5, 9.5], "faces": {"north": {"uv": [0, 0, 2, 2], "texture": "#1"}, "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, "down": {"uv": [0, 0, 2, 2], "texture": "#1"}}}, {"name": "lamp", "from": [3.5, 2, 6.5], "to": [8.5, 4, 8.5], "faces": {"north": {"uv": [0, 0, 3, 5], "texture": "#1"}, "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, "down": {"uv": [0, 0, 3, 5], "texture": "#1"}}}], "groups": [{"name": "Formsignal_Haupt", "origin": [0, -112, 0], "color": 0, "children": [{"name": "mast7", "origin": [0, -16, 0], "color": 0, "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43]}]}]} \ No newline at end of file +{ + "credit": "Made with Blockbench by Mc_Jeronimo", + "texture_size": [32, 32], + "textures": { + "0": "opensignals:blocks/default/mast", + "1": "opensignals:blocks/default/shield_black", + "2": "opensignals:blocks/default/shield_gray", + "particle": "opensignals:blocks/semaphore/lamp_red", + "lamp": "opensignals:blocks/semaphore/lamp_red" + }, + "elements": [ + { + "name": "mast", + "from": [12.5, 0, 5.5], + "to": [13.5, 13, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 0, 5.5], + "to": [9.5, 13, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 0, 9.5], + "to": [9.5, 13, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 13, 5.5], + "to": [13.5, 16, 10.5], + "faces": { + "north": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "east": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "south": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "west": {"uv": [0, 0, 2.5, 1.5], "texture": "#0"}, + "up": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"}, + "down": {"uv": [0, 0, 2.5, 2.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 0, 9.5], + "to": [13.5, 13, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 6.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 0, 5.5], + "to": [10.5, 1, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 2, 5.5], + "to": [10.5, 3, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 3, 5.5], + "to": [11.5, 4, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 4, 5.5], + "to": [12.5, 5, 6.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 6, 5.5], + "to": [12.5, 13, 6.5], + "faces": { + "north": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, + "south": {"uv": [0, 0, 1.5, 3.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 3.5], "texture": "#0"}, + "up": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 12, 8.5], + "to": [9.5, 13, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 11, 7.5], + "to": [9.5, 12, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 10, 6.5], + "to": [9.5, 11, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 8, 6.5], + "to": [9.5, 9, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 7, 7.5], + "to": [9.5, 8, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 6, 8.5], + "to": [9.5, 7, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 2, 6.5], + "to": [9.5, 5, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 1.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [8.5, 0, 6.5], + "to": [9.5, 1, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 0, 9.5], + "to": [12.5, 1, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 2, 9.5], + "to": [12.5, 3, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 3, 9.5], + "to": [11.5, 4, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 4, 9.5], + "to": [10.5, 5, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 6, 9.5], + "to": [10.5, 7, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 7, 9.5], + "to": [11.5, 8, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 8, 9.5], + "to": [12.5, 9, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [11.5, 10, 9.5], + "to": [12.5, 11, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 11, 9.5], + "to": [11.5, 12, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [9.5, 12, 9.5], + "to": [10.5, 13, 10.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 12, 6.5], + "to": [13.5, 13, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 11, 7.5], + "to": [13.5, 12, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 10, 8.5], + "to": [13.5, 11, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 8, 8.5], + "to": [13.5, 9, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [10.5, 8.5, 2.5], + "to": [11.5, 9.5, 5.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 7, 7.5], + "to": [13.5, 8, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 6, 6.5], + "to": [13.5, 7, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 4, 6.5], + "to": [13.5, 5, 7.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 3, 7.5], + "to": [13.5, 4, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 2, 8.5], + "to": [13.5, 3, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "mast", + "from": [12.5, 0, 8.5], + "to": [13.5, 1, 9.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"} + } + }, + { + "name": "bracket_wire_wing1", + "from": [13.5, 3, 7.5], + "to": [15.5, 4, 8.5], + "faces": { + "north": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 0.5, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"} + } + }, + { + "name": "bracket_wire_wing1", + "from": [14.25, 8.5, 4.5], + "to": [15.25, 9.5, 8.5], + "faces": { + "north": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 2], "texture": "#1"} + } + }, + { + "name": "wire_wing1", + "from": [14.5, 0, 7.75], + "to": [15, 9, 8.25], + "faces": { + "north": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, + "south": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 4.5], "texture": "#2"} + } + }, + { + "name": "lamp", + "from": [-0.5, 1, 5.5], + "to": [3.5, 5, 9.5], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#lamp"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#1"} + } + }, + { + "name": "lamp", + "from": [3.5, 2, 6.5], + "to": [8.5, 4, 8.5], + "faces": { + "north": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "west": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "down": {"uv": [0, 0, 3, 5], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Formsignal_Haupt", + "origin": [0, -112, 0], + "color": 0, + "children": [ + { + "name": "mast7", + "origin": [0, -16, 0], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_green.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_green.png index c948b55b1052216bb61fd84115a5386df64b889f..e08c547da3e58073d75fb6f3f238b179dd19f01f 100644 GIT binary patch delta 889 zcmV-<1BU$JA;2S$BmwS`B_DrVj>I4g`{xvUgphB zApy$G2Q|9P{Oir_(UU2TkN3Kf_zi}?x?B$seJ(rm$jt~pw z9+rBTRdj`ThBzuKD&>3g4$GXkI4iXV>)eySFjQ1mvRtP*iX@hhLK*@jG*CqiCStUz zq!`H1e!|5+V*AtNlE_sBBgX>jP$1fV@IUz7tx=kPo^p~x2_W!dSs&v-a2IGdE$jQ( zvf3wr?-{sKyZ(9$nENEX+0~*)z~DA;aoyFVJ>YT&7=F@3U9=@1O>e0Lyr0oG6@Z~z zpnuKjt+S8Q2OvjXE#CkKhrmRcve#YS-PhaOzh^rA{QzR9a-c?jrr!Vn4pnJXSaeuT zOgdw;xB`I!BsFGYGiEh0H7zhRV`42dIc791VP;`vEjKY{Gh;GhWMMftGm~8fsth#VEqhJ(_0@45guoDdk`Fe!9 P00000NkvXXu0mjf5DIb= delta 832 zcmV-G1Hb&hBjF*CBmwP_B_Ds=jl?hr{C5>s0tWn`9Oorn2V4G5Y@A$HTIq;9fiZ!B zg#Gn%(8 zEP{p7R%q412R|084ld5RI=Bjg;0K7agOj3*l=#1-&?3fz<9@um z_qclpcpDX_82%`rsHUEZ$AoNdRS3MI7k&(465}E>v_yI_1K06&4-a4OB0S6e+@GUQ z&KnHy2*iI;rs*c}2J!5ssd3&X4zZFb6Q2`L=yXBiN3Kf_zi}?w?B$suJ(HRz4iO8* z4wgEYm2`!8hBz!MD&>2#4$GXkI4hMJYu%H-Fql_Y(p;xGf;g6tKoSBZ)KEqRCL*+| zq!>uie$2%`Z2ObslE_sCBgX=&P$1fV@IUz7txxTD}1e4uP>EWv{!uySuZuf6uh~`vLIpa@nUoq<;Va4R&c%SaeuT zOggi-0)hf0VKFs0V=!ehEiyAUHZ3$^VP-8jIW;mZV>2{mGB`D4F=aA0lU)U>3^z45 zF)}waGc+02l3L9#*;=7F-Z^h{QoJyiGhKEfq`$s zK8A~Hw=*)30GME!85kHCkl92Vz(65j;@hwf&Ov66f>AIENCN3pLOZw+(g&Q__a16VkhqpOegV zJT3n$%|7nA=Y02^@0@dI?^C7AizlW}OGgl7qO-(N4xf|sD=h`yXWaZ&fRFB4w?``% zqG&Lr%1RYLwe>-Of|w#BNbJJ)vWM$Wp%Z%lI(ft9otum6?G~}A<#&-9 zsmA3O8Kfg?LU zNkxm-V3(29Cr>yU4u7`hQpaZ(FShvjZ@xji`$8`k)iqs4kc?FdtV54$8851SqadkX zV2t^Lus{(c&lU>`;yR$AUf@##R>SpUEe2GPtcKN$i*N<)pi(KR4S|)l%iUt_I?*B- zY>U(LVmt)!15H3<{;EKjk68_ITpqsbV%&hnRkU?hgU3~h+SL$1X(MeUu)>%Up$v=D z(Y%l(^W~1BJ_tCn8Y(p{$m4i48Z|~uMm6NaNsGmT6BJHS7}UVR>jRn)!vf(P9U_6@ z0AVqt1T{qspgN}DRckb>!2svce*gSImumn%5bk3E@`1;MAWj+y-0#PST7@mDQj-h3b|A(=OOhlAs9=K?4w!plF^Xd4h41@P*(>b^!s0L-bWi zk=Oq>ZM}WayhPGVlrUU>eO#32sg`Y79t>#E{K(w5-Wv( z55WDSuVDM-%J&olB?Hzhm>JA$fvrsg2G)}x6BuRjdRf*?%OsJYbpSoA%34$ifqWn2 z5po3!G|m+|w=Y%m;;aqmM=ODz2S^!4k{Cg|DT-$(o-iBmJ0G4bb0T0l3bT+Lfzg6U zVw^zG7y%ej5IC@na{Z zPik;AoQI RzaR|aEL`q5Sg`hq{{Us2NpS!G literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_red.png index 13f4f8c77077e95f7e5f68e00155609054f9b391..cf1001c6be37e2ca5e322d7699a5ee5b6f934c80 100644 GIT binary patch delta 879 zcmV-#1CadTA-^M#M}Hs;`{xvUgphU2TkN3Kf_zi}?x?B$seJ(rm$jt~pw9+rBTRdj`T zhBzuKD&>3g4$GXkI4iXV>)eySFjQ1mvRtP*iX@hhLK*@jG*CqiCStUzq!`H1e!|5+ zV*AtNlE_sBBgX>jP$1fV@IUz7tx=kPo^p~x2_W!dSs&v-a2IGdE$jQ(vf3wr?-{sK zyZ(9$nENEX+0~*)z~DA;aoyFVJ>YT&7=F@3U9=@1O>e0Lyr0oG6@Z~zpnuKjt+S8Q z2OvjXE#CkKhrmRcve#YS-PhaOzh^rA{QzR9a-c?jrr!Vn4pnJXSaeuTOgdw;xdMR# zBQQ2NFfcPSWGy)`F)%GOFk~<-Vqq~iEiqIWl2nG&f{8W|M0NO$s$sF*G_bIXW~qv%&{x2o~T+94-I= z00v@9M??S<022Tet-i1ClRyw42n7uZF9ZhXFOz5xF-X=i_ewg1{W2LBmI z1dOMd)KD~;{=3CUiUCXv6auCMEiO0*nLP?d!6+aN0082n3?4uV;AQ{-002ovPDHLk FV1mAfXqW&1 delta 823 zcmV-71IYZpBjF*CM}IH~`_C!%2n5K3+{?E;uPTZrESHNBHT% zm4l{Iv*k<(H8pNXDvel9jHD-eK{I*q;o4wOg13y)*!dki^60hskT}oJM%Sc)w72i{2773ru~SCp-m$JMr#o>A|mQdu~s9E$>#sg!KUE0Y%Z zxpkq(%62wN!_bSE^*qYZ#JfZxphzAnr7x8RJ_1QJ^n-YsB$OS~X*}UqLIRYV4{CIo z`PZA;vxAeOiCl0ZaC=;I(Pv~?(;zzDa4!?0O+U(_-Aw83tCk_z{#SWG_n3Z&e zc!oGED=OuCvkuFgw>T@68f)E?zc83rSJGUkIf6KrkU$awB-Btw1tuc2s-zf5(SFRu zKWzJxe(*o|-K|l7n4WTyf-#`$#j-v|fxs@%tXtOiv1K(+0N*ok zrMCUm1~B(YdcCcMkAVJd;NrTiNqfNM4lwkjiMnV@KAPS_0eC;7Z^{7!w?NOD(_3pF zrw>4ex>~*g4i15_B4w|;yt})zw|~#H`uhR!?{e9vKBRvD01b9&R9JLaO-wqow*rC! zBQ-QPWH>NoWGy*iF*7YRWi~V|VrFDHEo3$|Vl_BoH(@e2lUxO>3^z45Ff}$dIW;ga zFq0DoaSAk4GBP?fFgi6gla2-?3N%zQGCDOdIyE)3yao*cv#1DQ2o`PV1bF}e00v@9 zM??TC04xA7SllW?lO7Qu2m}=}I1%m`eUnBJF-Q;g{C}EB?f+>ewg39Tp8pw01dOMd z)KD~;{=3CUiUCXv6auD{KxH@wnLP?d!6+aN006^t4KA8>kBk5S002ovPDHLkV1hwD BXwd)w diff --git a/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow.png b/src/main/resources/assets/opensignals/textures/blocks/semaphore/lamp_yellow.png index 7e917859b0c588e22c8fbb86c70c6457d84c811e..2fd4a66a0cf87d284574a57e1c775c15b2005245 100644 GIT binary patch delta 880 zcmV-$1CRXSA-^M#M}Hs;`{xvUgphU2TkN3Kf_zi}?x?B$seJ(rm$jt~pw9+rBTRdj`T zhBzuKD&>3g4$GXkI4iXV>)eySFjQ1mvRtP*iX@hhLK*@jG*CqiCStUzq!`H1e!|5+ zV*AtNlE_sBBgX>jP$1fV@IUz7tx=kPo^p~x2_W!dSs&v-a2IGdE$jQ(vf3wr?-{sK zyZ(9$nENEX+0~*)z~DA;aoyFVJ>YT&7=F@3U9=@1O>e0Lyr0oG6@Z~zpnuKjt+S8Q z2OvjXE#CkKhrmRcve#YS-PhaOzh^rA{QzR9a-c?jrr!Vn4pnJXSaeuTOgdw;xdMR# zBsgVeF)(5{HZ3q_H90LbW-w$eVPP;~EjMFkGBz?XIX7cCGLv2fsthE#>lplJ zAQ3SBpRA0ci81#sBPj+jF;EDYbY}9xImql$FbYNiX#fDA#||D%9n{+Z0000+{?6gw$6ZrESHNBHT% zm4l{Iv*k<(H8pN1Dvemq97)gYfM)UF!?nSn1aBG8*!dki>gd>fNSx&;tjceHgW|L$7I_418*ekige)B6=kdCakXuwXViPC6j{zG$D+u}R7y6~l}QWy z+`7;vxAeOiCl0ZaC=;I(Pv~?(;zzDa4!?0O+U(_-Aw83tCk_z{#SWG_n3Z&e zc!oGED=OuCvkuFgw>T@68f)E?zc83rSJGUkIf6KrkU$awB-Btw1tuc2s-zf5(SFRu zKWzJxe(*o|-K|l7n4WTyf-#`$#j-v|fxs@%tXtOiv1K(+0N*ok zrMCUm1~B(YdcCcMkAVJd;NrTiNqfNM4lwkjiMnV@KAPS_0eC;7Z^{7!w?NOD(_3pF zrw>4ex>~*g4i15_B4w|;yt})zw|~#H`uhR!?{e9vKBRvD01b9&R9JLaO-wqow*rC! zBsMrTVmLE5W-VhkG&wCaH)3WjI5;;qEn+uiGBq?aH#ajdIFnrksth+ZH!v|UGB7qW zG&GYF25|~BR5CI;H846bIg^eCBnmWCGBP?fFgh?fv%Cfk0kfzGUGL2Ydc!AQ3SB zpRA0ci81#sBPj+jF;EDY3=XKlImql$FbYNiX#fC$mk%x`5^jP30000P;Mz| z73qVj^lC+H3)Wg}eJe$@6tr5Ot=#&kXnoaIp(@zQRnVRUL|nIP-Q`;C{bjN;IcJ}} zzq9vu_C6;kixc9bJlw~*^LRWDO|(h}zdh|AzAJnNblsFJoyj<=Ie z{@(oi*Ks}a=DKc6)%xMyJFYSNXQh;nKh*G!s#W+OPeE5)#0w_Rt3mEj@6O*|M`{$y z1%aP;a{f1l(lJ_b)#`PrNMT#RuUoyUMb=pB?)HQC!tbp7CZ_j|ilx;^@vpaw=eysm z?49%0xAW>0^cX3qA*+`b#(`}=y7{rgJDhG>iB)Bu+hZbT*Iiv$dyHQ4Ow30w4NEQc z%3V)nrfp9wZD}b=k1VarKWg_=I7m~fRg#RY~$roNdLAPnEw`c2$%k^q^uLl1> zS?&FELpFyG_4EGyWGT}-?6uKU<^tdLa@CrbKU_9(+?J7n6~n{5zuQz&;OwNkJiKDn z#>OxA%^Ch?RC#4^@JEx@1c>o>5)SColWLxt8dLTgePGkV^<~dbIh=KM`c}h%iP=X^ zb*f{p-k*wArz#uji*8Qe$)B}yx^>fq+GW!*gZfh0$H9JCZ3Rma+mlF}K(27|-7Oq)K{hfyqKg?*rMsXpNtP_w z6uc}@H(^WsQeXbss%dV@lP;4N#as96MWz*A*taJ}6vtIRcU!q5rS(qFux;x0lMC=q z5;xv;H81xs3{BMa95$Z-&5ak4?3_=R?>ctod1 z3fi`ydfmK~Lz~Ydm{@fN*}b)6W@4DvmYi;9eP!hhx0V;5DIR+q2@Jfq`(L2>=-yrC z=4;QGYq|}QbC2H)K9;iP^YFBid-uX$5Af>>``V1Xzb;!`C;5@bbDGaaMkZ(?BOeqO zEU8uVDwNU9;eLD5X2hyz__Zgr1V-m>UQ#Bnd|^z}OKkAgtLfHXdHjGOu-z{IWZtZH#^YiCY zQ~0~|p2hRgg^TtNLzd4x)Ra57t-1L`gYQvm*zGI)1L{(zXG`Qqh_>g>3Rbrf(j#|U zsHr2t1=|Hpl_=HgnBz(DI@GBKMPhuly)r(~T-GdtO;YeE{P z-{Sk8b`^cruyU(g>aV*7L-j&beSzG_z>0z<( znZ; zR4?~Kz@Ac=$#E7^EY8o*7vNFfjx{_a>k;4VBaUzeI|9uIa39fr5W7PeYH78k%1r0l-P5R)Li_wAW2RY# zbTs7>DJsXM3Pi7<351~aQbcYrPzXg)3==|u5IH~xL1|1jjxy1}4h6wQEW|-6fTMCC zM^LGhMhJxgMJR^G5gKRYdQ<{v6f+Ehc*V-XtfX=Vdu4}WAd~^fa16)g2rb1igutaC z2xZXg5scB}j0_`aR7yCY7@B<9Y&BAFIawo>0mK$lhGW1^I2nvqq4_QFcDD5EuxC%M@q`A(JU250$0@s}1I&9Th`GxXdwPUlnG~Tgia{tKmE)L!0cd}@{3YRG2udVNFj6WZ3H1LG9)X7_a9n{X z6mlFP2ucoH3_v6_EIx%E$0(w&{{E`)9wfYUAiPkqeZPN@tD)lm%H}?WK?ej}^*$Lq zc;GoE9yrMQ(*gSWcfR_o=