From b7a5961b73eeff217a42ddf8ec3cabc081c660e2 Mon Sep 17 00:00:00 2001 From: dumann089 Date: Mon, 27 Jan 2025 11:56:56 -0300 Subject: [PATCH 01/10] changing the tilt angle --- .../theatrical/blockentities/light/MovingLightBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java index f76d6a5..edeca8e 100644 --- a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java @@ -44,7 +44,7 @@ public void consume(byte[] dmxValues) { blue = convertByteToInt(ourValues[3]); focus = convertByteToInt(ourValues[4]); pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; - tilt = (int) ((convertByteToInt(ourValues[6]) * 180) / 255F) - 180; + tilt = (int) ((convertByteToInt(ourValues[6]) * 180) / 255F) - 90; level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); setChanged(); } From f14634936305005228c704809d0ad22552e57d6d Mon Sep 17 00:00:00 2001 From: dumann089 Date: Mon, 27 Jan 2025 20:40:12 -0300 Subject: [PATCH 02/10] another of tilt moving head --- .../theatrical/blockentities/light/MovingLightBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java index edeca8e..2c050d3 100644 --- a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingLightBlockEntity.java @@ -44,7 +44,7 @@ public void consume(byte[] dmxValues) { blue = convertByteToInt(ourValues[3]); focus = convertByteToInt(ourValues[4]); pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; - tilt = (int) ((convertByteToInt(ourValues[6]) * 180) / 255F) - 90; + tilt = (int) ((convertByteToInt(ourValues[6]) * 270) / 255F) - 225; level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); setChanged(); } From 248bac3484ec347cd576c20aab6cdb3857b43d4b Mon Sep 17 00:00:00 2001 From: dumann089 Date: Thu, 30 Jan 2025 21:11:36 -0300 Subject: [PATCH 03/10] glossy texture MH, Fresnel --- .../client/blockentities/FresnelRenderer.java | 44 ++++++++++++++++++ .../blockentities/MovingLightRenderer.java | 44 ++++++++++++++++++ .../textures/block/moving_head_whole.png | Bin 4590 -> 4940 bytes 3 files changed, 88 insertions(+) diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/FresnelRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/FresnelRenderer.java index 5354b9f..0e44e93 100644 --- a/common/src/main/java/dev/imabad/theatrical/client/blockentities/FresnelRenderer.java +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/FresnelRenderer.java @@ -5,14 +5,23 @@ import com.mojang.math.Axis; import dev.imabad.theatrical.TheatricalExpectPlatform; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; import java.util.Optional; +import org.joml.Matrix3f; +import org.joml.Matrix4f; + public class FresnelRenderer extends FixtureRenderer { private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; public FresnelRenderer(BlockEntityRendererProvider.Context context) { @@ -92,6 +101,41 @@ public void renderModel(FresnelBlockEntity blockEntity, PoseStack poseStack, Ver minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); //#endregion } + @Override + public void beforeRenderBeam(FresnelBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0, -0.25f, 0.05f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.34375f, 0.65625f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.65625f, 0.65625f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.65625f, 0.34375f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,0.34375f, 0.34375f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } @Override public void preparePoseStack(FresnelBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingLightRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingLightRenderer.java index 8a9ae45..f1f59d3 100644 --- a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingLightRenderer.java +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingLightRenderer.java @@ -4,15 +4,24 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; import java.util.Optional; +import org.joml.Matrix3f; +import org.joml.Matrix4f; + public class MovingLightRenderer extends FixtureRenderer { private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; @@ -101,6 +110,41 @@ public void renderModel(MovingLightBlockEntity blockEntity, PoseStack poseStack, minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); //#endregion } + @Override + public void beforeRenderBeam(MovingLightBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0, 0f, 0.123f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.375f, 0.625f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.625f, 0.625f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.625f, 0.375f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,0.375f, 0.375f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } @Override public void preparePoseStack(MovingLightBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { diff --git a/common/src/main/resources/assets/theatrical/textures/block/moving_head_whole.png b/common/src/main/resources/assets/theatrical/textures/block/moving_head_whole.png index 3b6c6088fbef34ac462f1fb684a0e5099964d35b..31484633d1cf035ed2f6f943c616af8bb7164cdd 100644 GIT binary patch delta 2188 zcmaKudpy(oAIHZqrqwu(+cd)#DQD^Y5XRiv5LS*{QgTUgWM-7j?W=w<4KZ_EI>q_P zwKSJV?w1nN+(HV83`vt~BJ%UA-|u%i)#Lp2dB30U+w1k;XI723D+#SA6l6~{193W) zra>T($Qe^xQxK>$QF7fwl%*mkysegHKoW*QSxkR042oi{n2ByZDAXN&Aq_C(Q;0&b zJw%Ym|HfN29QD*`12c~^#(yFdTSZivT_B<*`88YmhS_}66EFJh+|%zcwAf$!j)>VH z{=A37ex-|DAf~MIzdDZQPqDQ%u=EWI4xrM%kp9WdFW!M)AQXE{tZF+7`xTO7J4&dq zl_WLT>k!{>%kpeM-0oW}$DR~-`W|+aDEmHEVdsK(v3;OEx_^=I+25B+aoF#gV$VW{ zfd7wv9<%Tc@}l}uf_($XpIm*W_7;S#Y-^3d)*^rJV2}S~cpAmS%g;L)gm00f<1?Mxs`F*A$mR9Ux&b5!mq2VxY5I6$zAk8T+wdm6 zqY6n~4t5yMK&J z&}gjbKc>Zs9JD+eRjuZb+>&+ux`c`fN|MpdYX_C8kDP~dtT_XGrI&pd(QCeHbP;hOS(uoZSc*6@T84@_^eXO}dApnHMmfvX z**U3zGySstw=ynwM_l{VVs&Fdc(CW=@Q>5#p$T)*+XxaD{}`J#&e*XHX5YD_&Kpq~- z&e9c@HStixpVKZoFgg)AJ7FPglGPler+?F)J71z67owfrHDkBjOZWqA-U4|G;?pI7 z9oUsimQtC5z10m3Cy96>1AHITPePbJlUj5?0$OcpiSE3R=7i3fmjxt|3JN`nLRG9W z4b73ctHfeKZzcFep_DD-h ztH1EwI_uh^g=uv;u+LHyS5Z^rmzS5fG(EaJ{Zdy??`VLxcW%#{^)%z@2l_Za)W#iGs z98PtHHUfblpErtqz8#Cj4h%dwW_7!`*zc7siF8XYJbl&@fG~tI@#(==WgFI)2{6jr z9&`251DoULRKde&&lO>s9`qEg;ly~#(FclA-B*NN%1zr1JYjH#&p&0-%v?;*!kmvE zmpM}@Yq*2yCZp#f5+HrK^1juCtE+3}MIWVdsb8J?88I<~jvsOshR9JXWJa-OgP=_d z7v{K0C39H704)FjUhs1fl8>53Mn()5R$jN}5U$|_u{{Dxjemf{Y)@f5mUBG6GV#O1 z-I^qXQ05%k#OiK2N)wyPG&q0r?L=UqlsXA92q~u-EIFK|Tg2qKWwj6|WbT(JB@60Z znC$$7D6B@CdE>R~=~;K?6_ChC;&v-O4W~KvJCIdU+nXXmBwcOm=;~sG(>72#&Cxw- zc1R}??X!l*D}JcE%M9y{i4XG)^#-rMoATR$Ip6C{TyK8Zv}e!GTuZKsnF9T`)oK8=6`hpS);{DavfSe&swvfzbzYeU8X{65BW=4Wp97 zL=YClemoaEURW&ZAkndFXqc617;$|^7#Hw^|J3z z)T(DitV!SRpv>B#BlSZEx_^#B)W{lv@0I%X{7ra*4D$LYdOUn2B-Cbmi_6w`17vm3 K&Vpm+e(~R0N}ALF delta 1830 zcmY+8dpy(oAIHCpnJwB-ZpmDJNV$!Znzf7>=6)$9*R$bh%q_W_SgzYKrj&3({OUx> z_4v6gk;~z@T!o`}Kak`!!b8Sn4@A8DUs|j+=uJ zGUskETTaNV)>}vm#Qs_2FcgUiC;Ow#d;_p-6;WmO8xb9W+J5DH(J!pbUj0Wcz~Ab^ zf0Pf_kwjwjzWW8pW{Dh9Kw_eUL+$L)R)G!m#WTaaneSSgEkyHw=c< zd`G;v!#AXU?*v0s*k_X?<5dcJctnoP4=)x6uPKb=9 z%xC|A&EIO3EaXI;MV-_UG8tMY)SBLTvotdCIocl&d^B(zsUYH*c~IH~_#G>uf0e>A zw4M~THXHK2GC$0|Xg#(3ynXdWn0I|*B88*OpW5~J7d0%CXxsfP#vL zx+lqZDF8{f>J^&Z+hm^09c>{4i-aOqb)rYdxkXE-ARy8Z;4Y`AWXRbJ+C`IRPdE%&*I|u1k`Jq(n zaX-tMFqZ+jE=Sg(!&%lQg5`;#`YGuEkkXFyKY7fz>IWJfUd?^t4kHLYOExz*Z=~zX z?YqrPO}am7WH+qN*&g%b-Plhz0QWQ0!?KQ8OX(vRKMWDdda};$6p5JKY zEhvqA9$YSSL!PT3W3h@_Y`T(%;%>xjnCv$VMIjlg8fIv@PJ5;K_7WqzxuE?;N}+R% zn=0`$8`%y7>AhlTg7i_sH&UIs1MS#C8+N&C-=Ew(}pd|5|ISl-U>OHwiol_)PciH z!ZrI4M#iZU3zO$raz3m{8j%2E9l*!QaY&n3zl)NVq4pyt4Ah z`Bx`SZ?P<`<(!rek(i-qOzjj0fbNk%iz9;(`i8~Wgv|f6=|VBF>kuF`lokr_9cW$$ zi9xPlZ8$AbOFLO+jPAL!2u@v`c;6k)0u;Wn^41}0?PWCjXH;AwFUw>n5W+2b_yg|hc^FKz18(ufl<+8i08ajesITT~we9kKq z9hj8V)Aqhx*rep;+P3V-Z)lB-F}?7qLDSwdpHa}bQq>0m{F_Bdbw!x z%6doQQ=YoDz5>&KzGD_%HVkq8UA_rks`^m+-?6=azVbAmY>DBgI5)*;+VJQ31v4!+ zY>S%7xRWO z+C$;$U!=Iqb{FCLamRrpnaTzTHvcFCXDRbzwvQx}#Z3`AXOlCP>#!2Uzi&rh*e0%} z0Kj72=Une886Gxn5#|sFvH-(xz53N0(TtEgZl=2nBu}zS!v7HCxlMmcT?1i{*R>t; zG!7CTY7|N!Nhh^QEGXUr)`Lx_{}M5{9Rk|v(f|?^hm4O4Eleb}JrXya2Cp--vA`Z^ X_F$Ig5<%w;Ab8dm_V@>8KFNOrxx6yT From 7f4d443dbd8b03b24b1b5696ed8ca32a47e04bfc Mon Sep 17 00:00:00 2001 From: dumann089 Date: Fri, 7 Feb 2025 19:20:13 -0300 Subject: [PATCH 04/10] new moving head --- .../imabad/theatrical/TheatricalClient.java | 3 + .../blockentities/BlockEntities.java | 2 + .../light/MovingWashBlockEntity.java | 84 ++++++ .../dev/imabad/theatrical/blocks/Blocks.java | 2 + .../blocks/light/MovingWashBlock.java | 125 ++++++++ .../blockentities/MovingWashRenderer.java | 215 ++++++++++++++ .../imabad/theatrical/fixtures/Fixtures.java | 3 + .../fixtures/MovingWashFixture.java | 99 +++++++ .../dev/imabad/theatrical/items/Items.java | 4 + .../theatrical/blockstates/moving_wash.json | 5 + .../block/moving_wash/moving_wash_pan.json | 65 +++++ .../block/moving_wash/moving_wash_static.json | 22 ++ .../block/moving_wash/moving_wash_tilt.json | 200 +++++++++++++ .../block/moving_wash/moving_wash_whole.json | 273 ++++++++++++++++++ 14 files changed, 1102 insertions(+) create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java create mode 100644 common/src/main/resources/assets/theatrical/blockstates/moving_wash.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json diff --git a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java index cb6ddde..7f5828e 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java @@ -12,11 +12,13 @@ import dev.imabad.theatrical.blockentities.light.BaseLightBlockEntity; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; import dev.imabad.theatrical.blocks.light.MovingLightBlock; +import dev.imabad.theatrical.blocks.light.MovingWashBlock; import dev.imabad.theatrical.client.LazyRenderers; import dev.imabad.theatrical.client.blockentities.BasicLightingConsoleRenderer; import dev.imabad.theatrical.client.blockentities.FresnelRenderer; import dev.imabad.theatrical.client.blockentities.LEDPanelRenderer; import dev.imabad.theatrical.client.blockentities.MovingLightRenderer; +import dev.imabad.theatrical.client.blockentities.MovingWashRenderer; import dev.imabad.theatrical.client.dmx.ArtNetManager; import dev.imabad.theatrical.client.dmx.ArtNetToNetworkClientData; import dev.imabad.theatrical.client.dmx.TheatricalArtNetClient; @@ -57,6 +59,7 @@ public class TheatricalClient { private static ArtNetManager artNetManager; public static void init() { BlockEntityRendererRegistry.register(BlockEntities.MOVING_LIGHT.get(), MovingLightRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.MOVING_WASH.get(), MovingWashRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_FRESNEL.get(), FresnelRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_PANEL.get(), LEDPanelRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.BASIC_LIGHTING_DESK.get(), BasicLightingConsoleRenderer::new); diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java index 828dcd4..05b0d35 100644 --- a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java @@ -9,6 +9,7 @@ import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; import dev.imabad.theatrical.blocks.Blocks; import net.minecraft.core.registries.Registries; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -22,4 +23,5 @@ public class BlockEntities { public static final RegistrySupplier> REDSTONE_INTERFACE = BLOCK_ENTITIES.register("redstone_interface", () -> BlockEntityType.Builder.of(RedstoneInterfaceBlockEntity::new, Blocks.REDSTONE_INTERFACE.get()).build(null)); public static final RegistrySupplier> LED_PANEL = BLOCK_ENTITIES.register("led_panel", () -> BlockEntityType.Builder.of(LEDPanelBlockEntity::new, Blocks.LED_PANEL.get()).build(null)); public static final RegistrySupplier> BASIC_LIGHTING_DESK = BLOCK_ENTITIES.register("basic_lighting_desk", () -> BlockEntityType.Builder.of(BasicLightingDeskBlockEntity::new, Blocks.BASIC_LIGHTING_DESK.get()).build(null)); + public static final RegistrySupplier> MOVING_WASH = BLOCK_ENTITIES.register("moving_wash", () -> BlockEntityType.Builder.of(MovingWashBlockEntity::new, Blocks.MOVING_WASH_BLOCK.get()).build(null)); } diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java new file mode 100644 index 0000000..ed2371b --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java @@ -0,0 +1,84 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blocks.light.MovingWashBlock; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class MovingWashBlockEntity extends BaseDMXConsumerLightBlockEntity { + public MovingWashBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + setChannelCount(7); + } + + public MovingWashBlockEntity(BlockPos pos, BlockState state) { + this(BlockEntities.MOVING_WASH.get(), pos, state); + } + @Override + public Fixture getFixture() { + return Fixtures.MOVING_WASH.get(); + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 7){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + focus = convertByteToInt(ourValues[4]); + pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; + tilt = (int) ((convertByteToInt(ourValues[6]) * 270) / 255F) - 225; + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x01; + } + + @Override + public String getModelName() { + return "Moving Wash"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.MOVING_WASH.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + @Override + public boolean isUpsideDown() { + return getBlockState().getValue(MovingWashBlock.HANGING) && getBlockState().getValue(MovingWashBlock.HANG_DIRECTION) == Direction.UP; + } + + @Override + public int getBasePan() { + return 0; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java index 7b7e500..518d9f3 100644 --- a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java +++ b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java @@ -9,6 +9,7 @@ import dev.imabad.theatrical.blocks.light.FresnelBlock; import dev.imabad.theatrical.blocks.light.LEDPanelBlock; import dev.imabad.theatrical.blocks.light.MovingLightBlock; +import dev.imabad.theatrical.blocks.light.MovingWashBlock; import dev.imabad.theatrical.blocks.rigging.TankTrapBlock; import dev.imabad.theatrical.blocks.rigging.TrussBlock; import net.minecraft.core.BlockPos; @@ -23,6 +24,7 @@ public class Blocks { public static final DeferredRegister BLOCKS = TheatricalRegistry.get(Registries.BLOCK); public static final RegistrySupplier MOVING_LIGHT_BLOCK = BLOCKS.register("moving_light", MovingLightBlock::new); + public static final RegistrySupplier MOVING_WASH_BLOCK = BLOCKS.register("moving_wash", MovingWashBlock::new); public static final RegistrySupplier PIPE_BLOCK = BLOCKS.register("pipe", dev.imabad.theatrical.blocks.rigging.PipeBlock::new); public static final RegistrySupplier ART_NET_INTERFACE = BLOCKS.register("artnet_interface", ArtNetInterfaceBlock::new); public static final RegistrySupplier LED_FRESNEL = BLOCKS.register("led_fresnel", FresnelBlock::new); diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java new file mode 100644 index 0000000..e3253c7 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java @@ -0,0 +1,125 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class MovingWashBlock extends BaseLightBlock{ + + + public MovingWashBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new MovingWashBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + return playerFacing.getOpposite(); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.MOVING_WASH.get() ? MovingWashBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + } else { + new OpenScreen(pos, TheatricalScreen.GENERIC_DMX).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java new file mode 100644 index 0000000..b019c53 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java @@ -0,0 +1,215 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class MovingWashRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + + public MovingWashRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(MovingWashBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(MovingWashBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5, 0.87f, 0.29f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.3125f, 0.3125f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.3125f, 0.3125f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.3125f, -0.3125f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.3125f, -0.3125f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(MovingWashBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java index cc32e9c..90fee8d 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java @@ -14,6 +14,9 @@ public class Fixtures { public static final RegistrySupplier MOVING_LIGHT = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_light"), MovingLightFixture::new); + public static final RegistrySupplier MOVING_WASH = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_wash"), MovingWashFixture::new); + public static final RegistrySupplier LED_FRESNEL = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "fresnel"), LEDFresnelFixture::new); diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java new file mode 100644 index 0000000..b465374 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java @@ -0,0 +1,99 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class MovingWashFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(7, "7-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + .addSlot(SharedSlots.FOCUS) + .addSlot(SharedSlots.PAN) + .addSlot(SharedSlots.TILT) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_static"); + + private final float[] tiltRotation = new float[]{0.5F, .8F, .5F}; + private final float[] panRotation = new float[]{0.5F, .5F, .5F}; +// private final float[] beamStartPosition = new float[]{0.5F, -0.8F, 0F}; + + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return new float[]{0.7F, 0.8F, 0.4F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 0; + } + + @Override + public HangType getHangType() { + return HangType.BRACE_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, -0.35F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/items/Items.java b/common/src/main/java/dev/imabad/theatrical/items/Items.java index 5fc9a6b..f9bcabe 100644 --- a/common/src/main/java/dev/imabad/theatrical/items/Items.java +++ b/common/src/main/java/dev/imabad/theatrical/items/Items.java @@ -51,4 +51,8 @@ public class Items { "configuration_card", ConfigurationCard::new ); + public static final RegistrySupplier MOVING_WASH = ITEMS.register( + "moving_wash", + () -> new BlockItem(Blocks.MOVING_WASH_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); } diff --git a/common/src/main/resources/assets/theatrical/blockstates/moving_wash.json b/common/src/main/resources/assets/theatrical/blockstates/moving_wash.json new file mode 100644 index 0000000..b1d31f1 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/moving_wash.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/moving_wash/moving_wash_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json new file mode 100644 index 0000000..f3f65ab --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json @@ -0,0 +1,65 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "name": "LeftSide", + "from": [13, 3, 6], + "to": [15, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "RightSide", + "from": [1, 3, 6], + "to": [3, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [3, 3, 6], + "to": [13, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [6.5, 2, 6.75], + "to": [9.5, 3, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json new file mode 100644 index 0000000..d8bf436 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_body", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json new file mode 100644 index 0000000..51b6311 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json @@ -0,0 +1,200 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_body", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "from": [3.25, 9, 4.25], + "to": [12.75, 9.25, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3, 9, 4.25], + "to": [3.25, 19, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 10.75, 4.25], + "to": [12.75, 11, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [5, 9.25, 4.25], + "to": [5.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [7, 9.25, 4.25], + "to": [7.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [9, 9.25, 4.25], + "to": [9.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [11, 9.25, 4.25], + "to": [11.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [12.75, 9, 4.25], + "to": [13, 19, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 12.75, 4.25], + "to": [12.75, 13, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 14.75, 4.25], + "to": [12.75, 15, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 16.75, 4.25], + "to": [12.75, 17, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3, 18.75, 4.25], + "to": [13, 19, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3, 9, 11.25], + "to": [13, 19, 11.75], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "east": {"uv": [1, 1, 15.25, 15], "texture": "#2"}, + "south": {"uv": [2, 2, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 9.25, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15.25, 15], "rotation": 90, "texture": "#2"}, + "down": {"uv": [1, 1, 15.25, 15], "rotation": 270, "texture": "#2"} + } + }, + { + "from": [3.25, 9.25, 5], + "to": [12.75, 18.75, 5.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 0.5, 9.5], "texture": "#missing"}, + "south": {"uv": [0, 0, 9.5, 9.5], "texture": "#missing"}, + "west": {"uv": [0, 0, 0.5, 9.5], "texture": "#missing"}, + "up": {"uv": [0, 0, 9.5, 0.5], "texture": "#missing"}, + "down": {"uv": [0, 0, 9.5, 0.5], "texture": "#missing"} + } + } + ], + "groups": [ + { + "name": "Spotbit", + "origin": [4, 22, 7], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json new file mode 100644 index 0000000..236ce3b --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json @@ -0,0 +1,273 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_body", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "name": "LeftSide", + "from": [13, 3, 6], + "to": [15, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "LeftSide", + "from": [1, 3, 6], + "to": [3, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [3, 3, 6], + "to": [13, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [6.5, 2, 6.75], + "to": [9.5, 3, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 3.25], + "to": [12.75, 17, 3.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3, 10, 3.25], + "to": [3.25, 17, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 5], + "to": [12.75, 17, 5.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [5, 10, 3.5], + "to": [5.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [7, 10, 3.5], + "to": [7.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [9, 10, 3.5], + "to": [9.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [11, 10, 3.5], + "to": [11.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [12.75, 10, 3.25], + "to": [13, 17, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 7], + "to": [12.75, 17, 7.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 9], + "to": [12.75, 17, 9.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 11], + "to": [12.75, 17, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3, 10, 13], + "to": [13, 17, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3, 9.5, 3.25], + "to": [13, 10, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15.25, 15], "rotation": 90, "texture": "#2"}, + "east": {"uv": [1, 1, 15.25, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15.25, 15], "rotation": 90, "texture": "#2"}, + "west": {"uv": [1, 1, 9.25, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [2, 2, 15, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 15.75, 3.5], + "to": [12.75, 16.25, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [0, 0, 9.5, 0.5], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [0, 0, 0.5, 9.5], "rotation": 270, "texture": "#missing"}, + "south": {"uv": [0, 0, 9.5, 0.5], "texture": "#missing"}, + "west": {"uv": [0, 0, 0.5, 9.5], "rotation": 90, "texture": "#missing"}, + "up": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 0, 9.5, 9.5], "texture": "#missing"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + 4, + { + "name": "Spotbit", + "origin": [4, 22, 7], + "color": 0, + "children": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] + } + ] +} \ No newline at end of file From 17faaf853c4f673e12279ec21cf64b4d97939399 Mon Sep 17 00:00:00 2001 From: dumann089 Date: Mon, 10 Feb 2025 18:34:30 -0300 Subject: [PATCH 05/10] new models and fixtures --- Task | 0 .../imabad/theatrical/TheatricalClient.java | 16 + .../imabad/theatrical/TheatricalScreen.java | 4 +- .../blockentities/BlockEntities.java | 11 + .../light/MovingBeamBlockEntity.java | 89 +++++ .../light/MovingScanBlockEntity.java | 84 +++++ .../light/MovingVL2CBlockEntity.java | 84 +++++ .../light/RGBbarBlockEntity.java | 77 ++++ .../dev/imabad/theatrical/blocks/Blocks.java | 8 + .../blocks/light/MovingBeamBlock.java | 125 ++++++ .../blocks/light/MovingScanBlock.java | 125 ++++++ .../blocks/light/MovingVL2CBlock.java | 125 ++++++ .../theatrical/blocks/light/RGBbarBlock.java | 135 +++++++ .../blockentities/MovingBeamRenderer.java | 215 +++++++++++ .../blockentities/MovingScanRenderer.java | 215 +++++++++++ .../blockentities/MovingVL2CRenderer.java | 215 +++++++++++ .../client/blockentities/RGBbarRenderer.java | 200 ++++++++++ .../client/gui/screen/RGBbarScreen.java | 47 +++ .../imabad/theatrical/fixtures/Fixtures.java | 12 + .../fixtures/MovingBeamFixture.java | 99 +++++ .../fixtures/MovingScanFixture.java | 99 +++++ .../fixtures/MovingVL2CFixture.java | 99 +++++ .../theatrical/fixtures/RGBbarFixture.java | 95 +++++ .../dev/imabad/theatrical/items/Items.java | 16 + .../theatrical/blockstates/led_fountain.json | 5 + .../theatrical/blockstates/moving_beam.json | 5 + .../theatrical/blockstates/moving_scan.json | 5 + .../theatrical/blockstates/moving_vl2c.json | 5 + .../theatrical/blockstates/rgb_bar.json | 5 + .../fountain_lamp_body_only.json | 58 +++ .../fountain_lamp_handle_only.json | 55 +++ .../fountain_lamp/fountain_lamp_hook_bar.json | 38 ++ .../models/block/ledbar/ledbar_body_only.json | 208 ++++++++++ .../block/ledbar/ledbar_handle_only.json | 57 +++ .../models/block/ledbar/ledbar_hook_bar.json | 38 ++ .../models/block/ledbar/ledbar_whole.json | 250 ++++++++++++ .../block/moving_beam/moving_beam_pan.json | 70 ++++ .../block/moving_beam/moving_beam_static.json | 27 ++ .../block/moving_beam/moving_beam_tilt.json | 282 ++++++++++++++ .../block/moving_beam/moving_beam_whole.json | 356 ++++++++++++++++++ .../block/moving_scan/moving_scan_pan.json | 22 ++ .../block/moving_scan/moving_scan_static.json | 56 +++ .../block/moving_scan/moving_scan_tilt.json | 22 ++ .../block/moving_scan/moving_scan_whole.json | 92 +++++ .../block/moving_vl2c/moving_vl2c_pan.json | 70 ++++ .../block/moving_vl2c/moving_vl2c_static.json | 27 ++ .../block/moving_vl2c/moving_vl2c_tilt.json | 282 ++++++++++++++ .../block/moving_vl2c/moving_vl2c_whole.json | 356 ++++++++++++++++++ .../theatrical/models/item/led_fountain.json | 3 + .../theatrical/models/item/moving_beam.json | 3 + .../theatrical/models/item/moving_scan.json | 3 + .../theatrical/models/item/moving_vl2c.json | 3 + .../theatrical/models/item/moving_wash.json | 3 + .../theatrical/models/item/rgb_bar.json | 3 + .../textures/block/moving_scan_body.png | Bin 0 -> 2332 bytes .../textures/block/moving_vl2c_body.png | Bin 0 -> 2498 bytes 56 files changed, 4602 insertions(+), 2 deletions(-) create mode 100644 Task create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingBeamBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingScanBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL2CBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/RGBbarBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/MovingBeamBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/MovingScanBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL2CBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/RGBbarBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingScanRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/gui/screen/RGBbarScreen.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/MovingScanFixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/RGBbarFixture.java create mode 100644 common/src/main/resources/assets/theatrical/blockstates/led_fountain.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/moving_beam.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/moving_scan.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/moving_vl2c.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/rgb_bar.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_body_only.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_handle_only.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_hook_bar.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/led_fountain.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/moving_beam.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/moving_scan.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/moving_vl2c.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/moving_wash.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/rgb_bar.json create mode 100644 common/src/main/resources/assets/theatrical/textures/block/moving_scan_body.png create mode 100644 common/src/main/resources/assets/theatrical/textures/block/moving_vl2c_body.png diff --git a/Task b/Task new file mode 100644 index 0000000..e69de29 diff --git a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java index 7f5828e..baff91c 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java @@ -11,19 +11,26 @@ import dev.imabad.theatrical.blockentities.control.BasicLightingDeskBlockEntity; import dev.imabad.theatrical.blockentities.light.BaseLightBlockEntity; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; +import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; import dev.imabad.theatrical.blocks.light.MovingLightBlock; import dev.imabad.theatrical.blocks.light.MovingWashBlock; +import dev.imabad.theatrical.blocks.light.MovingVL2CBlock; import dev.imabad.theatrical.client.LazyRenderers; import dev.imabad.theatrical.client.blockentities.BasicLightingConsoleRenderer; import dev.imabad.theatrical.client.blockentities.FresnelRenderer; import dev.imabad.theatrical.client.blockentities.LEDPanelRenderer; import dev.imabad.theatrical.client.blockentities.MovingLightRenderer; +import dev.imabad.theatrical.client.blockentities.MovingScanRenderer; import dev.imabad.theatrical.client.blockentities.MovingWashRenderer; +import dev.imabad.theatrical.client.blockentities.RGBbarRenderer; +import dev.imabad.theatrical.client.blockentities.MovingVL2CRenderer; +import dev.imabad.theatrical.client.blockentities.MovingBeamRenderer; import dev.imabad.theatrical.client.dmx.ArtNetManager; import dev.imabad.theatrical.client.dmx.ArtNetToNetworkClientData; import dev.imabad.theatrical.client.dmx.TheatricalArtNetClient; import dev.imabad.theatrical.client.gui.screen.BasicLightingDeskScreen; import dev.imabad.theatrical.client.gui.screen.FresnelScreen; +import dev.imabad.theatrical.client.gui.screen.RGBbarScreen; import dev.imabad.theatrical.client.gui.screen.GenericDMXConfigurationScreen; import dev.imabad.theatrical.config.TheatricalConfig; import dev.imabad.theatrical.config.UniverseConfig; @@ -60,7 +67,11 @@ public class TheatricalClient { public static void init() { BlockEntityRendererRegistry.register(BlockEntities.MOVING_LIGHT.get(), MovingLightRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.MOVING_WASH.get(), MovingWashRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.MOVING_SCAN.get(), MovingScanRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.MOVING_VL2C.get(), MovingVL2CRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.MOVING_BEAM.get(), MovingBeamRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_FRESNEL.get(), FresnelRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.RGB_BAR.get(), RGBbarRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_PANEL.get(), LEDPanelRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.BASIC_LIGHTING_DESK.get(), BasicLightingConsoleRenderer::new); // BlockEntityRendererRegistry.register(BlockEntities.CABLE.get(), CableRenderer::new); @@ -223,6 +234,11 @@ public static void handleOpenScreen(OpenScreen openScreen){ Minecraft.getInstance().setScreen(new FresnelScreen(fresnelBlockEntity)); } } + case RGB_BAR -> { + if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof RGBbarBlockEntity RGBbarBlockEntity) { + Minecraft.getInstance().setScreen(new RGBbarScreen(RGBbarBlockEntity)); + } + } case BASIC_LIGHTING_DESK -> { if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof BasicLightingDeskBlockEntity bse) { Minecraft.getInstance().setScreen(new BasicLightingDeskScreen(bse)); diff --git a/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java b/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java index 22fd2da..a5284b5 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java @@ -4,6 +4,6 @@ public enum TheatricalScreen { GENERIC_DMX, BASIC_LIGHTING_DESK, - FRESNEL - + FRESNEL, + RGB_BAR, } diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java index 05b0d35..168a920 100644 --- a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java @@ -7,9 +7,13 @@ import dev.imabad.theatrical.blockentities.interfaces.ArtNetInterfaceBlockEntity; import dev.imabad.theatrical.blockentities.interfaces.RedstoneInterfaceBlockEntity; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; +import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingVL2CBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingBeamBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingScanBlockEntity; import dev.imabad.theatrical.blocks.Blocks; import net.minecraft.core.registries.Registries; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -20,8 +24,15 @@ public class BlockEntities { public static final RegistrySupplier> ART_NET_INTERFACE = BLOCK_ENTITIES.register("artnet_interface", () -> BlockEntityType.Builder.of(ArtNetInterfaceBlockEntity::new, Blocks.ART_NET_INTERFACE.get()).build(null)); public static final RegistrySupplier> LED_FRESNEL = BLOCK_ENTITIES.register("led_fresnel", () -> BlockEntityType.Builder.of(FresnelBlockEntity::new, Blocks.LED_FRESNEL.get()).build(null)); + + public static final RegistrySupplier> REDSTONE_INTERFACE = BLOCK_ENTITIES.register("redstone_interface", () -> BlockEntityType.Builder.of(RedstoneInterfaceBlockEntity::new, Blocks.REDSTONE_INTERFACE.get()).build(null)); public static final RegistrySupplier> LED_PANEL = BLOCK_ENTITIES.register("led_panel", () -> BlockEntityType.Builder.of(LEDPanelBlockEntity::new, Blocks.LED_PANEL.get()).build(null)); public static final RegistrySupplier> BASIC_LIGHTING_DESK = BLOCK_ENTITIES.register("basic_lighting_desk", () -> BlockEntityType.Builder.of(BasicLightingDeskBlockEntity::new, Blocks.BASIC_LIGHTING_DESK.get()).build(null)); public static final RegistrySupplier> MOVING_WASH = BLOCK_ENTITIES.register("moving_wash", () -> BlockEntityType.Builder.of(MovingWashBlockEntity::new, Blocks.MOVING_WASH_BLOCK.get()).build(null)); + public static final RegistrySupplier> MOVING_VL2C = BLOCK_ENTITIES.register("moving_vl2c", () -> BlockEntityType.Builder.of(MovingVL2CBlockEntity::new, Blocks.MOVING_VL2C_BLOCK.get()).build(null)); + public static final RegistrySupplier> MOVING_BEAM = BLOCK_ENTITIES.register("moving_beam", () -> BlockEntityType.Builder.of(MovingBeamBlockEntity::new, Blocks.MOVING_BEAM_BLOCK.get()).build(null)); + public static final RegistrySupplier> MOVING_SCAN = BLOCK_ENTITIES.register("moving_scan", () -> BlockEntityType.Builder.of(MovingScanBlockEntity::new, Blocks.MOVING_SCAN_BLOCK.get()).build(null)); + public static final RegistrySupplier> RGB_BAR = BLOCK_ENTITIES.register("rgb_bar", () -> BlockEntityType.Builder.of(RGBbarBlockEntity::new, Blocks.RGB_BAR.get()).build(null)); + } diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingBeamBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingBeamBlockEntity.java new file mode 100644 index 0000000..ebfcfdc --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingBeamBlockEntity.java @@ -0,0 +1,89 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blocks.light.MovingBeamBlock; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class MovingBeamBlockEntity extends BaseDMXConsumerLightBlockEntity { + public MovingBeamBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + setChannelCount(7); + } + + public MovingBeamBlockEntity(BlockPos pos, BlockState state) { + this(BlockEntities.MOVING_BEAM.get(), pos, state); + } + @Override + public Fixture getFixture() { + return Fixtures.MOVING_BEAM.get(); + } + + @Override + public int getFocus() { + return 1; + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 7){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + focus = convertByteToInt(ourValues[4]); + pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; + tilt = (int) ((convertByteToInt(ourValues[6]) * 270) / 255F) - 225; + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x01; + } + + @Override + public String getModelName() { + return "Moving Beam"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.MOVING_BEAM.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + @Override + public boolean isUpsideDown() { + return getBlockState().getValue(MovingBeamBlock.HANGING) && getBlockState().getValue(MovingBeamBlock.HANG_DIRECTION) == Direction.UP; + } + + @Override + public int getBasePan() { + return 0; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingScanBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingScanBlockEntity.java new file mode 100644 index 0000000..c7bb43c --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingScanBlockEntity.java @@ -0,0 +1,84 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blocks.light.MovingScanBlock; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class MovingScanBlockEntity extends BaseDMXConsumerLightBlockEntity { + public MovingScanBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + setChannelCount(7); + } + + public MovingScanBlockEntity(BlockPos pos, BlockState state) { + this(BlockEntities.MOVING_SCAN.get(), pos, state); + } + @Override + public Fixture getFixture() { + return Fixtures.MOVING_SCAN.get(); + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 7){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + focus = convertByteToInt(ourValues[4]); + pan = (int) ((convertByteToInt(ourValues[5]) * 180) / 255f) - 90; + tilt = -(int) ((convertByteToInt(ourValues[6]) - 127) * 80) / 127; + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x01; + } + + @Override + public String getModelName() { + return "Moving Scan"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.MOVING_SCAN.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + @Override + public boolean isUpsideDown() { + return getBlockState().getValue(MovingScanBlock.HANGING) && getBlockState().getValue(MovingScanBlock.HANG_DIRECTION) == Direction.UP; + } + + @Override + public int getBasePan() { + return 0; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL2CBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL2CBlockEntity.java new file mode 100644 index 0000000..3675ef1 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL2CBlockEntity.java @@ -0,0 +1,84 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blocks.light.MovingVL2CBlock; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class MovingVL2CBlockEntity extends BaseDMXConsumerLightBlockEntity { + public MovingVL2CBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + setChannelCount(7); + } + + public MovingVL2CBlockEntity(BlockPos pos, BlockState state) { + this(BlockEntities.MOVING_VL2C.get(), pos, state); + } + @Override + public Fixture getFixture() { + return Fixtures.MOVING_VL2C.get(); + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 7){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + focus = convertByteToInt(ourValues[4]); + pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; + tilt = (int) ((convertByteToInt(ourValues[6]) * 270) / 255F) - 225; + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x01; + } + + @Override + public String getModelName() { + return "Moving VL2C"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.MOVING_VL2C.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + @Override + public boolean isUpsideDown() { + return getBlockState().getValue(MovingVL2CBlock.HANGING) && getBlockState().getValue(MovingVL2CBlock.HANG_DIRECTION) == Direction.UP; + } + + @Override + public int getBasePan() { + return 0; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/RGBbarBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/RGBbarBlockEntity.java new file mode 100644 index 0000000..69dfd06 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/RGBbarBlockEntity.java @@ -0,0 +1,77 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class RGBbarBlockEntity extends BaseDMXConsumerLightBlockEntity { + + public RGBbarBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntities.RGB_BAR.get(), pos, state); + setChannelCount(4); + } + @Override + public Fixture getFixture() { + return Fixtures.RGB_BAR.get(); + } + + @Override + public int getFocus() { + return 1; + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 4){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x02; + } + + @Override + public String getModelName() { + return "RGB Bar"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.RGB_BAR.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + @Override + public float getMaxLightDistance() { + return 1; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java index 518d9f3..659cecb 100644 --- a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java +++ b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java @@ -7,9 +7,13 @@ import dev.imabad.theatrical.blocks.interfaces.ArtNetInterfaceBlock; import dev.imabad.theatrical.blocks.interfaces.RedstoneInterfaceBlock; import dev.imabad.theatrical.blocks.light.FresnelBlock; +import dev.imabad.theatrical.blocks.light.RGBbarBlock; import dev.imabad.theatrical.blocks.light.LEDPanelBlock; import dev.imabad.theatrical.blocks.light.MovingLightBlock; import dev.imabad.theatrical.blocks.light.MovingWashBlock; +import dev.imabad.theatrical.blocks.light.MovingVL2CBlock; +import dev.imabad.theatrical.blocks.light.MovingBeamBlock; +import dev.imabad.theatrical.blocks.light.MovingScanBlock; import dev.imabad.theatrical.blocks.rigging.TankTrapBlock; import dev.imabad.theatrical.blocks.rigging.TrussBlock; import net.minecraft.core.BlockPos; @@ -25,9 +29,13 @@ public class Blocks { public static final DeferredRegister BLOCKS = TheatricalRegistry.get(Registries.BLOCK); public static final RegistrySupplier MOVING_LIGHT_BLOCK = BLOCKS.register("moving_light", MovingLightBlock::new); public static final RegistrySupplier MOVING_WASH_BLOCK = BLOCKS.register("moving_wash", MovingWashBlock::new); + public static final RegistrySupplier MOVING_VL2C_BLOCK = BLOCKS.register("moving_vl2c", MovingVL2CBlock::new); + public static final RegistrySupplier MOVING_BEAM_BLOCK = BLOCKS.register("moving_beam", MovingBeamBlock::new); + public static final RegistrySupplier MOVING_SCAN_BLOCK = BLOCKS.register("moving_scan", MovingScanBlock::new); public static final RegistrySupplier PIPE_BLOCK = BLOCKS.register("pipe", dev.imabad.theatrical.blocks.rigging.PipeBlock::new); public static final RegistrySupplier ART_NET_INTERFACE = BLOCKS.register("artnet_interface", ArtNetInterfaceBlock::new); public static final RegistrySupplier LED_FRESNEL = BLOCKS.register("led_fresnel", FresnelBlock::new); + public static final RegistrySupplier RGB_BAR = BLOCKS.register("rgb_bar", RGBbarBlock::new); public static final RegistrySupplier TRUSS_BLOCK = BLOCKS.register("truss", TrussBlock::new); public static final RegistrySupplier REDSTONE_INTERFACE = BLOCKS.register("redstone_interface", RedstoneInterfaceBlock::new); public static final RegistrySupplier TANK_TRAP = BLOCKS.register("tank_trap", TankTrapBlock::new); diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingBeamBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingBeamBlock.java new file mode 100644 index 0000000..d26c235 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingBeamBlock.java @@ -0,0 +1,125 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.MovingBeamBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class MovingBeamBlock extends BaseLightBlock{ + + + public MovingBeamBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new MovingBeamBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + return playerFacing.getOpposite(); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.MOVING_BEAM.get() ? MovingBeamBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + } else { + new OpenScreen(pos, TheatricalScreen.GENERIC_DMX).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingScanBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingScanBlock.java new file mode 100644 index 0000000..5f9447b --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingScanBlock.java @@ -0,0 +1,125 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.MovingScanBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class MovingScanBlock extends BaseLightBlock{ + + + public MovingScanBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new MovingScanBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + return playerFacing.getOpposite(); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.MOVING_SCAN.get() ? MovingScanBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + } else { + new OpenScreen(pos, TheatricalScreen.GENERIC_DMX).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL2CBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL2CBlock.java new file mode 100644 index 0000000..868a347 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL2CBlock.java @@ -0,0 +1,125 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.MovingVL2CBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class MovingVL2CBlock extends BaseLightBlock{ + + + public MovingVL2CBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new MovingVL2CBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + return playerFacing.getOpposite(); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.MOVING_VL2C.get() ? MovingVL2CBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + } else { + new OpenScreen(pos, TheatricalScreen.GENERIC_DMX).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/RGBbarBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/RGBbarBlock.java new file mode 100644 index 0000000..ba675da --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/RGBbarBlock.java @@ -0,0 +1,135 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class RGBbarBlock extends BaseLightBlock{ + + public RGBbarBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new RGBbarBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + if(playerFacing.getAxis() == Direction.Axis.X){ + if(playerFacing == Direction.WEST){ + return Direction.SOUTH; + } else { + return Direction.NORTH; + } + } else { + if(playerFacing == Direction.SOUTH){ + return Direction.WEST; + } else { + return Direction.EAST; + } + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.RGB_BAR.get() ? RGBbarBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (!level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + new OpenScreen(pos, TheatricalScreen.RGB_BAR).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java new file mode 100644 index 0000000..641a01a --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java @@ -0,0 +1,215 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingBeamBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class MovingBeamRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + + public MovingBeamRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(MovingBeamBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(MovingBeamBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5F, 1F, 0.07F); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.1875f, 0.1875f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.1875f, 0.1875f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.1875f, -0.1875f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.1875f, -0.1875f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(MovingBeamBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingScanRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingScanRenderer.java new file mode 100644 index 0000000..8611f66 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingScanRenderer.java @@ -0,0 +1,215 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingScanBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class MovingScanRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + + public MovingScanRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(MovingScanBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(MovingScanBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5F, 1.25F, .41875F); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.1875f, 0.1875f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.1875f, 0.1875f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.1875f, -0.1875f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.1875f, -0.1875f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(MovingScanBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java new file mode 100644 index 0000000..10ba671 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java @@ -0,0 +1,215 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingVL2CBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class MovingVL2CRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + + public MovingVL2CRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(MovingVL2CBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(MovingVL2CBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5F, 1F, 0.07F); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.125f, 0.125f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.125f, 0.125f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.125f, -0.125f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.125f, -0.125f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(MovingVL2CBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java new file mode 100644 index 0000000..c68b100 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java @@ -0,0 +1,200 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class RGBbarRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + public RGBbarRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(RGBbarBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(RGBbarBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5, 0.5f, 0.38f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -1.375f, 0.125f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 1.375f, 0.125f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 1.375f, -0.125f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-1.375f, -0.125f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(RGBbarBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/RGBbarScreen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/RGBbarScreen.java new file mode 100644 index 0000000..dc7fc02 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/RGBbarScreen.java @@ -0,0 +1,47 @@ +package dev.imabad.theatrical.client.gui.screen; + +import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; +import dev.imabad.theatrical.client.gui.widgets.BasicSlider; +import dev.imabad.theatrical.net.UpdateFixturePosition; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.layouts.LayoutSettings; +import net.minecraft.network.chat.Component; + +public class RGBbarScreen extends GenericDMXConfigurationScreen { + private BasicSlider tiltSlider, panSlider; + private final RGBbarBlockEntity be; + + public RGBbarScreen(RGBbarBlockEntity be) { + super(be, be.getBlockPos(), "block.theatrical.rgb_bar"); + this.be = be; + } + + @Override + public void addExtraWidgetsToUI() { + this.tiltSlider = new BasicSlider(xCenter + 13, yCenter + 45, 150, 20, Component.empty(), be.getTilt(), -90, 90, (newTilt) -> { + be.setTilt(newTilt.intValue()); + }); + this.panSlider = new BasicSlider(xCenter, yCenter + 75, 150, 20, Component.empty(), be.getPan(),-180, 180, (newPan) -> { + be.setPan(newPan.intValue()); + }); + LayoutSettings layoutSettings = layout.newChildLayoutSettings().paddingVertical(2); + layout.addChild(new StringWidget(Component.translatable("fixture.tilt"), font), layoutSettings); + layout.addChild(tiltSlider, layoutSettings); + layout.addChild(new StringWidget(Component.translatable("fixture.pan"), font), layoutSettings); + layout.addChild(panSlider, layoutSettings); + } + + @Override + protected void update() { + super.update(); + new UpdateFixturePosition(be.getBlockPos(), be.getTilt(), be.getPan()).sendToServer(); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics) { + super.renderLabels(guiGraphics); +// renderLabel(guiGraphics, "fixture.tilt", 0, 36); +// renderLabel(guiGraphics, "fixture.pan", 0, 66); + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java index 90fee8d..916f091 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java @@ -16,10 +16,22 @@ public class Fixtures { public static final RegistrySupplier MOVING_WASH = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_wash"), MovingWashFixture::new); + + public static final RegistrySupplier MOVING_BEAM = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_beam"), MovingBeamFixture::new); public static final RegistrySupplier LED_FRESNEL = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "fresnel"), LEDFresnelFixture::new); + public static final RegistrySupplier RGB_BAR = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "rgb_bar"), RGBbarFixture::new); + + public static final RegistrySupplier MOVING_VL2C = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_vl2c"), MovingVL2CFixture::new); + + public static final RegistrySupplier MOVING_SCAN = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_scan"), MovingScanFixture::new); + public static final RegistrySupplier LED_PANEL = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "led_panel"), LEDPanelFixture::new); diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java new file mode 100644 index 0000000..a15ee48 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java @@ -0,0 +1,99 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class MovingBeamFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(7, "7-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + .addSlot(SharedSlots.FOCUS) + .addSlot(SharedSlots.PAN) + .addSlot(SharedSlots.TILT) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_beam/moving_beam_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_beam/moving_beam_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_beam/moving_beam_static"); + + private final float[] tiltRotation = new float[]{0.5F, 1F, .5F}; + private final float[] panRotation = new float[]{0.5F, .5F, .5F}; +// private final float[] beamStartPosition = new float[]{0.5F, 1.875F, 0.4375F}; + + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return new float[]{0.5F, 1F, 0.02F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.20f; + } + + @Override + public float getRayTraceRotation() { + return 0; + } + + @Override + public HangType getHangType() { + return HangType.BRACE_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, -0.35F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingScanFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingScanFixture.java new file mode 100644 index 0000000..8fb3aca --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingScanFixture.java @@ -0,0 +1,99 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class MovingScanFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(7, "7-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + .addSlot(SharedSlots.FOCUS) + .addSlot(SharedSlots.PAN) + .addSlot(SharedSlots.TILT) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_scan/moving_scan_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_scan/moving_scan_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_scan/moving_scan_static"); + + private final float[] tiltRotation = new float[]{0.5F, 1.25F, .46875F}; + private final float[] panRotation = new float[]{0.5F, 1.375F, .59375F}; +// private final float[] beamStartPosition = new float[]{0.5F, 1.875F, 0.4375F}; + + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return new float[]{0.5F, 1.25F, .46875F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.19f; + } + + @Override + public float getRayTraceRotation() { + return 0; + } + + @Override + public HangType getHangType() { + return HangType.BRACE_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, -0.35F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java new file mode 100644 index 0000000..f15f745 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java @@ -0,0 +1,99 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class MovingVL2CFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(7, "7-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + .addSlot(SharedSlots.FOCUS) + .addSlot(SharedSlots.PAN) + .addSlot(SharedSlots.TILT) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl2c/moving_vl2c_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl2c/moving_vl2c_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl2c/moving_vl2c_static"); + + private final float[] tiltRotation = new float[]{0.5F, 1F, .5F}; + private final float[] panRotation = new float[]{0.5F, .5F, .5F}; +// private final float[] beamStartPosition = new float[]{0.5F, 1.875F, 0.4375F}; + + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return new float[]{0.5F, 1F, 0.25F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.125f; + } + + @Override + public float getRayTraceRotation() { + return 0; + } + + @Override + public HangType getHangType() { + return HangType.BRACE_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, -0.35F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/RGBbarFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/RGBbarFixture.java new file mode 100644 index 0000000..16ed878 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/RGBbarFixture.java @@ -0,0 +1,95 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class RGBbarFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(4, "4-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/ledbar/ledbar_body_only"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/ledbar/ledbar_handle_only"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/ledbar/ledbar_hook_bar"); + + private final float[] tiltRotation = new float[]{0.5F, .5F, .5F}; + private final float[] panRotation = new float[]{0.5F, 0F, .41F}; + private final float[] beamStartPosition = new float[]{0.5F, 0.24F, 0.1F}; + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return beamStartPosition; + } + + @Override + public float getDefaultRotation() { + return 0; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 180f; + } + + @Override + public HangType getHangType() { + return HangType.HOOK_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, 0.5F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/items/Items.java b/common/src/main/java/dev/imabad/theatrical/items/Items.java index f9bcabe..8a566ac 100644 --- a/common/src/main/java/dev/imabad/theatrical/items/Items.java +++ b/common/src/main/java/dev/imabad/theatrical/items/Items.java @@ -55,4 +55,20 @@ public class Items { "moving_wash", () -> new BlockItem(Blocks.MOVING_WASH_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) ); + public static final RegistrySupplier MOVING_VL2C = ITEMS.register( + "moving_vl2c", + () -> new BlockItem(Blocks.MOVING_VL2C_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier MOVING_SCAN = ITEMS.register( + "moving_scan", + () -> new BlockItem(Blocks.MOVING_SCAN_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier RGB_BAR = ITEMS.register( + "rgb_bar", + () -> new BlockItem(Blocks.RGB_BAR.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier MOVING_BEAM = ITEMS.register( + "moving_beam", + () -> new BlockItem(Blocks.MOVING_BEAM_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); } diff --git a/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json b/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json new file mode 100644 index 0000000..bf898be --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/fountain_lamp/fountain_lamp_body_only"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/moving_beam.json b/common/src/main/resources/assets/theatrical/blockstates/moving_beam.json new file mode 100644 index 0000000..a5e61c4 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/moving_beam.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/moving_beam/moving_beam_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/moving_scan.json b/common/src/main/resources/assets/theatrical/blockstates/moving_scan.json new file mode 100644 index 0000000..2e7c1b8 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/moving_scan.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/moving_scan/moving_scan_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/moving_vl2c.json b/common/src/main/resources/assets/theatrical/blockstates/moving_vl2c.json new file mode 100644 index 0000000..98e3527 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/moving_vl2c.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/moving_vl2c/moving_vl2c_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/rgb_bar.json b/common/src/main/resources/assets/theatrical/blockstates/rgb_bar.json new file mode 100644 index 0000000..61cd76e --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/rgb_bar.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/ledbar/ledbar_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json new file mode 100644 index 0000000..04e387e --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json @@ -0,0 +1,58 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/light_fresnel_active_full", + "2": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Main Body", + "from": [5, 2, 1], + "to": [11, 8, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#1", "tintindex": 0}, + "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [6, 3, 3], + "to": [10, 7, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#1", "tintindex": 0}, + "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [76, 0, 0], + "translation": [-0.5, -5.5, -7.5] + }, + "gui": { + "rotation": [0, 151, 0], + "translation": [0, -1, 0], + "scale": [0.8, 0.8, 0.8] + } + }, + "groups": [ + { + "name": "Frame Holder", + "origin": [8, 8, 8], + "color": 0, + "children": [] + }, + 0, + 1 + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json new file mode 100644 index 0000000..760a3f6 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json @@ -0,0 +1,55 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Left", + "from": [5, -10, 5], + "to": [6, -1, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [2, -10, -1]}, + "faces": { + "north": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "east": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "south": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "west": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#2"} + } + }, + { + "name": "Right", + "from": [10, -10, 5], + "to": [11, -1, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, -10, -1]}, + "faces": { + "north": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "east": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "south": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "west": {"uv": [0, 0, 1, 11], "texture": "#2"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [76, 0, 0], + "translation": [-0.5, -5.5, -7.5] + }, + "gui": { + "rotation": [0, 151, 0], + "translation": [0, -1, 0], + "scale": [0.8, 0.8, 0.8] + } + }, + "groups": [ + { + "name": "Handle", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json new file mode 100644 index 0000000..76e4566 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json @@ -0,0 +1,38 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/bar" + }, + "display": { + "thirdperson_righthand": { + "rotation": [76, 0, 0], + "translation": [-0.5, -5.5, -7.5] + }, + "gui": { + "rotation": [0, 151, 0], + "translation": [0, -1, 0], + "scale": [0.8, 0.8, 0.8] + } + }, + "groups": [ + { + "name": "fresnel", + "origin": [8, 8, 8], + "color": 0, + "children": [ + { + "name": "Hook", + "origin": [8, 8, 8], + "color": 0, + "children": [] + } + ] + }, + { + "name": "bar", + "origin": [8, 8, 8], + "color": 0, + "children": [] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_body_only.json b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_body_only.json new file mode 100644 index 0000000..12c9c82 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_body_only.json @@ -0,0 +1,208 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [-15, 5.4375, 5.9375], + "to": [31, 5.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 14.5, 16, 16], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 15.5, 16, 16], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + }, + { + "from": [-15, 9.9375, 5.9375], + "to": [31, 10.4375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 14.5, 16, 16], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 14.5, 16, 16], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 12, 16, 16], "texture": "#0"} + } + }, + { + "from": [-14, 5.9375, 6.4375], + "to": [30, 9.9375, 6.6875], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.25], "rotation": 90, "texture": "#missing"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#missing"}, + "west": {"uv": [0, 0, 4, 0.25], "rotation": 270, "texture": "#missing"}, + "up": {"uv": [0, 0, 16, 0.25], "texture": "#missing"}, + "down": {"uv": [0, 0, 16, 0.25], "rotation": 180, "texture": "#missing"} + } + }, + { + "from": [-15, 5.9375, 5.9375], + "to": [-14, 9.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 5, 5], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-14, 5.9375, 8.9375], + "to": [30, 9.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 1], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [30, 5.9375, 5.9375], + "to": [31, 9.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [25, 5.9375, 5.9375], + "to": [26, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [3, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [20, 5.9375, 5.9375], + "to": [21, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [15, 5.9375, 5.9375], + "to": [16, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-7, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [10, 5.9375, 5.9375], + "to": [11, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-12, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [5, 5.9375, 5.9375], + "to": [6, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-17, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [0, 5.9375, 5.9375], + "to": [1, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-22, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-5, 5.9375, 5.9375], + "to": [-4, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-27, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-10, 5.9375, 5.9375], + "to": [-9, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-32, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [-1, 180, 0], + "scale": [0.3, 0.3, 0.3] + } + }, + "groups": [ + { + "name": "bar", + "origin": [-2, 1, 7], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_handle_only.json b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_handle_only.json new file mode 100644 index 0000000..c940556 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_handle_only.json @@ -0,0 +1,57 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [-16, 0, 7], + "to": [32, 1, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-15, 2.75, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 14, 16, 16], "texture": "#0"} + } + }, + { + "from": [31, 1, 7], + "to": [32, 9, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-15, 2.75, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#0"} + } + }, + { + "from": [-16, 1, 7], + "to": [-15, 9, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-15, 2.75, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [-1, 180, 0], + "scale": [0.3, 0.3, 0.3] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_hook_bar.json b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_hook_bar.json new file mode 100644 index 0000000..76e4566 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_hook_bar.json @@ -0,0 +1,38 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/bar" + }, + "display": { + "thirdperson_righthand": { + "rotation": [76, 0, 0], + "translation": [-0.5, -5.5, -7.5] + }, + "gui": { + "rotation": [0, 151, 0], + "translation": [0, -1, 0], + "scale": [0.8, 0.8, 0.8] + } + }, + "groups": [ + { + "name": "fresnel", + "origin": [8, 8, 8], + "color": 0, + "children": [ + { + "name": "Hook", + "origin": [8, 8, 8], + "color": 0, + "children": [] + } + ] + }, + { + "name": "bar", + "origin": [8, 8, 8], + "color": 0, + "children": [] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_whole.json b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_whole.json new file mode 100644 index 0000000..efb6a30 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledbar/ledbar_whole.json @@ -0,0 +1,250 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [-16, 0, 7], + "to": [32, 1, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 14, 16, 16], "texture": "#0"} + } + }, + { + "from": [31, 1, 7], + "to": [32, 9, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#0"} + } + }, + { + "from": [-16, 1, 7], + "to": [-15, 9, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#0"} + } + }, + { + "from": [-15, 5.4375, 5.9375], + "to": [31, 5.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 14.5, 16, 16], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 15.5, 16, 16], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + }, + { + "from": [-15, 9.9375, 5.9375], + "to": [31, 10.4375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 14.5, 16, 16], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 14.5, 16, 16], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 12, 16, 16], "texture": "#0"} + } + }, + { + "from": [-14, 5.9375, 6.4375], + "to": [30, 9.9375, 6.6875], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 0.25], "rotation": 90, "texture": "#missing"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#missing"}, + "west": {"uv": [0, 0, 4, 0.25], "rotation": 270, "texture": "#missing"}, + "up": {"uv": [0, 0, 16, 0.25], "texture": "#missing"}, + "down": {"uv": [0, 0, 16, 0.25], "rotation": 180, "texture": "#missing"} + } + }, + { + "from": [-15, 5.9375, 5.9375], + "to": [-14, 9.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 5, 5], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-14, 5.9375, 8.9375], + "to": [30, 9.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 1], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [30, 5.9375, 5.9375], + "to": [31, 9.9375, 9.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [25, 5.9375, 5.9375], + "to": [26, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [3, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [20, 5.9375, 5.9375], + "to": [21, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [15, 5.9375, 5.9375], + "to": [16, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-7, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [10, 5.9375, 5.9375], + "to": [11, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-12, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [5, 5.9375, 5.9375], + "to": [6, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-17, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [0, 5.9375, 5.9375], + "to": [1, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-22, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-5, 5.9375, 5.9375], + "to": [-4, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-27, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-10, 5.9375, 5.9375], + "to": [-9, 9.9375, 8.9375], + "rotation": {"angle": 0, "axis": "y", "origin": [-32, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 4], "rotation": 180, "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [-1, 180, 0], + "scale": [0.3, 0.3, 0.3] + } + }, + "groups": [ + 0, + 1, + 2, + { + "name": "bar", + "origin": [-2, 1, 7], + "color": 0, + "children": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json new file mode 100644 index 0000000..13264c1 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json @@ -0,0 +1,70 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "name": "RightSide", + "from": [2, 8, 5.5], + "to": [4, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "LeftSide", + "from": [12, 8, 5.5], + "to": [14, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [6, 5, 6.5], + "to": [10, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [2, 6, 5.5], + "to": [14, 8, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json new file mode 100644 index 0000000..3ee16f3 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json @@ -0,0 +1,27 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 5, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json new file mode 100644 index 0000000..eb7607d --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json @@ -0,0 +1,282 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [4, 19, 0.5], + "to": [5, 20, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [5, 20, 0.5], + "to": [6, 21, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [10, 19, 0.5], + "to": [11, 21, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 3, 9], "texture": "#0"} + } + }, + { + "from": [11, 19, 0.5], + "to": [12, 20, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [10, 11, 0.5], + "to": [11, 12, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 1, 6, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 9], "texture": "#0"}, + "down": {"uv": [4, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [4, 13, 0.5], + "to": [5, 19, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 7], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 7], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 7], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [11, 13, 0.5], + "to": [12, 19, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [5, 19, 0.5], + "to": [6, 20, 0.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "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"} + } + }, + { + "from": [10, 12, 0.5], + "to": [11, 13, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "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"} + } + }, + { + "from": [9, 11, 0.5], + "to": [10, 13, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [6, 11, 0.5], + "to": [7, 13, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 5, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 5, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 5], "texture": "#0"}, + "down": {"uv": [5, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [7, 11, 0.5], + "to": [9, 13, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 3, 9], "texture": "#0"} + } + }, + { + "from": [5, 13, 1.5], + "to": [11, 19, 4.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 4], "texture": "#0"}, + "west": {"uv": [7, 1, 10, 5], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 3], "texture": "#0"} + } + }, + { + "from": [6, 19, 0.5], + "to": [10, 21, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 4, 3], "texture": "#0"} + } + }, + { + "from": [10, 12, 15.5], + "to": [12, 20, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 0], "texture": "#0"} + } + }, + { + "from": [6, 11, 15.5], + "to": [10, 21, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 10], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 10], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 0], "texture": "#0"}, + "down": {"uv": [0, 0, 4, 0], "texture": "#0"} + } + }, + { + "from": [4, 12, 15.5], + "to": [6, 20, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 0], "texture": "#0"} + } + }, + { + "from": [11, 12, 0.5], + "to": [12, 13, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 2, 6, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [5, 11, 0.5], + "to": [6, 13, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 1, 14], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 8], "texture": "#0"}, + "down": {"uv": [3, 0, 6, 8], "texture": "#0"} + } + }, + { + "from": [4, 12, 0.5], + "to": [5, 13, 15.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 15, 1, 16], "texture": "#0"}, + "down": {"uv": [3, 1, 6, 9], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + }, + "groups": [ + { + "name": "SpotBit", + "origin": [0, 19, -1], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json new file mode 100644 index 0000000..b2f92bb --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json @@ -0,0 +1,356 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [4, 8.5, 11], + "to": [5, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [5, 8.5, 12], + "to": [6, 23.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [10, 8.5, 11], + "to": [11, 23.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [11, 8.5, 11], + "to": [12, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 3], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [10, 8.5, 3], + "to": [11, 23.5, 4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [4, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 1, 6, 0], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 0, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [4, 8.5, 5], + "to": [5, 23.5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 7], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 7], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 7], "texture": "#0"} + } + }, + { + "from": [11, 8.5, 5], + "to": [12, 23.5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 6], "texture": "#0"} + } + }, + { + "from": [5, 23.5, 11], + "to": [6, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [10, 10.5, 4], + "to": [11, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [9, 8.5, 3], + "to": [10, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 6], "texture": "#0"} + } + }, + { + "from": [6, 8.5, 3], + "to": [7, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [5, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 5, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 5], "texture": "#0"}, + "west": {"uv": [0, 0, 5, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 6], "texture": "#0"} + } + }, + { + "from": [7, 8.5, 3], + "to": [9, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [5, 19.5, 5], + "to": [11, 22.5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 3], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "west": {"uv": [7, 1, 10, 5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [6, 8.5, 11], + "to": [10, 23.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 3], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#0"} + } + }, + { + "from": [10, 8.5, 4], + "to": [12, 8.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 9], "texture": "#0"} + } + }, + { + "from": [6, 8.5, 3], + "to": [10, 8.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 0], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 0, 10], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 4, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 10], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 9], "texture": "#0"} + } + }, + { + "from": [4, 8.5, 4], + "to": [6, 8.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 9], "texture": "#0"} + } + }, + { + "from": [11, 8.5, 4], + "to": [12, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 2, 6, 0], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [5, 8.5, 3], + "to": [6, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 8], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 13, 1, 14], "texture": "#0"} + } + }, + { + "from": [4, 8.5, 4], + "to": [5, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [3, 1, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 15, 1, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "name": "RightSide", + "from": [2, 8, 5.5], + "to": [4, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "LeftSide", + "from": [12, 8, 5.5], + "to": [14, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [6, 5, 6.5], + "to": [10, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [2, 6, 5.5], + "to": [14, 8, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 5, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + }, + "groups": [ + { + "name": "SpotBit", + "origin": [0, 19, -1], + "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 + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_pan.json new file mode 100644 index 0000000..3f6483b --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_pan.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_scan_body", + "particle": "theatrical:block/moving_scan_body" + }, + "elements": [ + { + "from": [7, 19, 5], + "to": [9, 25, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 22, 5.5]}, + "faces": { + "north": {"uv": [0, 0, 2, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_static.json new file mode 100644 index 0000000..1cec042 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_static.json @@ -0,0 +1,56 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_scan_body", + "particle": "theatrical:block/moving_scan_body" + }, + "elements": [ + { + "from": [3, -16, 3], + "to": [13, 14, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [6, 6, 12, 13], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 8], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [4, 14, 3], + "to": [12, 27, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [4, 25, 5], + "to": [12, 27, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "moving_scan_static", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_tilt.json new file mode 100644 index 0000000..016ec0e --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_tilt.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_scan_body", + "particle": "theatrical:block/moving_scan_body" + }, + "elements": [ + { + "from": [5, 17, 7], + "to": [11, 23, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 7.5]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "east": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "south": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "west": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "up": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "down": {"uv": [7, 1, 11, 5], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_whole.json new file mode 100644 index 0000000..89c4db0 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_scan/moving_scan_whole.json @@ -0,0 +1,92 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_scan_body", + "particle": "theatrical:block/moving_scan_body" + }, + "elements": [ + { + "from": [3, -16, 3], + "to": [13, 14, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [6, 6, 12, 13], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 8], "texture": "#0"} + } + }, + { + "from": [4, 14, 11], + "to": [12, 27, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [5, 17, 7], + "to": [11, 23, 8], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "east": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "south": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "west": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "up": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "down": {"uv": [7, 1, 11, 5], "texture": "#0"} + } + }, + { + "from": [7, 19, 9], + "to": [9, 25, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "texture": "#0"} + } + }, + { + "from": [4, 25, 5], + "to": [12, 27, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 6], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [0, 180, 0], + "translation": [0, 0.5, 0], + "scale": [0.4, 0.4, 0.4] + } + }, + "groups": [ + { + "name": "moving_scan_whole", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json new file mode 100644 index 0000000..13264c1 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json @@ -0,0 +1,70 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "name": "RightSide", + "from": [2, 8, 5.5], + "to": [4, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "LeftSide", + "from": [12, 8, 5.5], + "to": [14, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [6, 5, 6.5], + "to": [10, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [2, 6, 5.5], + "to": [14, 8, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json new file mode 100644 index 0000000..3ee16f3 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json @@ -0,0 +1,27 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 5, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json new file mode 100644 index 0000000..848f863 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json @@ -0,0 +1,282 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [4, 19, 0.5], + "to": [5, 20, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [5, 20, 0.5], + "to": [6, 21, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [10, 20, 0.5], + "to": [11, 21, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 3, 9], "texture": "#0"} + } + }, + { + "from": [11, 19, 0.5], + "to": [12, 20, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [10, 11, 0.5], + "to": [11, 12, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 1, 6, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 9], "texture": "#0"}, + "down": {"uv": [4, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [4, 13, 0.5], + "to": [5, 19, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 7], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 7], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 7], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [11, 13, 0.5], + "to": [12, 19, 14.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [5, 12, 0.5], + "to": [6, 20, 0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "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"} + } + }, + { + "from": [10, 12, 0.5], + "to": [11, 20, 0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "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"} + } + }, + { + "from": [9, 11, 0.5], + "to": [10, 17, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [6, 11, 0.5], + "to": [7, 17, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 5, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 5, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 5], "texture": "#0"}, + "down": {"uv": [5, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [7, 11, 0.5], + "to": [9, 15, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 3, 9], "texture": "#0"} + } + }, + { + "from": [7, 15, 1.5], + "to": [9, 17, 4.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 4], "texture": "#0"}, + "west": {"uv": [7, 1, 10, 5], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 3], "texture": "#0"} + } + }, + { + "from": [6, 17, 0.5], + "to": [10, 21, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 4, 3], "texture": "#0"} + } + }, + { + "from": [10, 12, 15.5], + "to": [12, 20, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 0], "texture": "#0"} + } + }, + { + "from": [6, 11, 15.5], + "to": [10, 21, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 10], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 10], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 0], "texture": "#0"}, + "down": {"uv": [0, 0, 4, 0], "texture": "#0"} + } + }, + { + "from": [4, 12, 15.5], + "to": [6, 20, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 0], "texture": "#0"} + } + }, + { + "from": [11, 12, 0.5], + "to": [12, 13, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 2, 6, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [5, 11, 0.5], + "to": [6, 12, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 1, 14], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 8], "texture": "#0"}, + "down": {"uv": [3, 0, 6, 8], "texture": "#0"} + } + }, + { + "from": [4, 12, 0.5], + "to": [5, 13, 15.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 15, 1, 16], "texture": "#0"}, + "down": {"uv": [3, 1, 6, 9], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + }, + "groups": [ + { + "name": "SpotBit", + "origin": [0, 19, -1], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json new file mode 100644 index 0000000..d5ffecd --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json @@ -0,0 +1,356 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [4, 8.5, 11], + "to": [5, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [5, 8.5, 12], + "to": [6, 23.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [10, 8.5, 12], + "to": [11, 23.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [11, 8.5, 11], + "to": [12, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 3], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [10, 8.5, 3], + "to": [11, 23.5, 4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [4, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 1, 6, 0], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 0, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [4, 8.5, 5], + "to": [5, 23.5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 7], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 7], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 7], "texture": "#0"} + } + }, + { + "from": [11, 9.5, 5], + "to": [12, 23.5, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 6], "texture": "#0"} + } + }, + { + "from": [5, 23.5, 4], + "to": [6, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [10, 23.5, 4], + "to": [11, 23.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#0"} + } + }, + { + "from": [9, 8.5, 3], + "to": [10, 23.5, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 6], "texture": "#0"} + } + }, + { + "from": [6, 8.5, 3], + "to": [7, 23.5, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [5, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 5, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 5], "texture": "#0"}, + "west": {"uv": [0, 0, 5, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 6], "texture": "#0"} + } + }, + { + "from": [7, 8.5, 3], + "to": [9, 23.5, 7], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [7, 19.5, 7], + "to": [9, 22.5, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 3], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "west": {"uv": [7, 1, 10, 5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [6, 8.5, 9], + "to": [10, 23.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 3], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#0"} + } + }, + { + "from": [10, 8.5, 4], + "to": [12, 8.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 9], "texture": "#0"} + } + }, + { + "from": [6, 8.5, 3], + "to": [10, 8.5, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 0], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 0, 10], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 4, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 10], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 9], "texture": "#0"} + } + }, + { + "from": [4, 8.5, 4], + "to": [6, 8.5, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 9], "texture": "#0"} + } + }, + { + "from": [11, 8.5, 4], + "to": [12, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 2, 6, 0], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [5, 8.5, 3], + "to": [6, 23.5, 4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [3, 0, 6, 8], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 13, 1, 14], "texture": "#0"} + } + }, + { + "from": [4, 8.5, 4], + "to": [5, 23.5, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [3, 1, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 15, 1, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "name": "RightSide", + "from": [2, 8, 5.5], + "to": [4, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "LeftSide", + "from": [12, 8, 5.5], + "to": [14, 16, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [6, 5, 6.5], + "to": [10, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [2, 6, 5.5], + "to": [14, 8, 10.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 5, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + } + }, + "groups": [ + { + "name": "SpotBit", + "origin": [0, 19, -1], + "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 + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/led_fountain.json b/common/src/main/resources/assets/theatrical/models/item/led_fountain.json new file mode 100644 index 0000000..e0afdff --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/led_fountain.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/fountain_lamp/fountain_lamp_body_only" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/moving_beam.json b/common/src/main/resources/assets/theatrical/models/item/moving_beam.json new file mode 100644 index 0000000..9e245fb --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/moving_beam.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/moving_beam/moving_beam_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/moving_scan.json b/common/src/main/resources/assets/theatrical/models/item/moving_scan.json new file mode 100644 index 0000000..325a859 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/moving_scan.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/moving_scan/moving_scan_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/moving_vl2c.json b/common/src/main/resources/assets/theatrical/models/item/moving_vl2c.json new file mode 100644 index 0000000..c42af6e --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/moving_vl2c.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/moving_vl2c/moving_vl2c_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/moving_wash.json b/common/src/main/resources/assets/theatrical/models/item/moving_wash.json new file mode 100644 index 0000000..7c185c4 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/moving_wash.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/moving_wash/moving_wash_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/rgb_bar.json b/common/src/main/resources/assets/theatrical/models/item/rgb_bar.json new file mode 100644 index 0000000..85019a9 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/rgb_bar.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/ledbar/ledbar_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/textures/block/moving_scan_body.png b/common/src/main/resources/assets/theatrical/textures/block/moving_scan_body.png new file mode 100644 index 0000000000000000000000000000000000000000..89d3f5da17fe598ed316f04cb9a7948de1dfeff2 GIT binary patch literal 2332 zcmcIm&u<$=6yBt?Dyc#vl>;CYt+ql+5##+e`%`u+$95Y_bqI;222P!wnYCB3cb45v z?Bo=2$P1Yg(i)JrS{& zXm#bC6-km-+gr_DxUUu0&1>+#fo|`?Z7JJ*v?)FN`Q6`O@LI3lsY}wgU)=hOT!-=P zoyXnQ`uaLNK7aoF?CcC4Nc>A1ZrAhO?Y+O@C;j=|8wJqo$=1i2B;C4GTuahdU%w?u zH$RHH`}uz7u}{UYLYN46Wjsv4T9T>{#tESZJeLFBi{hH{`wu@Va>Q!N6RV?jk_PWb zTPG>sJK65ilLP88<-z^cmFn0Bgdxv~JRT0>%pcd339t{(#k8u(6O;U)rqm0M@_uJW zZitl2R>ekC$Cm7P72P(m=Y1d>n(nHatLi4wZ69mCVaU^;0`6qFnzGQ}Z9bg3gHcWC z=Xv6*>S#2ojLeEid#dhvo~jwDVIZ(T*>RkcF^aRhCCC(}$upWpNgjzGXpzr5V+b5?ZY&JwjqN>)PfZQM9VT= zlX44LE^whCCIDdsNHguwbO@%lV<_?qzYQ@EX-6=eQG6%lcB^6Q zo^2zeqAN0^ekjr*0dYk`(&K6p_hxzr#RD6NdMnDHyvLJXDjRFkQG5K;g{f(O3?g|V zR-e$KM`{W!#KD;|osQ0_z~y2sVMl!qpyw;5w8%u5k4VbvJt)+r^r&7UjEo$;Jc!H5 z=>H3%M5cWb_c(lkp*0u7s;b4uYO!Kf_59*iUubHk%Q|#Sp@3{5PZI@flHS79Tmkpb zZw+jR9x*L~EaJLI*SU=Xf=$GAkD9K>iEC;l&q4GGuy$x!A%^}9O^qY2;Q$2|vk+_! z7IRJLI*ncd)(I`s#>7SzcN|0+b`a4*9qHKh>;UVQ>jqbVC5~%*#PE>82rrZ1;Q)AJ z%cCSD46~~wfm;UC4D(fC%K#S3SXD2sf4OR5C!AEPoP})`Mj)=)9$$>+=L8;uG*dVQ z^weM9gA>F?yIJpU?9o%{q4soX`Ag}}+Rpo@@y0cCO_ssk5@9$eVH?}ZF5X9VUPi6q$=Y`koyYc_x->yS^o8}L!TtS@pbkPrZa92K+ zOA*9d&&~N8&cx%kQqKmTAm-c`Uek#2!|enydyPG~K3JdY)eN^7ho-Bec%@jv)&!C0 zs+6EHf&x-UdD}@+SKm8Lk+zwn)`>YLS4yK{yJxG1)^6<^G`5Zys!4Tq&W$B18b&Ch z0Fsqr!SS_9lBxk~_&J=WDY9k~j3lX4=#gBX>nGE$he$Cl0fQApQdZ-v#0#proa7i* zp&5l{dB94Vz-Syt)_)XsN0JH8w6uZDqjh(9l%$4(prp}sxm=Ey`MB%lX;xKLn&D`U z1K0xiV@?1o!0|gGkUC5T`G#kg0^4=S5Ekn0Xpp2Z<0zD3sfq3Q^?c#X(G^&t**Fu1 z)-cTFZf;sEHm&`jdkgkbCp{^!KR8xG^Z@eRQO`i#TaXiUG@O-&-N5yS-T&a$eElzm zrqOg*8ubdb9GM1<3aE&&eQe9t_?5J@hhX4(gRWa>6s*7DkxZw<0;%NEb+%)=W&h!j zRDBJ~zyKww@I7ESz=?ybpz(?($WKI8IjjZ~2Jn`4u4!9ix3J3Pw5;O?&@oUplcX?< zxNV!7#Bn;Oun5R9U~4Wkd&N0K#N17kEZs9CHk zAVIc(#qk2*MU19mBmgbeluU z4j5jtco_ zuL!ZY>>|t~y5!^=ddG^#Y;e>)wvWp@R_mpxv1%Q)7Hw{ss`p31CTn8Vpb_>+k}^VZ zAd{+3+mlpaYOzMJlQsug*Q4&-^$GinmHJ}Ae z!Mu|sAdxc}j=x>lD1g>7Cg@w&KU&qY6V|E~&EjnqkFdBJdwe)*o)eIRrRm{QK%Ty| z1fL-O%w|%9%IaSZop<&=a!=+$Vb+4Swzg~6CzLb$bL5wO)fw}T_6modUbPH9J9J^l z>0NWbbil|ypE)pbaIE^Wz3{bTt9I;CkHkJ~?>I1V?w#WJuiH27CO><3`A4%l_rzZR z>Dct2H*Hw(;2-ftBX3Ceo+T%gWq+OO>N>qI_U5-s_AZ9))gv3vnj5U6OTXx-RA0Sv z^<>|VCp#b8@y+L%$E&Yof8YMq(A&l1)or`q&u`lqV`h%eqpls=fB1p$>>N zwO-}w$rB6D50U#W)0-so>nF<}e}Ccfn6vr%Q`D)4_MCZXXX2Af)9vwN#LO3o?t|?Y gQ`MnuK>u#Wjw{Ds*tu)sba;@;cK2mYtk|^sAKUa1RsaA1 literal 0 HcmV?d00001 From d3621f551e940a3c8acdf4d669430f4cf24cfa9a Mon Sep 17 00:00:00 2001 From: dumann089 Date: Fri, 7 Feb 2025 19:20:13 -0300 Subject: [PATCH 06/10] new moving head --- .../imabad/theatrical/TheatricalClient.java | 3 + .../blockentities/BlockEntities.java | 2 + .../light/MovingWashBlockEntity.java | 84 ++++++ .../dev/imabad/theatrical/blocks/Blocks.java | 2 + .../blocks/light/MovingWashBlock.java | 125 ++++++++ .../blockentities/MovingWashRenderer.java | 215 ++++++++++++++ .../imabad/theatrical/fixtures/Fixtures.java | 3 + .../fixtures/MovingWashFixture.java | 99 +++++++ .../dev/imabad/theatrical/items/Items.java | 4 + .../theatrical/blockstates/moving_wash.json | 5 + .../block/moving_wash/moving_wash_pan.json | 65 +++++ .../block/moving_wash/moving_wash_static.json | 22 ++ .../block/moving_wash/moving_wash_tilt.json | 200 +++++++++++++ .../block/moving_wash/moving_wash_whole.json | 273 ++++++++++++++++++ 14 files changed, 1102 insertions(+) create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java create mode 100644 common/src/main/resources/assets/theatrical/blockstates/moving_wash.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json diff --git a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java index cb6ddde..7f5828e 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java @@ -12,11 +12,13 @@ import dev.imabad.theatrical.blockentities.light.BaseLightBlockEntity; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; import dev.imabad.theatrical.blocks.light.MovingLightBlock; +import dev.imabad.theatrical.blocks.light.MovingWashBlock; import dev.imabad.theatrical.client.LazyRenderers; import dev.imabad.theatrical.client.blockentities.BasicLightingConsoleRenderer; import dev.imabad.theatrical.client.blockentities.FresnelRenderer; import dev.imabad.theatrical.client.blockentities.LEDPanelRenderer; import dev.imabad.theatrical.client.blockentities.MovingLightRenderer; +import dev.imabad.theatrical.client.blockentities.MovingWashRenderer; import dev.imabad.theatrical.client.dmx.ArtNetManager; import dev.imabad.theatrical.client.dmx.ArtNetToNetworkClientData; import dev.imabad.theatrical.client.dmx.TheatricalArtNetClient; @@ -57,6 +59,7 @@ public class TheatricalClient { private static ArtNetManager artNetManager; public static void init() { BlockEntityRendererRegistry.register(BlockEntities.MOVING_LIGHT.get(), MovingLightRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.MOVING_WASH.get(), MovingWashRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_FRESNEL.get(), FresnelRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_PANEL.get(), LEDPanelRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.BASIC_LIGHTING_DESK.get(), BasicLightingConsoleRenderer::new); diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java index 828dcd4..05b0d35 100644 --- a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java @@ -9,6 +9,7 @@ import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; import dev.imabad.theatrical.blocks.Blocks; import net.minecraft.core.registries.Registries; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -22,4 +23,5 @@ public class BlockEntities { public static final RegistrySupplier> REDSTONE_INTERFACE = BLOCK_ENTITIES.register("redstone_interface", () -> BlockEntityType.Builder.of(RedstoneInterfaceBlockEntity::new, Blocks.REDSTONE_INTERFACE.get()).build(null)); public static final RegistrySupplier> LED_PANEL = BLOCK_ENTITIES.register("led_panel", () -> BlockEntityType.Builder.of(LEDPanelBlockEntity::new, Blocks.LED_PANEL.get()).build(null)); public static final RegistrySupplier> BASIC_LIGHTING_DESK = BLOCK_ENTITIES.register("basic_lighting_desk", () -> BlockEntityType.Builder.of(BasicLightingDeskBlockEntity::new, Blocks.BASIC_LIGHTING_DESK.get()).build(null)); + public static final RegistrySupplier> MOVING_WASH = BLOCK_ENTITIES.register("moving_wash", () -> BlockEntityType.Builder.of(MovingWashBlockEntity::new, Blocks.MOVING_WASH_BLOCK.get()).build(null)); } diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java new file mode 100644 index 0000000..ed2371b --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingWashBlockEntity.java @@ -0,0 +1,84 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blocks.light.MovingWashBlock; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class MovingWashBlockEntity extends BaseDMXConsumerLightBlockEntity { + public MovingWashBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + setChannelCount(7); + } + + public MovingWashBlockEntity(BlockPos pos, BlockState state) { + this(BlockEntities.MOVING_WASH.get(), pos, state); + } + @Override + public Fixture getFixture() { + return Fixtures.MOVING_WASH.get(); + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 7){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + focus = convertByteToInt(ourValues[4]); + pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; + tilt = (int) ((convertByteToInt(ourValues[6]) * 270) / 255F) - 225; + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x01; + } + + @Override + public String getModelName() { + return "Moving Wash"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.MOVING_WASH.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + @Override + public boolean isUpsideDown() { + return getBlockState().getValue(MovingWashBlock.HANGING) && getBlockState().getValue(MovingWashBlock.HANG_DIRECTION) == Direction.UP; + } + + @Override + public int getBasePan() { + return 0; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java index 7b7e500..518d9f3 100644 --- a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java +++ b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java @@ -9,6 +9,7 @@ import dev.imabad.theatrical.blocks.light.FresnelBlock; import dev.imabad.theatrical.blocks.light.LEDPanelBlock; import dev.imabad.theatrical.blocks.light.MovingLightBlock; +import dev.imabad.theatrical.blocks.light.MovingWashBlock; import dev.imabad.theatrical.blocks.rigging.TankTrapBlock; import dev.imabad.theatrical.blocks.rigging.TrussBlock; import net.minecraft.core.BlockPos; @@ -23,6 +24,7 @@ public class Blocks { public static final DeferredRegister BLOCKS = TheatricalRegistry.get(Registries.BLOCK); public static final RegistrySupplier MOVING_LIGHT_BLOCK = BLOCKS.register("moving_light", MovingLightBlock::new); + public static final RegistrySupplier MOVING_WASH_BLOCK = BLOCKS.register("moving_wash", MovingWashBlock::new); public static final RegistrySupplier PIPE_BLOCK = BLOCKS.register("pipe", dev.imabad.theatrical.blocks.rigging.PipeBlock::new); public static final RegistrySupplier ART_NET_INTERFACE = BLOCKS.register("artnet_interface", ArtNetInterfaceBlock::new); public static final RegistrySupplier LED_FRESNEL = BLOCKS.register("led_fresnel", FresnelBlock::new); diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java new file mode 100644 index 0000000..e3253c7 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingWashBlock.java @@ -0,0 +1,125 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class MovingWashBlock extends BaseLightBlock{ + + + public MovingWashBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new MovingWashBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + return playerFacing.getOpposite(); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.MOVING_WASH.get() ? MovingWashBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + } else { + new OpenScreen(pos, TheatricalScreen.GENERIC_DMX).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java new file mode 100644 index 0000000..b019c53 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingWashRenderer.java @@ -0,0 +1,215 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class MovingWashRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + + public MovingWashRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(MovingWashBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(MovingWashBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5, 0.87f, 0.29f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.3125f, 0.3125f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.3125f, 0.3125f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.3125f, -0.3125f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.3125f, -0.3125f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(MovingWashBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java index cc32e9c..90fee8d 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java @@ -14,6 +14,9 @@ public class Fixtures { public static final RegistrySupplier MOVING_LIGHT = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_light"), MovingLightFixture::new); + public static final RegistrySupplier MOVING_WASH = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_wash"), MovingWashFixture::new); + public static final RegistrySupplier LED_FRESNEL = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "fresnel"), LEDFresnelFixture::new); diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java new file mode 100644 index 0000000..b465374 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingWashFixture.java @@ -0,0 +1,99 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class MovingWashFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(7, "7-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + .addSlot(SharedSlots.FOCUS) + .addSlot(SharedSlots.PAN) + .addSlot(SharedSlots.TILT) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_static"); + + private final float[] tiltRotation = new float[]{0.5F, .8F, .5F}; + private final float[] panRotation = new float[]{0.5F, .5F, .5F}; +// private final float[] beamStartPosition = new float[]{0.5F, -0.8F, 0F}; + + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return new float[]{0.7F, 0.8F, 0.4F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 0; + } + + @Override + public HangType getHangType() { + return HangType.BRACE_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, -0.35F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/items/Items.java b/common/src/main/java/dev/imabad/theatrical/items/Items.java index 5fc9a6b..f9bcabe 100644 --- a/common/src/main/java/dev/imabad/theatrical/items/Items.java +++ b/common/src/main/java/dev/imabad/theatrical/items/Items.java @@ -51,4 +51,8 @@ public class Items { "configuration_card", ConfigurationCard::new ); + public static final RegistrySupplier MOVING_WASH = ITEMS.register( + "moving_wash", + () -> new BlockItem(Blocks.MOVING_WASH_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); } diff --git a/common/src/main/resources/assets/theatrical/blockstates/moving_wash.json b/common/src/main/resources/assets/theatrical/blockstates/moving_wash.json new file mode 100644 index 0000000..b1d31f1 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/moving_wash.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/moving_wash/moving_wash_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json new file mode 100644 index 0000000..f3f65ab --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_pan.json @@ -0,0 +1,65 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "name": "LeftSide", + "from": [13, 3, 6], + "to": [15, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "RightSide", + "from": [1, 3, 6], + "to": [3, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [3, 3, 6], + "to": [13, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [6.5, 2, 6.75], + "to": [9.5, 3, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json new file mode 100644 index 0000000..d8bf436 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_static.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_body", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json new file mode 100644 index 0000000..51b6311 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_tilt.json @@ -0,0 +1,200 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_body", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "from": [3.25, 9, 4.25], + "to": [12.75, 9.25, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3, 9, 4.25], + "to": [3.25, 19, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 10.75, 4.25], + "to": [12.75, 11, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [5, 9.25, 4.25], + "to": [5.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [7, 9.25, 4.25], + "to": [7.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [9, 9.25, 4.25], + "to": [9.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [11, 9.25, 4.25], + "to": [11.25, 18.75, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [12.75, 9, 4.25], + "to": [13, 19, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [1, 1, 0.25, 10], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 5.25, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 12.75, 4.25], + "to": [12.75, 13, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 14.75, 4.25], + "to": [12.75, 15, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 16.75, 4.25], + "to": [12.75, 17, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3, 18.75, 4.25], + "to": [13, 19, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "texture": "#2"}, + "south": {"uv": [1, 1, 10, 0.25], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "from": [3, 9, 11.25], + "to": [13, 19, 11.75], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "east": {"uv": [1, 1, 15.25, 15], "texture": "#2"}, + "south": {"uv": [2, 2, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 9.25, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15.25, 15], "rotation": 90, "texture": "#2"}, + "down": {"uv": [1, 1, 15.25, 15], "rotation": 270, "texture": "#2"} + } + }, + { + "from": [3.25, 9.25, 5], + "to": [12.75, 18.75, 5.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 0.5, 9.5], "texture": "#missing"}, + "south": {"uv": [0, 0, 9.5, 9.5], "texture": "#missing"}, + "west": {"uv": [0, 0, 0.5, 9.5], "texture": "#missing"}, + "up": {"uv": [0, 0, 9.5, 0.5], "texture": "#missing"}, + "down": {"uv": [0, 0, 9.5, 0.5], "texture": "#missing"} + } + } + ], + "groups": [ + { + "name": "Spotbit", + "origin": [4, 22, 7], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json new file mode 100644 index 0000000..236ce3b --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_wash/moving_wash_whole.json @@ -0,0 +1,273 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_body", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "name": "LeftSide", + "from": [13, 3, 6], + "to": [15, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "LeftSide", + "from": [1, 3, 6], + "to": [3, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "down": {"uv": [1, 1, 15, 15], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [3, 3, 6], + "to": [13, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "name": "RotateBase", + "from": [6.5, 2, 6.75], + "to": [9.5, 3, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 3.25], + "to": [12.75, 17, 3.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3, 10, 3.25], + "to": [3.25, 17, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 5], + "to": [12.75, 17, 5.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [5, 10, 3.5], + "to": [5.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [7, 10, 3.5], + "to": [7.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [9, 10, 3.5], + "to": [9.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [11, 10, 3.5], + "to": [11.25, 17, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [12.75, 10, 3.25], + "to": [13, 17, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 5.25, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 5.25, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 0.25, 10], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 7], + "to": [12.75, 17, 7.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 9], + "to": [12.75, 17, 9.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3.25, 10, 11], + "to": [12.75, 17, 11.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3, 10, 13], + "to": [13, 17, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 1, 15, 5.25], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [1, 1, 15, 5.25], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 5.25], "rotation": 180, "texture": "#2"}, + "down": {"uv": [1, 1, 10, 0.25], "texture": "#2"} + } + }, + { + "from": [3, 9.5, 3.25], + "to": [13, 10, 13.25], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [1, 1, 15.25, 15], "rotation": 90, "texture": "#2"}, + "east": {"uv": [1, 1, 15.25, 15], "rotation": 270, "texture": "#2"}, + "south": {"uv": [1, 1, 15.25, 15], "rotation": 90, "texture": "#2"}, + "west": {"uv": [1, 1, 9.25, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "rotation": 180, "texture": "#2"}, + "down": {"uv": [2, 2, 15, 15], "texture": "#2"} + } + }, + { + "from": [3.25, 15.75, 3.5], + "to": [12.75, 16.25, 13], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13.5, 7.75]}, + "faces": { + "north": {"uv": [0, 0, 9.5, 0.5], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [0, 0, 0.5, 9.5], "rotation": 270, "texture": "#missing"}, + "south": {"uv": [0, 0, 9.5, 0.5], "texture": "#missing"}, + "west": {"uv": [0, 0, 0.5, 9.5], "rotation": 90, "texture": "#missing"}, + "up": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 0, 9.5, 9.5], "texture": "#missing"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + 4, + { + "name": "Spotbit", + "origin": [4, 22, 7], + "color": 0, + "children": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] + } + ] +} \ No newline at end of file From ec1d97ce3da8fefd1b877039b4cd9444f6aab716 Mon Sep 17 00:00:00 2001 From: Stuart Pomeroy Date: Mon, 10 Feb 2025 21:40:59 +0000 Subject: [PATCH 07/10] Data generators --- .../resources/.cache/ac32a6491e9ad7e80dfd5d9683e4c90fbf53e1e6 | 3 ++- .../resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 | 4 ++-- .../src/generated/resources/assets/theatrical/lang/en_us.json | 1 + .../resources/assets/theatrical/models/item/moving_wash.json | 3 +++ .../main/java/dev/imabad/theatrical/neoforge/DataEvent.java | 2 ++ 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 common/src/generated/resources/assets/theatrical/models/item/moving_wash.json diff --git a/common/src/generated/resources/.cache/ac32a6491e9ad7e80dfd5d9683e4c90fbf53e1e6 b/common/src/generated/resources/.cache/ac32a6491e9ad7e80dfd5d9683e4c90fbf53e1e6 index a6cf055..5738f89 100644 --- a/common/src/generated/resources/.cache/ac32a6491e9ad7e80dfd5d9683e4c90fbf53e1e6 +++ b/common/src/generated/resources/.cache/ac32a6491e9ad7e80dfd5d9683e4c90fbf53e1e6 @@ -1,10 +1,11 @@ -// 1.20.2 2024-07-30T19:12:09.649396 Item Models: theatrical +// 1.20.2 2025-02-10T21:36:36.4650464 Item Models: theatrical b61dea162dac1064778fccd83e00b34aeea3d2b7 assets/theatrical/models/item/artnet_interface.json b8f0135bf11be0f31f5d16d76a8c50f28900ee04 assets/theatrical/models/item/basic_lighting_desk.json 545f9e738bfe2c1e7b2236f46042b2504b81373b assets/theatrical/models/item/configuration_card.json 0dc3e30a7627a40ada8a4b8e20249c809067a337 assets/theatrical/models/item/led_fresnel.json 81307d2abd44e288e5e8c9b7824de5a0e895e0be assets/theatrical/models/item/led_panel.json e6b312509e9a1cfcd5730624d5cbd9f04781d7f7 assets/theatrical/models/item/moving_light.json +60c8fe683be5154fc1d18d5e88c969e422e289c2 assets/theatrical/models/item/moving_wash.json 0d5befeac428b5d0be735b72f8ca31d904c081d8 assets/theatrical/models/item/pipe.json 4c0820713db76bd2b2dfb712bff51e382da41ac2 assets/theatrical/models/item/redstone_interface.json da8f48c84e1fb2dc911004bad231caadbbcd9701 assets/theatrical/models/item/tank_trap.json diff --git a/common/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/common/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index 07795e1..3ca3a9c 100644 --- a/common/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/common/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.20.2 2024-08-10T16:17:08.6930462 Languages: en_us -831d4167f7c689fed8b25d9623c152450500fc8f assets/theatrical/lang/en_us.json +// 1.20.2 2025-02-10T21:36:36.4700505 Languages: en_us +cb8eaff73b76198108bddce14ea2b0b4b381ffbb assets/theatrical/lang/en_us.json diff --git a/common/src/generated/resources/assets/theatrical/lang/en_us.json b/common/src/generated/resources/assets/theatrical/lang/en_us.json index 9f94c7e..6aebaca 100644 --- a/common/src/generated/resources/assets/theatrical/lang/en_us.json +++ b/common/src/generated/resources/assets/theatrical/lang/en_us.json @@ -10,6 +10,7 @@ "block.theatrical.led_fresnel": "LED Fresnel", "block.theatrical.led_panel": "LED Panel", "block.theatrical.moving_light": "Moving Light", + "block.theatrical.moving_wash": "Moving Wash", "block.theatrical.pipe": "Rigging Pipe", "block.theatrical.redstone_interface": "Redstone Interface", "block.theatrical.tank_trap": "Tank Trap", diff --git a/common/src/generated/resources/assets/theatrical/models/item/moving_wash.json b/common/src/generated/resources/assets/theatrical/models/item/moving_wash.json new file mode 100644 index 0000000..28e0b38 --- /dev/null +++ b/common/src/generated/resources/assets/theatrical/models/item/moving_wash.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/moving_wash/moving_wash_whole" +} \ No newline at end of file diff --git a/neoforge/src/main/java/dev/imabad/theatrical/neoforge/DataEvent.java b/neoforge/src/main/java/dev/imabad/theatrical/neoforge/DataEvent.java index 24973ba..df48d87 100644 --- a/neoforge/src/main/java/dev/imabad/theatrical/neoforge/DataEvent.java +++ b/neoforge/src/main/java/dev/imabad/theatrical/neoforge/DataEvent.java @@ -65,6 +65,7 @@ protected void registerModels() { withExistingParent(Blocks.PIPE_BLOCK.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/vertical_pipe")); withExistingParent(Blocks.TRUSS_BLOCK.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/truss")); withExistingParent(Blocks.MOVING_LIGHT_BLOCK.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/moving_light/moving_head_whole")); + withExistingParent(Blocks.MOVING_WASH_BLOCK.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/moving_wash/moving_wash_whole")); withExistingParent(Blocks.LED_FRESNEL.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/fresnel/fresnel_whole")); withExistingParent(Blocks.TANK_TRAP.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/tank_trap")); withExistingParent(Blocks.LED_PANEL.getId().getPath(), new ResourceLocation(Theatrical.MOD_ID, "block/led_panel")); @@ -84,6 +85,7 @@ public Lang(PackOutput output, String locale) { protected void addTranslations() { addBlock(Blocks.ART_NET_INTERFACE, "ArtNet Interface"); addBlock(Blocks.MOVING_LIGHT_BLOCK, "Moving Light"); + addBlock(Blocks.MOVING_WASH_BLOCK, "Moving Wash"); addBlock(Blocks.PIPE_BLOCK, "Rigging Pipe"); addBlock(Blocks.LED_FRESNEL, "LED Fresnel"); addBlock(Blocks.TRUSS_BLOCK, "MT100 Truss"); From ca0a7fe55e8ff5b7c7e4599f30f8b65306c27e9e Mon Sep 17 00:00:00 2001 From: Stuart Pomeroy Date: Tue, 11 Feb 2025 19:10:48 +0000 Subject: [PATCH 08/10] [publish] 1.0.0-alpha.23 --- CHANGELOG.md | 7 ++++--- README.md | 3 ++- gradle.properties | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 248a57e..42e4868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ -# 1.20.1-alpha.22 +# 1.20.1-alpha.23 -* Fix overriding existing methods in dynamiclightsprovider interface -* Fix standing on LED panels \ No newline at end of file +* Let lights tilt further down, thanks dumaan089 +* Add extra texturing to lights, thanks dumaan089 +* Add moving head wash, thanks dumaan089 \ No newline at end of file diff --git a/README.md b/README.md index 36ab807..f21a95f 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,5 @@ Pull Requests are welcome and will be reviewed by Rushmead. * Rushmead * bright_spark -* FreneticScribbler \ No newline at end of file +* FreneticScribbler +* Dumaan089 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1dab99c..75a79ec 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.20.1 enabled_platforms=fabric,forge archives_base_name=Theatrical -mod_version=1.0.0-alpha.22 +mod_version=1.0.0-alpha.23 maven_group=dev.imabad architectury_version=9.1.12 From a320044796ddc5a5a093c3e51074a96c3bfa6947 Mon Sep 17 00:00:00 2001 From: Stuart Pomeroy Date: Tue, 11 Feb 2025 19:13:20 +0000 Subject: [PATCH 09/10] [publish] 1.0.0-alpha.23 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 32071fd..159cde8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: with: arguments: "build publishMods" - name: Store artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gradle-build-output path: ./**/libs/*.jar \ No newline at end of file From 8c82918694fabc526b90ee1aff3ecee7c530e361 Mon Sep 17 00:00:00 2001 From: dumann089 Date: Fri, 21 Feb 2025 20:47:26 -0300 Subject: [PATCH 10/10] another fixtures --- .../imabad/theatrical/TheatricalClient.java | 50 +- .../imabad/theatrical/TheatricalScreen.java | 5 + .../blockentities/BlockEntities.java | 13 + .../light/BigPanel2BlockEntity.java | 72 +++ .../light/BigPanelBlockEntity.java | 72 +++ .../light/LEDPanel2BlockEntity.java | 71 +++ .../light/LEDfountainBlockEntity.java | 72 +++ .../light/MovingVL6BlockEntity.java | 84 +++ .../light/ParLedBlockEntity.java | 72 +++ .../dev/imabad/theatrical/blocks/Blocks.java | 12 + .../blocks/light/BigPanel2Block.java | 135 +++++ .../blocks/light/BigPanelBlock.java | 135 +++++ .../blocks/light/LEDPanel2Block.java | 135 +++++ .../blocks/light/LEDfountainBlock.java | 135 +++++ .../blocks/light/MovingVL6Block.java | 125 ++++ .../theatrical/blocks/light/ParLedBlock.java | 135 +++++ .../blockentities/BigPanel2Renderer.java | 200 +++++++ .../blockentities/BigPanelRenderer.java | 200 +++++++ .../blockentities/LEDPanel2Renderer.java | 200 +++++++ .../blockentities/LEDfountainRenderer.java | 200 +++++++ .../blockentities/MovingBeamRenderer.java | 2 +- .../blockentities/MovingVL2CRenderer.java | 2 +- .../blockentities/MovingVL6Renderer.java | 215 +++++++ .../client/blockentities/ParLedRenderer.java | 212 +++++++ .../client/blockentities/RGBbarRenderer.java | 36 +- .../client/gui/screen/BigPanel2Screen.java | 47 ++ .../client/gui/screen/BigPanelScreen.java | 47 ++ .../client/gui/screen/LEDPanel2Screen.java | 47 ++ .../client/gui/screen/LEDfountainScreen.java | 47 ++ .../client/gui/screen/ParLedScreen.java | 47 ++ .../theatrical/fixtures/BigPanel2Fixture.java | 95 ++++ .../theatrical/fixtures/BigPanelFixture.java | 95 ++++ .../imabad/theatrical/fixtures/Fixtures.java | 19 +- .../theatrical/fixtures/LEDPanel2Fixture.java | 95 ++++ .../fixtures/LEDfountainFixture.java | 95 ++++ .../fixtures/MovingBeamFixture.java | 8 +- .../fixtures/MovingVL2CFixture.java | 9 +- .../theatrical/fixtures/MovingVL6Fixture.java | 99 ++++ .../theatrical/fixtures/ParLedFixture.java | 95 ++++ .../dev/imabad/theatrical/items/Items.java | 25 + .../theatrical/blockstates/big_panel.json | 5 + .../theatrical/blockstates/big_panel2.json | 5 + .../theatrical/blockstates/led_fountain.json | 2 +- .../theatrical/blockstates/led_panel_2.json | 5 + .../theatrical/blockstates/moving_vl6.json | 5 + .../theatrical/blockstates/par_led.json | 5 + .../block/bigpanel2x3/bigpanel2x3_body.json | 99 ++++ .../block/bigpanel2x3/bigpanel_pan.json | 15 + .../block/bigpanel2x3/bigpanel_static.json | 15 + .../block/bigpanel3x3/bigpanel_body.json | 92 +++ .../block/bigpanel3x3/bigpanel_pan.json | 15 + .../block/bigpanel3x3/bigpanel_static.json | 15 + .../fountain_lamp_body_only.json | 76 ++- .../fountain_lamp_handle_only.json | 71 ++- .../fountain_lamp/fountain_lamp_hook_bar.json | 43 +- .../fountain_lamp/fountain_lamp_whole.json | 149 +++++ .../models/block/ledpanel/led_panel_body.json | 68 +++ .../models/block/ledpanel/led_panel_pan.json | 37 ++ .../block/ledpanel/led_panel_static.json | 92 +++ .../block/moving_beam/moving_beam_pan.json | 24 +- .../block/moving_beam/moving_beam_static.json | 4 +- .../block/moving_beam/moving_beam_tilt.json | 218 +------ .../block/moving_beam/moving_beam_whole.json | 262 ++------- .../block/moving_vl2c/moving_vl2c_pan.json | 24 +- .../block/moving_vl2c/moving_vl2c_static.json | 4 +- .../block/moving_vl2c/moving_vl2c_tilt.json | 232 ++------ .../block/moving_vl2c/moving_vl2c_whole.json | 270 ++------- .../block/moving_vl6/moving_vl6_pan.json | 80 +++ .../block/moving_vl6/moving_vl6_static.json | 33 ++ .../block/moving_vl6/moving_vl6_tilt.json | 145 +++++ .../block/moving_vl6/moving_vl6_whole.json | 217 +++++++ .../block/parled/parled_body_whole.json | 538 ++++++++++++++++++ .../models/block/parled/parled_pan.json | 64 +++ .../models/block/parled/parled_static.json | 14 + .../models/block/parled/parled_tilt.json | 493 ++++++++++++++++ .../block/searchlight/searchlight_body.json | 142 +++++ .../theatrical/models/item/big_panel.json | 3 + .../theatrical/models/item/big_panel2.json | 3 + .../theatrical/models/item/led_fountain.json | 2 +- .../theatrical/models/item/led_panel_2.json | 3 + .../theatrical/models/item/moving_vl6.json | 3 + .../theatrical/models/item/par_led.json | 3 + .../textures/block/moving_scan_body.png | Bin 2332 -> 2509 bytes .../textures/block/moving_vl2c_body.png | Bin 2498 -> 2467 bytes .../theatrical/textures/block/waterpump.png | Bin 0 -> 691 bytes 85 files changed, 6153 insertions(+), 902 deletions(-) create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanel2BlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanelBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDPanel2BlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDfountainBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL6BlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blockentities/light/ParLedBlockEntity.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanel2Block.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanelBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/LEDPanel2Block.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/LEDfountainBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL6Block.java create mode 100644 common/src/main/java/dev/imabad/theatrical/blocks/light/ParLedBlock.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanel2Renderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanelRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDPanel2Renderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDfountainRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL6Renderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/blockentities/ParLedRenderer.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanel2Screen.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanelScreen.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDPanel2Screen.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDfountainScreen.java create mode 100644 common/src/main/java/dev/imabad/theatrical/client/gui/screen/ParLedScreen.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/BigPanel2Fixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/BigPanelFixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/LEDPanel2Fixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/LEDfountainFixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL6Fixture.java create mode 100644 common/src/main/java/dev/imabad/theatrical/fixtures/ParLedFixture.java create mode 100644 common/src/main/resources/assets/theatrical/blockstates/big_panel.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/big_panel2.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/led_panel_2.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/moving_vl6.json create mode 100644 common/src/main/resources/assets/theatrical/blockstates/par_led.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel2x3_body.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_body.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_body.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/parled/parled_body_whole.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/parled/parled_pan.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/parled/parled_static.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/parled/parled_tilt.json create mode 100644 common/src/main/resources/assets/theatrical/models/block/searchlight/searchlight_body.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/big_panel.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/big_panel2.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/led_panel_2.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/moving_vl6.json create mode 100644 common/src/main/resources/assets/theatrical/models/item/par_led.json create mode 100644 common/src/main/resources/assets/theatrical/textures/block/waterpump.png diff --git a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java index baff91c..2cb3421 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java @@ -12,25 +12,39 @@ import dev.imabad.theatrical.blockentities.light.BaseLightBlockEntity; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; +import dev.imabad.theatrical.blockentities.light.LEDfountainBlockEntity; +import dev.imabad.theatrical.blockentities.light.LEDPanel2BlockEntity; +import dev.imabad.theatrical.blockentities.light.ParLedBlockEntity; +import dev.imabad.theatrical.blockentities.light.BigPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.BigPanel2BlockEntity; import dev.imabad.theatrical.blocks.light.MovingLightBlock; -import dev.imabad.theatrical.blocks.light.MovingWashBlock; -import dev.imabad.theatrical.blocks.light.MovingVL2CBlock; import dev.imabad.theatrical.client.LazyRenderers; import dev.imabad.theatrical.client.blockentities.BasicLightingConsoleRenderer; import dev.imabad.theatrical.client.blockentities.FresnelRenderer; +import dev.imabad.theatrical.client.blockentities.LEDfountainRenderer; +import dev.imabad.theatrical.client.blockentities.BigPanelRenderer; +import dev.imabad.theatrical.client.blockentities.BigPanel2Renderer; import dev.imabad.theatrical.client.blockentities.LEDPanelRenderer; +import dev.imabad.theatrical.client.blockentities.LEDPanel2Renderer; import dev.imabad.theatrical.client.blockentities.MovingLightRenderer; import dev.imabad.theatrical.client.blockentities.MovingScanRenderer; import dev.imabad.theatrical.client.blockentities.MovingWashRenderer; import dev.imabad.theatrical.client.blockentities.RGBbarRenderer; +import dev.imabad.theatrical.client.blockentities.ParLedRenderer; import dev.imabad.theatrical.client.blockentities.MovingVL2CRenderer; +import dev.imabad.theatrical.client.blockentities.MovingVL6Renderer; import dev.imabad.theatrical.client.blockentities.MovingBeamRenderer; import dev.imabad.theatrical.client.dmx.ArtNetManager; import dev.imabad.theatrical.client.dmx.ArtNetToNetworkClientData; import dev.imabad.theatrical.client.dmx.TheatricalArtNetClient; import dev.imabad.theatrical.client.gui.screen.BasicLightingDeskScreen; import dev.imabad.theatrical.client.gui.screen.FresnelScreen; +import dev.imabad.theatrical.client.gui.screen.LEDfountainScreen; +import dev.imabad.theatrical.client.gui.screen.BigPanelScreen; +import dev.imabad.theatrical.client.gui.screen.ParLedScreen; +import dev.imabad.theatrical.client.gui.screen.BigPanel2Screen; import dev.imabad.theatrical.client.gui.screen.RGBbarScreen; +import dev.imabad.theatrical.client.gui.screen.LEDPanel2Screen; import dev.imabad.theatrical.client.gui.screen.GenericDMXConfigurationScreen; import dev.imabad.theatrical.config.TheatricalConfig; import dev.imabad.theatrical.config.UniverseConfig; @@ -69,10 +83,16 @@ public static void init() { BlockEntityRendererRegistry.register(BlockEntities.MOVING_WASH.get(), MovingWashRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.MOVING_SCAN.get(), MovingScanRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.MOVING_VL2C.get(), MovingVL2CRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.MOVING_VL6.get(), MovingVL6Renderer::new); BlockEntityRendererRegistry.register(BlockEntities.MOVING_BEAM.get(), MovingBeamRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_FRESNEL.get(), FresnelRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.LED_FOUNTAIN.get(), LEDfountainRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.PAR_LED.get(), ParLedRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.BIG_PANEL.get(), BigPanelRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.BIG_PANEL2.get(), BigPanel2Renderer::new); BlockEntityRendererRegistry.register(BlockEntities.RGB_BAR.get(), RGBbarRenderer::new); BlockEntityRendererRegistry.register(BlockEntities.LED_PANEL.get(), LEDPanelRenderer::new); + BlockEntityRendererRegistry.register(BlockEntities.LED_PANEL_2.get(), LEDPanel2Renderer::new); BlockEntityRendererRegistry.register(BlockEntities.BASIC_LIGHTING_DESK.get(), BasicLightingConsoleRenderer::new); // BlockEntityRendererRegistry.register(BlockEntities.CABLE.get(), CableRenderer::new); artNetManager = new ArtNetManager(); @@ -234,6 +254,16 @@ public static void handleOpenScreen(OpenScreen openScreen){ Minecraft.getInstance().setScreen(new FresnelScreen(fresnelBlockEntity)); } } + case LED_PANEL_2 -> { + if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof LEDPanel2BlockEntity LEDPanel2BlockEntity) { + Minecraft.getInstance().setScreen(new LEDPanel2Screen(LEDPanel2BlockEntity)); + } + } + case LED_FOUNTAIN -> { + if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof LEDfountainBlockEntity LEDfountainBlockEntity) { + Minecraft.getInstance().setScreen(new LEDfountainScreen(LEDfountainBlockEntity)); + } + } case RGB_BAR -> { if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof RGBbarBlockEntity RGBbarBlockEntity) { Minecraft.getInstance().setScreen(new RGBbarScreen(RGBbarBlockEntity)); @@ -244,6 +274,22 @@ public static void handleOpenScreen(OpenScreen openScreen){ Minecraft.getInstance().setScreen(new BasicLightingDeskScreen(bse)); } } + case BIG_PANEL -> { + if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof BigPanelBlockEntity BigPanelBlockEntity) { + Minecraft.getInstance().setScreen(new BigPanelScreen(BigPanelBlockEntity)); + } + } + case BIG_PANEL2 -> { + if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof BigPanel2BlockEntity BigPanel2BlockEntity) { + Minecraft.getInstance().setScreen(new BigPanel2Screen(BigPanel2BlockEntity)); + } + } + case PAR_LED -> { + if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof ParLedBlockEntity ParLedBlockEntity) { + Minecraft.getInstance().setScreen(new ParLedScreen(ParLedBlockEntity)); + } + } } } } + diff --git a/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java b/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java index a5284b5..de75d23 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java @@ -6,4 +6,9 @@ public enum TheatricalScreen { BASIC_LIGHTING_DESK, FRESNEL, RGB_BAR, + LED_FOUNTAIN, + LED_PANEL_2, + BIG_PANEL, + BIG_PANEL2, + PAR_LED, } diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java index 168a920..b6e83f0 100644 --- a/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/BlockEntities.java @@ -7,13 +7,19 @@ import dev.imabad.theatrical.blockentities.interfaces.ArtNetInterfaceBlockEntity; import dev.imabad.theatrical.blockentities.interfaces.RedstoneInterfaceBlockEntity; import dev.imabad.theatrical.blockentities.light.FresnelBlockEntity; +import dev.imabad.theatrical.blockentities.light.LEDPanel2BlockEntity; import dev.imabad.theatrical.blockentities.light.RGBbarBlockEntity; import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.ParLedBlockEntity; +import dev.imabad.theatrical.blockentities.light.BigPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.BigPanel2BlockEntity; import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingWashBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingVL2CBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingVL6BlockEntity; import dev.imabad.theatrical.blockentities.light.MovingBeamBlockEntity; import dev.imabad.theatrical.blockentities.light.MovingScanBlockEntity; +import dev.imabad.theatrical.blockentities.light.LEDfountainBlockEntity; import dev.imabad.theatrical.blocks.Blocks; import net.minecraft.core.registries.Registries; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -31,8 +37,15 @@ public class BlockEntities { public static final RegistrySupplier> BASIC_LIGHTING_DESK = BLOCK_ENTITIES.register("basic_lighting_desk", () -> BlockEntityType.Builder.of(BasicLightingDeskBlockEntity::new, Blocks.BASIC_LIGHTING_DESK.get()).build(null)); public static final RegistrySupplier> MOVING_WASH = BLOCK_ENTITIES.register("moving_wash", () -> BlockEntityType.Builder.of(MovingWashBlockEntity::new, Blocks.MOVING_WASH_BLOCK.get()).build(null)); public static final RegistrySupplier> MOVING_VL2C = BLOCK_ENTITIES.register("moving_vl2c", () -> BlockEntityType.Builder.of(MovingVL2CBlockEntity::new, Blocks.MOVING_VL2C_BLOCK.get()).build(null)); + public static final RegistrySupplier> MOVING_VL6 = BLOCK_ENTITIES.register("moving_vl6", () -> BlockEntityType.Builder.of(MovingVL6BlockEntity::new, Blocks.MOVING_VL6_BLOCK.get()).build(null)); public static final RegistrySupplier> MOVING_BEAM = BLOCK_ENTITIES.register("moving_beam", () -> BlockEntityType.Builder.of(MovingBeamBlockEntity::new, Blocks.MOVING_BEAM_BLOCK.get()).build(null)); public static final RegistrySupplier> MOVING_SCAN = BLOCK_ENTITIES.register("moving_scan", () -> BlockEntityType.Builder.of(MovingScanBlockEntity::new, Blocks.MOVING_SCAN_BLOCK.get()).build(null)); public static final RegistrySupplier> RGB_BAR = BLOCK_ENTITIES.register("rgb_bar", () -> BlockEntityType.Builder.of(RGBbarBlockEntity::new, Blocks.RGB_BAR.get()).build(null)); + public static final RegistrySupplier> LED_FOUNTAIN = BLOCK_ENTITIES.register("led_fountain", () -> BlockEntityType.Builder.of(LEDfountainBlockEntity::new, Blocks.LED_FOUNTAIN.get()).build(null)); + public static final RegistrySupplier> LED_PANEL_2 = BLOCK_ENTITIES.register("led_panel_2", () -> BlockEntityType.Builder.of(LEDPanel2BlockEntity::new, Blocks.LED_PANEL_2.get()).build(null)); + public static final RegistrySupplier> BIG_PANEL = BLOCK_ENTITIES.register("big_panel", () -> BlockEntityType.Builder.of(BigPanelBlockEntity::new, Blocks.BIG_PANEL.get()).build(null)); + public static final RegistrySupplier> BIG_PANEL2 = BLOCK_ENTITIES.register("big_panel2", () -> BlockEntityType.Builder.of(BigPanel2BlockEntity::new, Blocks.BIG_PANEL2.get()).build(null)); + public static final RegistrySupplier> PAR_LED = BLOCK_ENTITIES.register("par_led", () -> BlockEntityType.Builder.of(ParLedBlockEntity::new, Blocks.PAR_LED.get()).build(null)); + } diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanel2BlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanel2BlockEntity.java new file mode 100644 index 0000000..b671a63 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanel2BlockEntity.java @@ -0,0 +1,72 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class BigPanel2BlockEntity extends BaseDMXConsumerLightBlockEntity { + + public BigPanel2BlockEntity(BlockPos pos, BlockState state) { + super(BlockEntities.BIG_PANEL2.get(), pos, state); + setChannelCount(4); + } + @Override + public Fixture getFixture() { + return Fixtures.BIG_PANEL2.get(); + } + + @Override + public int getFocus() { + return 1; + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 4){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x02; + } + + @Override + public String getModelName() { + return "Big Panel 2"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.BIG_PANEL2.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanelBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanelBlockEntity.java new file mode 100644 index 0000000..0f33c30 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/BigPanelBlockEntity.java @@ -0,0 +1,72 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class BigPanelBlockEntity extends BaseDMXConsumerLightBlockEntity { + + public BigPanelBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntities.BIG_PANEL.get(), pos, state); + setChannelCount(4); + } + @Override + public Fixture getFixture() { + return Fixtures.BIG_PANEL.get(); + } + + @Override + public int getFocus() { + return 1; + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 4){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x02; + } + + @Override + public String getModelName() { + return "Big Panel"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.BIG_PANEL.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDPanel2BlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDPanel2BlockEntity.java new file mode 100644 index 0000000..6dfc54a --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDPanel2BlockEntity.java @@ -0,0 +1,71 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class LEDPanel2BlockEntity extends BaseDMXConsumerLightBlockEntity{ + public LEDPanel2BlockEntity(BlockPos blockPos, BlockState blockState) { + super(BlockEntities.LED_PANEL_2.get(), blockPos, blockState); + setChannelCount(4); + } + + @Override + public Fixture getFixture() { + return Fixtures.LED_PANEL_2.get(); + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 4){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + setChanged(); + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + + @Override + public int getDeviceTypeId() { + return 0x03; + } + + @Override + public String getModelName() { + return "LED Panel 2"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.LED_PANEL_2.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + + @Override + public float getMaxLightDistance() { + return 1; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDfountainBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDfountainBlockEntity.java new file mode 100644 index 0000000..f3e1f3a --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/LEDfountainBlockEntity.java @@ -0,0 +1,72 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class LEDfountainBlockEntity extends BaseDMXConsumerLightBlockEntity { + + public LEDfountainBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntities.LED_FOUNTAIN.get(), pos, state); + setChannelCount(4); + } + @Override + public Fixture getFixture() { + return Fixtures.LED_FOUNTAIN.get(); + } + + @Override + public int getFocus() { + return 1; + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 4){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x02; + } + + @Override + public String getModelName() { + return "LED Fountain"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.LED_FOUNTAIN.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL6BlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL6BlockEntity.java new file mode 100644 index 0000000..be34b8d --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/MovingVL6BlockEntity.java @@ -0,0 +1,84 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blocks.light.MovingVL6Block; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class MovingVL6BlockEntity extends BaseDMXConsumerLightBlockEntity { + public MovingVL6BlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + setChannelCount(7); + } + + public MovingVL6BlockEntity(BlockPos pos, BlockState state) { + this(BlockEntities.MOVING_VL6.get(), pos, state); + } + @Override + public Fixture getFixture() { + return Fixtures.MOVING_VL6.get(); + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 7){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + focus = convertByteToInt(ourValues[4]); + pan = (int) ((convertByteToInt(ourValues[5]) * 360) / 255f) - 180; + tilt = (int) ((convertByteToInt(ourValues[6]) * 270) / 255F) - 225; + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x01; + } + + @Override + public String getModelName() { + return "Moving VL6"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.MOVING_VL6.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + @Override + public boolean isUpsideDown() { + return getBlockState().getValue(MovingVL6Block.HANGING) && getBlockState().getValue(MovingVL6Block.HANG_DIRECTION) == Direction.UP; + } + + @Override + public int getBasePan() { + return 0; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blockentities/light/ParLedBlockEntity.java b/common/src/main/java/dev/imabad/theatrical/blockentities/light/ParLedBlockEntity.java new file mode 100644 index 0000000..814ae8a --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blockentities/light/ParLedBlockEntity.java @@ -0,0 +1,72 @@ +package dev.imabad.theatrical.blockentities.light; + +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.fixtures.Fixtures; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Arrays; + +public class ParLedBlockEntity extends BaseDMXConsumerLightBlockEntity { + + public ParLedBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntities.PAR_LED.get(), pos, state); + setChannelCount(4); + } + @Override + public Fixture getFixture() { + return Fixtures.PAR_LED.get(); + } + + @Override + public int getFocus() { + return 1; + } + + @Override + public void consume(byte[] dmxValues) { + int start = this.getChannelStart() > 0 ? this.getChannelStart() - 1 : 0; + byte[] ourValues = Arrays.copyOfRange(dmxValues, start, + start+ this.getChannelCount()); + if(ourValues.length < 4){ + return; + } + if(this.storePrev()){ + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + } + intensity = convertByteToInt(ourValues[0]); + red = convertByteToInt(ourValues[1]); + green = convertByteToInt(ourValues[2]); + blue = convertByteToInt(ourValues[3]); + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_CLIENTS); + setChanged(); + } + + @Override + public int getDeviceTypeId() { + return 0x02; + } + + @Override + public String getModelName() { + return "Par Led"; + } + + @Override + public ResourceLocation getFixtureId() { + return Fixtures.PAR_LED.getId(); + } + + @Override + public int getActivePersonality() { + return 0; + } + + public int convertByteToInt(byte val) { + return Byte.toUnsignedInt(val); + } + +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java index 659cecb..f547961 100644 --- a/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java +++ b/common/src/main/java/dev/imabad/theatrical/blocks/Blocks.java @@ -7,11 +7,17 @@ import dev.imabad.theatrical.blocks.interfaces.ArtNetInterfaceBlock; import dev.imabad.theatrical.blocks.interfaces.RedstoneInterfaceBlock; import dev.imabad.theatrical.blocks.light.FresnelBlock; +import dev.imabad.theatrical.blocks.light.LEDPanel2Block; import dev.imabad.theatrical.blocks.light.RGBbarBlock; import dev.imabad.theatrical.blocks.light.LEDPanelBlock; +import dev.imabad.theatrical.blocks.light.LEDfountainBlock; +import dev.imabad.theatrical.blocks.light.BigPanelBlock; +import dev.imabad.theatrical.blocks.light.BigPanel2Block; import dev.imabad.theatrical.blocks.light.MovingLightBlock; import dev.imabad.theatrical.blocks.light.MovingWashBlock; import dev.imabad.theatrical.blocks.light.MovingVL2CBlock; +import dev.imabad.theatrical.blocks.light.MovingVL6Block; +import dev.imabad.theatrical.blocks.light.ParLedBlock; import dev.imabad.theatrical.blocks.light.MovingBeamBlock; import dev.imabad.theatrical.blocks.light.MovingScanBlock; import dev.imabad.theatrical.blocks.rigging.TankTrapBlock; @@ -30,12 +36,18 @@ public class Blocks { public static final RegistrySupplier MOVING_LIGHT_BLOCK = BLOCKS.register("moving_light", MovingLightBlock::new); public static final RegistrySupplier MOVING_WASH_BLOCK = BLOCKS.register("moving_wash", MovingWashBlock::new); public static final RegistrySupplier MOVING_VL2C_BLOCK = BLOCKS.register("moving_vl2c", MovingVL2CBlock::new); + public static final RegistrySupplier MOVING_VL6_BLOCK = BLOCKS.register("moving_vl6", MovingVL6Block::new); public static final RegistrySupplier MOVING_BEAM_BLOCK = BLOCKS.register("moving_beam", MovingBeamBlock::new); public static final RegistrySupplier MOVING_SCAN_BLOCK = BLOCKS.register("moving_scan", MovingScanBlock::new); public static final RegistrySupplier PIPE_BLOCK = BLOCKS.register("pipe", dev.imabad.theatrical.blocks.rigging.PipeBlock::new); public static final RegistrySupplier ART_NET_INTERFACE = BLOCKS.register("artnet_interface", ArtNetInterfaceBlock::new); public static final RegistrySupplier LED_FRESNEL = BLOCKS.register("led_fresnel", FresnelBlock::new); + public static final RegistrySupplier LED_PANEL_2 = BLOCKS.register("led_panel_2", LEDPanel2Block::new); + public static final RegistrySupplier PAR_LED = BLOCKS.register("par_led", ParLedBlock::new); + public static final RegistrySupplier LED_FOUNTAIN = BLOCKS.register("led_fountain", LEDfountainBlock::new); public static final RegistrySupplier RGB_BAR = BLOCKS.register("rgb_bar", RGBbarBlock::new); + public static final RegistrySupplier BIG_PANEL = BLOCKS.register("big_panel", BigPanelBlock::new); + public static final RegistrySupplier BIG_PANEL2 = BLOCKS.register("big_panel2", BigPanel2Block::new); public static final RegistrySupplier TRUSS_BLOCK = BLOCKS.register("truss", TrussBlock::new); public static final RegistrySupplier REDSTONE_INTERFACE = BLOCKS.register("redstone_interface", RedstoneInterfaceBlock::new); public static final RegistrySupplier TANK_TRAP = BLOCKS.register("tank_trap", TankTrapBlock::new); diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanel2Block.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanel2Block.java new file mode 100644 index 0000000..bf4a86c --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanel2Block.java @@ -0,0 +1,135 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.BigPanel2BlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class BigPanel2Block extends BaseLightBlock{ + + public BigPanel2Block() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new BigPanel2BlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + if(playerFacing.getAxis() == Direction.Axis.X){ + if(playerFacing == Direction.WEST){ + return Direction.SOUTH; + } else { + return Direction.NORTH; + } + } else { + if(playerFacing == Direction.SOUTH){ + return Direction.WEST; + } else { + return Direction.EAST; + } + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.BIG_PANEL2.get() ? BigPanel2BlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (!level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + new OpenScreen(pos, TheatricalScreen.BIG_PANEL2).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanelBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanelBlock.java new file mode 100644 index 0000000..1bcb600 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/BigPanelBlock.java @@ -0,0 +1,135 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.BigPanelBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class BigPanelBlock extends BaseLightBlock{ + + public BigPanelBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new BigPanelBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + if(playerFacing.getAxis() == Direction.Axis.X){ + if(playerFacing == Direction.WEST){ + return Direction.SOUTH; + } else { + return Direction.NORTH; + } + } else { + if(playerFacing == Direction.SOUTH){ + return Direction.WEST; + } else { + return Direction.EAST; + } + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.BIG_PANEL.get() ? BigPanelBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (!level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + new OpenScreen(pos, TheatricalScreen.BIG_PANEL).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/LEDPanel2Block.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/LEDPanel2Block.java new file mode 100644 index 0000000..b347d41 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/LEDPanel2Block.java @@ -0,0 +1,135 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.LEDPanel2BlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class LEDPanel2Block extends BaseLightBlock{ + + public LEDPanel2Block() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new LEDPanel2BlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + if(playerFacing.getAxis() == Direction.Axis.X){ + if(playerFacing == Direction.WEST){ + return Direction.SOUTH; + } else { + return Direction.NORTH; + } + } else { + if(playerFacing == Direction.SOUTH){ + return Direction.WEST; + } else { + return Direction.EAST; + } + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.LED_PANEL_2.get() ? LEDPanel2BlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (!level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + new OpenScreen(pos, TheatricalScreen.LED_PANEL_2).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/LEDfountainBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/LEDfountainBlock.java new file mode 100644 index 0000000..db56e1c --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/LEDfountainBlock.java @@ -0,0 +1,135 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.LEDfountainBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class LEDfountainBlock extends BaseLightBlock{ + + public LEDfountainBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new LEDfountainBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + if(playerFacing.getAxis() == Direction.Axis.X){ + if(playerFacing == Direction.WEST){ + return Direction.SOUTH; + } else { + return Direction.NORTH; + } + } else { + if(playerFacing == Direction.SOUTH){ + return Direction.WEST; + } else { + return Direction.EAST; + } + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.LED_FOUNTAIN.get() ? LEDfountainBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (!level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + new OpenScreen(pos, TheatricalScreen.LED_FOUNTAIN).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL6Block.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL6Block.java new file mode 100644 index 0000000..bb71ba2 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/MovingVL6Block.java @@ -0,0 +1,125 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.MovingVL6BlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class MovingVL6Block extends BaseLightBlock{ + + + public MovingVL6Block() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new MovingVL6BlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + return playerFacing.getOpposite(); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.MOVING_VL6.get() ? MovingVL6BlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + } else { + new OpenScreen(pos, TheatricalScreen.GENERIC_DMX).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/blocks/light/ParLedBlock.java b/common/src/main/java/dev/imabad/theatrical/blocks/light/ParLedBlock.java new file mode 100644 index 0000000..e579122 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/blocks/light/ParLedBlock.java @@ -0,0 +1,135 @@ +package dev.imabad.theatrical.blocks.light; + +import dev.imabad.theatrical.TheatricalClient; +import dev.imabad.theatrical.TheatricalScreen; +import dev.imabad.theatrical.blockentities.BlockEntities; +import dev.imabad.theatrical.blockentities.light.ParLedBlockEntity; +import dev.imabad.theatrical.blocks.Blocks; +import dev.imabad.theatrical.net.OpenScreen; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.EntityCollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +public class ParLedBlock extends BaseLightBlock{ + + public ParLedBlock() { + super(Properties.of() + .requiresCorrectToolForDrops() + .strength(3, 3) + .noOcclusion() + .isValidSpawn(Blocks::neverAllowSpawn) + .mapColor(MapColor.METAL) + .sound(SoundType.METAL) + .pushReaction(PushReaction.DESTROY)); + } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new ParLedBlockEntity(blockPos, blockState); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + return super.getStateForPlacement(blockPlaceContext).setValue(HANGING, + blockPlaceContext.getClickedFace() == Direction.DOWN || + isHanging(blockPlaceContext.getLevel(), blockPlaceContext.getClickedPos())); + } + + @Override + public boolean canSurvive(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + if(blockState.getValue(HANGING)){ + return isHanging(levelReader, blockPos); + } + return !levelReader.getBlockState(blockPos.below()).isAir(); + } + + @Override + public Direction getLightFacing(Direction hangDirection, Player placingPlayer) { + if(hangDirection == Direction.UP){ + return placingPlayer.getDirection(); + } + Direction playerFacing = placingPlayer.getDirection(); + if(playerFacing.getAxis() == Direction.Axis.X){ + if(playerFacing == Direction.WEST){ + return Direction.SOUTH; + } else { + return Direction.NORTH; + } + } else { + if(playerFacing == Direction.SOUTH){ + return Direction.WEST; + } else { + return Direction.EAST; + } + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return blockEntityType == BlockEntities.PAR_LED.get() ? ParLedBlockEntity::tick : null; + } + + @Override + public VoxelShape getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(context instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() == null){ + return Shapes.empty(); + } + return super.getVisualShape(state, level, pos, context); + } + + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + if(super.use(state, level, pos, player, hand, hit) == InteractionResult.PASS) { + if (!level.isClientSide) { + if (player.isCrouching()) { + if (TheatricalClient.DEBUG_BLOCKS.contains(pos)) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } else { + TheatricalClient.DEBUG_BLOCKS.add(pos); + } + return InteractionResult.SUCCESS; + } + new OpenScreen(pos, TheatricalScreen.PAR_LED).sendTo((ServerPlayer) player); + } + } + return InteractionResult.SUCCESS; + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + if(level.isClientSide()) { + TheatricalClient.DEBUG_BLOCKS.remove(pos); + } + super.destroy(level, pos, state); + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanel2Renderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanel2Renderer.java new file mode 100644 index 0000000..023e51a --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanel2Renderer.java @@ -0,0 +1,200 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.BigPanel2BlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class BigPanel2Renderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + public BigPanel2Renderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(BigPanel2BlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(BigPanel2BlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.0625, 0.5f, 0.20f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -1.0f, 1.5f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 1.0f, 1.5f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 1.0f, -1.5f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-1.0f, -1.5f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(BigPanel2BlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanelRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanelRenderer.java new file mode 100644 index 0000000..31cedf6 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/BigPanelRenderer.java @@ -0,0 +1,200 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.BigPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class BigPanelRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + public BigPanelRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(BigPanelBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(BigPanelBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5, 0.5f, 0.20f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -1.5f, 1.5f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 1.5f, 1.5f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 1.5f, -1.5f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-1.5f, -1.5f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(BigPanelBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDPanel2Renderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDPanel2Renderer.java new file mode 100644 index 0000000..8cb2cc9 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDPanel2Renderer.java @@ -0,0 +1,200 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanel2BlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class LEDPanel2Renderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + public LEDPanel2Renderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(LEDPanel2BlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(LEDPanel2BlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0, 0f, -0.01f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, 0, 1 , 0); + addVertex(beamConsumer, m, normal, r, g, b, a, 1, 1, 0); + addVertex(beamConsumer, m, normal, r, g, b, a, 1, 0, 0); + addVertex(beamConsumer, m, normal, r, g, b, a,0, 0, 0); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(LEDPanel2BlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDfountainRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDfountainRenderer.java new file mode 100644 index 0000000..85c3486 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/LEDfountainRenderer.java @@ -0,0 +1,200 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDfountainBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class LEDfountainRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + public LEDfountainRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(LEDfountainBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(LEDfountainBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5, 1.75f, 0.28f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.1875f, 0.1875f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.1875f, 0.1875f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.1875f, -0.1875f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.1875f, -0.1875f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(LEDfountainBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java index 641a01a..40bbec9 100644 --- a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingBeamRenderer.java @@ -128,7 +128,7 @@ public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseSt int g = (color >> 8) & 0xFF; int b = color & 0xFF; int a = (int) (((float) ((intensity * 1) / 255f)) * 255); - poseStack.translate(0.5F, 1F, 0.07F); + poseStack.translate(0.5F, 0.78125F, 0.2F); Matrix4f m = poseStack.last().pose(); Matrix3f normal = poseStack.last().normal(); addVertex(beamConsumer, m, normal, r, g, b, a, -0.1875f, 0.1875f , 0f); diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java index 10ba671..af23674 100644 --- a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL2CRenderer.java @@ -128,7 +128,7 @@ public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseSt int g = (color >> 8) & 0xFF; int b = color & 0xFF; int a = (int) (((float) ((intensity * 1) / 255f)) * 255); - poseStack.translate(0.5F, 1F, 0.07F); + poseStack.translate(0.5F, 0.78125F, 0.2F); Matrix4f m = poseStack.last().pose(); Matrix3f normal = poseStack.last().normal(); addVertex(beamConsumer, m, normal, r, g, b, a, -0.125f, 0.125f , 0f); diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL6Renderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL6Renderer.java new file mode 100644 index 0000000..2c686d8 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/MovingVL6Renderer.java @@ -0,0 +1,215 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.LEDPanelBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingVL6BlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class MovingVL6Renderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + + public MovingVL6Renderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(MovingVL6BlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(MovingVL6BlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5F, 0.8125F, 0.02F); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.125f, 0.125f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.125f, 0.125f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.125f, -0.125f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.125f, -0.125f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(MovingVL6BlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + //TODO: Handle hanging up + } + poseStack.translate(0, -0.5, 0F); + } + //#endregion + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + poseStack.translate(0, -0.08, 0); + } + if (isFlipped) { + poseStack.translate(0.5F, 0.5, .5F); + poseStack.mulPose(Axis.ZP.rotationDegrees(180)); + poseStack.translate(-0.5F, -0.5, -.5F); + } + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YP.rotationDegrees((prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); + if (isFlipped) { + poseStack.mulPose(Axis.XP.rotationDegrees(-180)); + } else { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + poseStack.mulPose(Axis.XP.rotationDegrees((prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/ParLedRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/ParLedRenderer.java new file mode 100644 index 0000000..aeecdb3 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/ParLedRenderer.java @@ -0,0 +1,212 @@ +package dev.imabad.theatrical.client.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import dev.imabad.theatrical.TheatricalExpectPlatform; +import dev.imabad.theatrical.blockentities.light.ParLedBlockEntity; +import dev.imabad.theatrical.blockentities.light.MovingLightBlockEntity; +import dev.imabad.theatrical.blocks.HangableBlock; +import dev.imabad.theatrical.client.LazyRenderers; +import dev.imabad.theatrical.client.TheatricalRenderTypes; +import net.minecraft.client.Camera; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +import org.joml.Matrix3f; +import org.joml.Matrix4f; + +public class ParLedRenderer extends FixtureRenderer { + private BakedModel cachedPanModel, cachedTiltModel, cachedStaticModel; + public ParLedRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void renderModel(ParLedBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging, int packedLight, int packedOverlay) { + if(cachedStaticModel == null){ + cachedStaticModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getStaticModel()); + } + if (cachedPanModel == null){ + cachedPanModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getPanModel()); + } + if (cachedTiltModel == null){ + cachedTiltModel = TheatricalExpectPlatform.getBakedModel(blockEntity.getFixture().getTiltModel()); + } + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(-90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + // UP-DOWN + if (hangDirection == Direction.UP) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } else if (hangDirection == Direction.DOWN) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + } + + poseStack.translate(0, -1.45, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + // Static Model Render + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedStaticModel, packedLight, packedOverlay); + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedPanModel, packedLight, packedOverlay); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + minecraftRenderModel(poseStack, vertexConsumer, blockState, cachedTiltModel, packedLight, packedOverlay); + //#endregion + } + @Override + public void beforeRenderBeam(ParLedBlockEntity blockEntity, PoseStack poseStack, VertexConsumer vertexConsumer, MultiBufferSource multiBufferSource, Direction facing, float partialTicks, boolean isFlipped, BlockState blockstate, boolean isHanging, int packedLight, int packedOverlay) { + if(blockEntity.getIntensity() > 0){ + LazyRenderers.addLazyRender(new LazyRenderers.LazyRenderer() { + @Override + public void render(MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, Camera camera, float partialTick) { + poseStack.pushPose(); + Vec3 offset = Vec3.atLowerCornerOf(blockEntity.getBlockPos()).subtract(camera.getPosition()); + poseStack.translate(offset.x, offset.y, offset.z); + preparePoseStack(blockEntity, poseStack, facing, partialTick, isFlipped, blockstate, isHanging); + VertexConsumer beamConsumer = multiBufferSource.getBuffer(TheatricalRenderTypes.BEAM); +// poseStack.translate(blockEntity.getFixture().getBeamStartPosition()[0], blockEntity.getFixture().getBeamStartPosition()[1], blockEntity.getFixture().getBeamStartPosition()[2]); + float intensity = (blockEntity.getPrevIntensity() + ((blockEntity.getIntensity()) - blockEntity.getPrevIntensity()) * partialTicks); + int color = blockEntity.getColour(); + int r = (color >> 16) & 0xFF; + int g = (color >> 8) & 0xFF; + int b = color & 0xFF; + int a = (int) (((float) ((intensity * 1) / 255f)) * 255); + poseStack.translate(0.5, 0.45f, 0.40125f); + Matrix4f m = poseStack.last().pose(); + Matrix3f normal = poseStack.last().normal(); + addVertex(beamConsumer, m, normal, r, g, b, a, -0.25f, 0.25f , 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.25f, 0.25f, 0f); + addVertex(beamConsumer, m, normal, r, g, b, a, 0.25f, -0.25f,0f); + addVertex(beamConsumer, m, normal, r, g, b, a,-0.25f, -0.25f, 0f); + poseStack.popPose(); + } + + @Override + public Vec3 getPos(float partialTick) { + return blockEntity.getBlockPos().getCenter(); + } + }); + } + } + + @Override + public void preparePoseStack(ParLedBlockEntity blockEntity, PoseStack poseStack, Direction facing, float partialTicks, boolean isFlipped, BlockState blockState, boolean isHanging) { + //#region Fixture Hanging + poseStack.translate(0.5F, 0, .5F); + if(isHanging){ + Direction hangDirection = blockState.getValue(HangableBlock.HANG_DIRECTION); + poseStack.translate(0, 0.5, 0F); + if(hangDirection.getAxis() != Direction.Axis.Y){ + if(hangDirection.getAxis() == Direction.Axis.Z){ + if(hangDirection == Direction.SOUTH) { + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.XN.rotationDegrees(-90)); + } + } else { + if(hangDirection == Direction.EAST) { + poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); + } + } + } else { + // UP-DOWN + if (hangDirection == Direction.UP) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } else if (hangDirection == Direction.DOWN) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } + } + + poseStack.translate(0, -1.45, 0F); + } + //#endregion + if(facing.getAxis() == Direction.Axis.X){ + poseStack.mulPose(Axis.YP.rotationDegrees(facing.toYRot())); + } else { + poseStack.mulPose(Axis.YP.rotationDegrees(facing.getOpposite().toYRot())); + } + poseStack.translate(-0.5F, 0, -.5F); + if (isHanging) { + Optional optionalSupport = blockEntity.getSupportingStructure(); + if (optionalSupport.isPresent()) { + float[] transforms = blockEntity.getFixture().getTransforms(blockState, optionalSupport.get()); + poseStack.translate(transforms[0], transforms[1], transforms[2]); + } else { + poseStack.translate(0, 0.19, 0); + } + } + //#region Model Pan + float[] pans = blockEntity.getFixture().getPanRotationPosition(); + poseStack.translate(pans[0], pans[1], pans[2]); + int prevPan = blockEntity.getPrevPan(); + int pan = blockEntity.getPan(); + poseStack.mulPose(Axis.YN.rotationDegrees(-(prevPan + (pan - prevPan) * partialTicks))); + poseStack.translate(-pans[0], -pans[1], -pans[2]); + //#endregion + //#region Model Tilt + float[] tilts = blockEntity.getFixture().getTiltRotationPosition(); + poseStack.translate(tilts[0], tilts[1], tilts[2]); + int prevTilt = blockEntity.getPrevTilt(); + int tilt = blockEntity.getTilt(); +// poseStack.mulPose(Axis.XP.rotationDegrees(180)); + poseStack.mulPose(Axis.XP.rotationDegrees(-(prevTilt + (tilt - prevTilt) * partialTicks))); + poseStack.translate(-tilts[0], -tilts[1], -tilts[2]); + //#endregion + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java b/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java index c68b100..9324b0d 100644 --- a/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.java @@ -47,21 +47,27 @@ public void renderModel(RGBbarBlockEntity blockEntity, PoseStack poseStack, Vert if(hangDirection.getAxis() != Direction.Axis.Y){ if(hangDirection.getAxis() == Direction.Axis.Z){ if(hangDirection == Direction.SOUTH) { - poseStack.mulPose(Axis.XP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); } else { - poseStack.mulPose(Axis.XN.rotationDegrees(90)); + poseStack.mulPose(Axis.XN.rotationDegrees(-90)); } } else { if(hangDirection == Direction.EAST) { - poseStack.mulPose(Axis.ZN.rotationDegrees(90)); - } else { poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); } } } else { - //TODO: Handle hanging up + // UP-DOWN + if (hangDirection == Direction.UP) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } else if (hangDirection == Direction.DOWN) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } } - poseStack.translate(0, -0.5, 0F); + + poseStack.translate(0, -1.45, 0F); } //#endregion if(facing.getAxis() == Direction.Axis.X){ @@ -147,21 +153,27 @@ public void preparePoseStack(RGBbarBlockEntity blockEntity, PoseStack poseStack, if(hangDirection.getAxis() != Direction.Axis.Y){ if(hangDirection.getAxis() == Direction.Axis.Z){ if(hangDirection == Direction.SOUTH) { - poseStack.mulPose(Axis.XP.rotationDegrees(90)); + poseStack.mulPose(Axis.XP.rotationDegrees(-90)); } else { - poseStack.mulPose(Axis.XN.rotationDegrees(90)); + poseStack.mulPose(Axis.XN.rotationDegrees(-90)); } } else { if(hangDirection == Direction.EAST) { - poseStack.mulPose(Axis.ZN.rotationDegrees(90)); - } else { poseStack.mulPose(Axis.ZN.rotationDegrees(-90)); + } else { + poseStack.mulPose(Axis.ZN.rotationDegrees(90)); } } } else { - //TODO: Handle hanging up + // UP-DOWN + if (hangDirection == Direction.UP) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } else if (hangDirection == Direction.DOWN) { + poseStack.mulPose(Axis.XP.rotationDegrees(180)); + } } - poseStack.translate(0, -0.5, 0F); + + poseStack.translate(0, -1.45, 0F); } //#endregion if(facing.getAxis() == Direction.Axis.X){ diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanel2Screen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanel2Screen.java new file mode 100644 index 0000000..a933db8 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanel2Screen.java @@ -0,0 +1,47 @@ +package dev.imabad.theatrical.client.gui.screen; + +import dev.imabad.theatrical.blockentities.light.BigPanel2BlockEntity; +import dev.imabad.theatrical.client.gui.widgets.BasicSlider; +import dev.imabad.theatrical.net.UpdateFixturePosition; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.layouts.LayoutSettings; +import net.minecraft.network.chat.Component; + +public class BigPanel2Screen extends GenericDMXConfigurationScreen { + private BasicSlider tiltSlider, panSlider; + private final BigPanel2BlockEntity be; + + public BigPanel2Screen(BigPanel2BlockEntity be) { + super(be, be.getBlockPos(), "block.theatrical.big_panel2"); + this.be = be; + } + + @Override + public void addExtraWidgetsToUI() { + this.tiltSlider = new BasicSlider(xCenter + 13, yCenter + 45, 150, 20, Component.empty(), be.getTilt(), -90, 90, (newTilt) -> { + be.setTilt(newTilt.intValue()); + }); + this.panSlider = new BasicSlider(xCenter, yCenter + 75, 150, 20, Component.empty(), be.getPan(),-180, 180, (newPan) -> { + be.setPan(newPan.intValue()); + }); + LayoutSettings layoutSettings = layout.newChildLayoutSettings().paddingVertical(2); + layout.addChild(new StringWidget(Component.translatable("fixture.tilt"), font), layoutSettings); + layout.addChild(tiltSlider, layoutSettings); + layout.addChild(new StringWidget(Component.translatable("fixture.pan"), font), layoutSettings); + layout.addChild(panSlider, layoutSettings); + } + + @Override + protected void update() { + super.update(); + new UpdateFixturePosition(be.getBlockPos(), be.getTilt(), be.getPan()).sendToServer(); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics) { + super.renderLabels(guiGraphics); +// renderLabel(guiGraphics, "fixture.tilt", 0, 36); +// renderLabel(guiGraphics, "fixture.pan", 0, 66); + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanelScreen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanelScreen.java new file mode 100644 index 0000000..1686da0 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/BigPanelScreen.java @@ -0,0 +1,47 @@ +package dev.imabad.theatrical.client.gui.screen; + +import dev.imabad.theatrical.blockentities.light.BigPanelBlockEntity; +import dev.imabad.theatrical.client.gui.widgets.BasicSlider; +import dev.imabad.theatrical.net.UpdateFixturePosition; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.layouts.LayoutSettings; +import net.minecraft.network.chat.Component; + +public class BigPanelScreen extends GenericDMXConfigurationScreen { + private BasicSlider tiltSlider, panSlider; + private final BigPanelBlockEntity be; + + public BigPanelScreen(BigPanelBlockEntity be) { + super(be, be.getBlockPos(), "block.theatrical.big_panel"); + this.be = be; + } + + @Override + public void addExtraWidgetsToUI() { + this.tiltSlider = new BasicSlider(xCenter + 13, yCenter + 45, 150, 20, Component.empty(), be.getTilt(), -90, 90, (newTilt) -> { + be.setTilt(newTilt.intValue()); + }); + this.panSlider = new BasicSlider(xCenter, yCenter + 75, 150, 20, Component.empty(), be.getPan(),-180, 180, (newPan) -> { + be.setPan(newPan.intValue()); + }); + LayoutSettings layoutSettings = layout.newChildLayoutSettings().paddingVertical(2); + layout.addChild(new StringWidget(Component.translatable("fixture.tilt"), font), layoutSettings); + layout.addChild(tiltSlider, layoutSettings); + layout.addChild(new StringWidget(Component.translatable("fixture.pan"), font), layoutSettings); + layout.addChild(panSlider, layoutSettings); + } + + @Override + protected void update() { + super.update(); + new UpdateFixturePosition(be.getBlockPos(), be.getTilt(), be.getPan()).sendToServer(); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics) { + super.renderLabels(guiGraphics); +// renderLabel(guiGraphics, "fixture.tilt", 0, 36); +// renderLabel(guiGraphics, "fixture.pan", 0, 66); + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDPanel2Screen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDPanel2Screen.java new file mode 100644 index 0000000..40f0bea --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDPanel2Screen.java @@ -0,0 +1,47 @@ +package dev.imabad.theatrical.client.gui.screen; + +import dev.imabad.theatrical.blockentities.light.LEDPanel2BlockEntity; +import dev.imabad.theatrical.client.gui.widgets.BasicSlider; +import dev.imabad.theatrical.net.UpdateFixturePosition; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.layouts.LayoutSettings; +import net.minecraft.network.chat.Component; + +public class LEDPanel2Screen extends GenericDMXConfigurationScreen { + private BasicSlider tiltSlider, panSlider; + private final LEDPanel2BlockEntity be; + + public LEDPanel2Screen(LEDPanel2BlockEntity be) { + super(be, be.getBlockPos(), "block.theatrical.led_panel_2"); + this.be = be; + } + + @Override + public void addExtraWidgetsToUI() { + this.tiltSlider = new BasicSlider(xCenter + 13, yCenter + 45, 150, 20, Component.empty(), be.getTilt(), -90, 90, (newTilt) -> { + be.setTilt(newTilt.intValue()); + }); + this.panSlider = new BasicSlider(xCenter, yCenter + 75, 150, 20, Component.empty(), be.getPan(),-180, 180, (newPan) -> { + be.setPan(newPan.intValue()); + }); + LayoutSettings layoutSettings = layout.newChildLayoutSettings().paddingVertical(2); + layout.addChild(new StringWidget(Component.translatable("fixture.tilt"), font), layoutSettings); + layout.addChild(tiltSlider, layoutSettings); + layout.addChild(new StringWidget(Component.translatable("fixture.pan"), font), layoutSettings); + layout.addChild(panSlider, layoutSettings); + } + + @Override + protected void update() { + super.update(); + new UpdateFixturePosition(be.getBlockPos(), be.getTilt(), be.getPan()).sendToServer(); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics) { + super.renderLabels(guiGraphics); +// renderLabel(guiGraphics, "fixture.tilt", 0, 36); +// renderLabel(guiGraphics, "fixture.pan", 0, 66); + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDfountainScreen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDfountainScreen.java new file mode 100644 index 0000000..81cf24d --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/LEDfountainScreen.java @@ -0,0 +1,47 @@ +package dev.imabad.theatrical.client.gui.screen; + +import dev.imabad.theatrical.blockentities.light.LEDfountainBlockEntity; +import dev.imabad.theatrical.client.gui.widgets.BasicSlider; +import dev.imabad.theatrical.net.UpdateFixturePosition; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.layouts.LayoutSettings; +import net.minecraft.network.chat.Component; + +public class LEDfountainScreen extends GenericDMXConfigurationScreen { + private BasicSlider tiltSlider, panSlider; + private final LEDfountainBlockEntity be; + + public LEDfountainScreen(LEDfountainBlockEntity be) { + super(be, be.getBlockPos(), "block.theatrical.led_fountain"); + this.be = be; + } + + @Override + public void addExtraWidgetsToUI() { + this.tiltSlider = new BasicSlider(xCenter + 13, yCenter + 45, 150, 20, Component.empty(), be.getTilt(), -90, 90, (newTilt) -> { + be.setTilt(newTilt.intValue()); + }); + this.panSlider = new BasicSlider(xCenter, yCenter + 75, 150, 20, Component.empty(), be.getPan(),-180, 180, (newPan) -> { + be.setPan(newPan.intValue()); + }); + LayoutSettings layoutSettings = layout.newChildLayoutSettings().paddingVertical(2); + layout.addChild(new StringWidget(Component.translatable("fixture.tilt"), font), layoutSettings); + layout.addChild(tiltSlider, layoutSettings); + layout.addChild(new StringWidget(Component.translatable("fixture.pan"), font), layoutSettings); + layout.addChild(panSlider, layoutSettings); + } + + @Override + protected void update() { + super.update(); + new UpdateFixturePosition(be.getBlockPos(), be.getTilt(), be.getPan()).sendToServer(); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics) { + super.renderLabels(guiGraphics); +// renderLabel(guiGraphics, "fixture.tilt", 0, 36); +// renderLabel(guiGraphics, "fixture.pan", 0, 66); + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ParLedScreen.java b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ParLedScreen.java new file mode 100644 index 0000000..c7cd10e --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/gui/screen/ParLedScreen.java @@ -0,0 +1,47 @@ +package dev.imabad.theatrical.client.gui.screen; + +import dev.imabad.theatrical.blockentities.light.ParLedBlockEntity; +import dev.imabad.theatrical.client.gui.widgets.BasicSlider; +import dev.imabad.theatrical.net.UpdateFixturePosition; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.layouts.LayoutSettings; +import net.minecraft.network.chat.Component; + +public class ParLedScreen extends GenericDMXConfigurationScreen { + private BasicSlider tiltSlider, panSlider; + private final ParLedBlockEntity be; + + public ParLedScreen(ParLedBlockEntity be) { + super(be, be.getBlockPos(), "block.theatrical.par_led"); + this.be = be; + } + + @Override + public void addExtraWidgetsToUI() { + this.tiltSlider = new BasicSlider(xCenter + 13, yCenter + 45, 150, 20, Component.empty(), be.getTilt(), -90, 90, (newTilt) -> { + be.setTilt(newTilt.intValue()); + }); + this.panSlider = new BasicSlider(xCenter, yCenter + 75, 150, 20, Component.empty(), be.getPan(),-180, 180, (newPan) -> { + be.setPan(newPan.intValue()); + }); + LayoutSettings layoutSettings = layout.newChildLayoutSettings().paddingVertical(2); + layout.addChild(new StringWidget(Component.translatable("fixture.tilt"), font), layoutSettings); + layout.addChild(tiltSlider, layoutSettings); + layout.addChild(new StringWidget(Component.translatable("fixture.pan"), font), layoutSettings); + layout.addChild(panSlider, layoutSettings); + } + + @Override + protected void update() { + super.update(); + new UpdateFixturePosition(be.getBlockPos(), be.getTilt(), be.getPan()).sendToServer(); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics) { + super.renderLabels(guiGraphics); +// renderLabel(guiGraphics, "fixture.tilt", 0, 36); +// renderLabel(guiGraphics, "fixture.pan", 0, 66); + } +} \ No newline at end of file diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/BigPanel2Fixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/BigPanel2Fixture.java new file mode 100644 index 0000000..9525d81 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/BigPanel2Fixture.java @@ -0,0 +1,95 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class BigPanel2Fixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(4, "4-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/bigpanel2x3/bigpanel2x3_body"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/bigpanel3x3/bigpanel_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/bigpanel3x3/bigpanel_static"); + + private final float[] tiltRotation = new float[]{0.0625F, .5F, 1.25F}; + private final float[] panRotation = new float[]{0.0625F, 0.5F, .5F}; + private final float[] beamStartPosition = new float[]{0.0625F, 0.5F, 0.5F}; + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return beamStartPosition; + } + + @Override + public float getDefaultRotation() { + return 0; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 180f; + } + + @Override + public HangType getHangType() { + return HangType.HOOK_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, 0.5F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/BigPanelFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/BigPanelFixture.java new file mode 100644 index 0000000..c92b6a5 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/BigPanelFixture.java @@ -0,0 +1,95 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class BigPanelFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(4, "4-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/bigpanel3x3/bigpanel_body"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/bigpanel3x3/bigpanel_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/bigpanel3x3/bigpanel_static"); + + private final float[] tiltRotation = new float[]{0.5F, .5F, 1.25F}; + private final float[] panRotation = new float[]{0.5F, 0.5F, .5F}; + private final float[] beamStartPosition = new float[]{0.5F, 0.5F, 0.5F}; + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return beamStartPosition; + } + + @Override + public float getDefaultRotation() { + return 0; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 180f; + } + + @Override + public HangType getHangType() { + return HangType.HOOK_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, 0.5F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java index 916f091..f467ae8 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java @@ -16,6 +16,9 @@ public class Fixtures { public static final RegistrySupplier MOVING_WASH = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_wash"), MovingWashFixture::new); + + public static final RegistrySupplier MOVING_VL6 = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_vl6"), MovingVL6Fixture::new); public static final RegistrySupplier MOVING_BEAM = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_beam"), MovingBeamFixture::new); @@ -26,15 +29,29 @@ public class Fixtures { public static final RegistrySupplier RGB_BAR = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "rgb_bar"), RGBbarFixture::new); + public static final RegistrySupplier BIG_PANEL = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "big_panel"), BigPanelFixture::new); + + public static final RegistrySupplier BIG_PANEL2 = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "big_panel2"), BigPanel2Fixture::new); + + public static final RegistrySupplier LED_FOUNTAIN = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "led_fountain"), LEDfountainFixture::new); + public static final RegistrySupplier MOVING_VL2C = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_vl2c"), MovingVL2CFixture::new); public static final RegistrySupplier MOVING_SCAN = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "moving_scan"), MovingScanFixture::new); - + + public static final RegistrySupplier LED_PANEL_2 = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "led_panel_2"), LEDPanel2Fixture::new); public static final RegistrySupplier LED_PANEL = FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "led_panel"), LEDPanelFixture::new); + + public static final RegistrySupplier PAR_LED = + FIXTURES.register(new ResourceLocation(Theatrical.MOD_ID, "par_led"), ParLedFixture::new); public static final RegistrySupplier REDSTONE_INTERFACE = FIXTURES.register( new ResourceLocation(Theatrical.MOD_ID, "redstone_interface"), diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/LEDPanel2Fixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/LEDPanel2Fixture.java new file mode 100644 index 0000000..6526640 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/LEDPanel2Fixture.java @@ -0,0 +1,95 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class LEDPanel2Fixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(4, "4-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/ledpanel/led_panel_body"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/ledpanel/led_panel_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/ledpanel/led_panel_static"); + + private final float[] tiltRotation = new float[]{0.5F, .5F, .2F}; + private final float[] panRotation = new float[]{0.5F, 5F, .5F}; + private final float[] beamStartPosition = new float[]{0.5F, 5F, 0.1F}; + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return beamStartPosition; + } + + @Override + public float getDefaultRotation() { + return 0; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 180f; + } + + @Override + public HangType getHangType() { + return HangType.HOOK_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, 0.5F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/LEDfountainFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/LEDfountainFixture.java new file mode 100644 index 0000000..7b9bf2c --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/LEDfountainFixture.java @@ -0,0 +1,95 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class LEDfountainFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(4, "4-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/fountain_lamp/fountain_lamp_body_only"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/fountain_lamp/fountain_lamp_handle_only"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/fountain_lamp/fountain_lamp_hook_bar"); + + private final float[] tiltRotation = new float[]{0.5F, 1.75F, .5F}; + private final float[] panRotation = new float[]{0.5F, 0F, .41F}; + private final float[] beamStartPosition = new float[]{0.5F, 1.77F, 0.3F}; + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return beamStartPosition; + } + + @Override + public float getDefaultRotation() { + return 0; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 180f; + } + + @Override + public HangType getHangType() { + return HangType.HOOK_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, 0.5F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java index a15ee48..3a9e211 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingBeamFixture.java @@ -29,8 +29,8 @@ public class MovingBeamFixture extends Fixture { private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_beam/moving_beam_pan"); private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_beam/moving_beam_static"); - private final float[] tiltRotation = new float[]{0.5F, 1F, .5F}; - private final float[] panRotation = new float[]{0.5F, .5F, .5F}; + private final float[] tiltRotation = new float[]{0.5F, 0.78125F, .5F}; + private final float[] panRotation = new float[]{0.5F, 0.75F, .5F}; // private final float[] beamStartPosition = new float[]{0.5F, 1.875F, 0.4375F}; @@ -61,7 +61,7 @@ public float[] getPanRotationPosition() { @Override public float[] getBeamStartPosition() { - return new float[]{0.5F, 1F, 0.02F}; + return new float[]{0.5F, 0.78125F, 0.132F}; } @Override @@ -71,7 +71,7 @@ public float getDefaultRotation() { @Override public float getBeamWidth() { - return 0.20f; + return 0.17f; } @Override diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java index f15f745..194b4c2 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java @@ -12,6 +12,7 @@ import java.util.Collections; import java.util.List; + public class MovingVL2CFixture extends Fixture { private static final List PERSONALITIES = Collections.singletonList( @@ -29,8 +30,8 @@ public class MovingVL2CFixture extends Fixture { private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl2c/moving_vl2c_pan"); private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl2c/moving_vl2c_static"); - private final float[] tiltRotation = new float[]{0.5F, 1F, .5F}; - private final float[] panRotation = new float[]{0.5F, .5F, .5F}; + private final float[] tiltRotation = new float[]{0.5F, 0.78125F, .5F}; + private final float[] panRotation = new float[]{0.5F, 0.75F, .5F}; // private final float[] beamStartPosition = new float[]{0.5F, 1.875F, 0.4375F}; @@ -61,7 +62,7 @@ public float[] getPanRotationPosition() { @Override public float[] getBeamStartPosition() { - return new float[]{0.5F, 1F, 0.25F}; + return new float[]{0.5F, 0.78125F, 0.132F}; } @Override @@ -71,7 +72,7 @@ public float getDefaultRotation() { @Override public float getBeamWidth() { - return 0.125f; + return 0.08f; } @Override diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL6Fixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL6Fixture.java new file mode 100644 index 0000000..a133135 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL6Fixture.java @@ -0,0 +1,99 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class MovingVL6Fixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(7, "7-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + .addSlot(SharedSlots.FOCUS) + .addSlot(SharedSlots.PAN) + .addSlot(SharedSlots.TILT) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl6/moving_vl6_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl6/moving_vl6_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/moving_vl6/moving_vl6_static"); + + private final float[] tiltRotation = new float[]{0.5F, 0.8125F, .5F}; + private final float[] panRotation = new float[]{0.5F, 0.8125F, .5F}; +// private final float[] beamStartPosition = new float[]{0.5F, 1.875F, 0.4375F}; + + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return new float[]{0.5F, 0.8125F, 0.01F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.08f; + } + + @Override + public float getRayTraceRotation() { + return 0; + } + + @Override + public HangType getHangType() { + return HangType.BRACE_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, -0.35F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/fixtures/ParLedFixture.java b/common/src/main/java/dev/imabad/theatrical/fixtures/ParLedFixture.java new file mode 100644 index 0000000..9cacb46 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/ParLedFixture.java @@ -0,0 +1,95 @@ +package dev.imabad.theatrical.fixtures; + +import dev.imabad.theatrical.Theatrical; +import dev.imabad.theatrical.api.Fixture; +import dev.imabad.theatrical.api.HangType; +import dev.imabad.theatrical.api.dmx.DMXPersonality; +import dev.imabad.theatrical.blocks.light.BaseLightBlock; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Collections; +import java.util.List; + +public class ParLedFixture extends Fixture { + + private static final List PERSONALITIES = Collections.singletonList( + new DMXPersonality(4, "4-Channel Mode") + .addSlot(SharedSlots.INTENSITY) + .addSlot(SharedSlots.RED) + .addSlot(SharedSlots.GREEN) + .addSlot(SharedSlots.BLUE) + ); + + private static final ResourceLocation TILT_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/parled/parled_tilt"); + private static final ResourceLocation PAN_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/parled/parled_pan"); + private static final ResourceLocation STATIC_MODEL = new ResourceLocation(Theatrical.MOD_ID, "block/parled/parled_static"); + + private final float[] tiltRotation = new float[]{0.5F, .453125F, .5F}; + private final float[] panRotation = new float[]{0.5F, 0F, .5F}; + private final float[] beamStartPosition = new float[]{0.5F, 0.24F, 0.1F}; + + @Override + public ResourceLocation getTiltModel() { + return TILT_MODEL; + } + + @Override + public ResourceLocation getPanModel() { + return PAN_MODEL; + } + + @Override + public ResourceLocation getStaticModel() { + return STATIC_MODEL; + } + + @Override + public float[] getTiltRotationPosition() { + return tiltRotation; + } + + @Override + public float[] getPanRotationPosition() { + return panRotation; + } + + @Override + public float[] getBeamStartPosition() { + return beamStartPosition; + } + + @Override + public float getDefaultRotation() { + return 0; + } + + @Override + public float getBeamWidth() { + return 0.0f; + } + + @Override + public float getRayTraceRotation() { + return 180f; + } + + @Override + public HangType getHangType() { + return HangType.HOOK_BAR; + } + + @Override + public float[] getTransforms(BlockState fixtureBlockState, BlockState supportBlockState) { + if(fixtureBlockState.getValue(BaseLightBlock.HANG_DIRECTION) == Direction.UP){ + return new float[]{0, .5f, 0}; + } + return new float[]{0, 0.5F, 0}; + } + + @Override + public List getDMXPersonalities() { + return PERSONALITIES; + } +} diff --git a/common/src/main/java/dev/imabad/theatrical/items/Items.java b/common/src/main/java/dev/imabad/theatrical/items/Items.java index 8a566ac..cd3b069 100644 --- a/common/src/main/java/dev/imabad/theatrical/items/Items.java +++ b/common/src/main/java/dev/imabad/theatrical/items/Items.java @@ -71,4 +71,29 @@ public class Items { "moving_beam", () -> new BlockItem(Blocks.MOVING_BEAM_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) ); + public static final RegistrySupplier LED_FOUNTAIN = ITEMS.register( + "led_fountain", + () -> new BlockItem(Blocks.LED_FOUNTAIN.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier LED_PANEL_2 = ITEMS.register( + "led_panel_2", + () -> new BlockItem(Blocks.LED_PANEL_2.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier BIG_PANEL = ITEMS.register( + "big_panel", + () -> new BlockItem(Blocks.BIG_PANEL.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier BIG_PANEL2 = ITEMS.register( + "big_panel2", + () -> new BlockItem(Blocks.BIG_PANEL2.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier MOVING_VL6 = ITEMS.register( + "moving_vl6", + () -> new BlockItem(Blocks.MOVING_VL6_BLOCK.get(), new Item.Properties().arch$tab(Theatrical.TAB)) + ); + public static final RegistrySupplier PAR_LED = ITEMS.register( + "par_led", + () -> new BlockItem(Blocks.PAR_LED.get(), new Item.Properties().arch$tab(Theatrical.TAB)) +); + } diff --git a/common/src/main/resources/assets/theatrical/blockstates/big_panel.json b/common/src/main/resources/assets/theatrical/blockstates/big_panel.json new file mode 100644 index 0000000..3ae5209 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/big_panel.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/bigpanel3x3/bigpanel_body"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/big_panel2.json b/common/src/main/resources/assets/theatrical/blockstates/big_panel2.json new file mode 100644 index 0000000..cc66af4 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/big_panel2.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/bigpanel2x3/bigpanel2x3_body"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json b/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json index bf898be..96fd05f 100644 --- a/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json +++ b/common/src/main/resources/assets/theatrical/blockstates/led_fountain.json @@ -1,5 +1,5 @@ { "variants": { - "": {"model": "theatrical:block/fountain_lamp/fountain_lamp_body_only"} + "": {"model": "theatrical:block/fountain_lamp/fountain_lamp_whole"} } } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/led_panel_2.json b/common/src/main/resources/assets/theatrical/blockstates/led_panel_2.json new file mode 100644 index 0000000..0dac618 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/led_panel_2.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/ledpanel/led_panel_body"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/moving_vl6.json b/common/src/main/resources/assets/theatrical/blockstates/moving_vl6.json new file mode 100644 index 0000000..ddcb87b --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/moving_vl6.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/moving_vl6/moving_vl6_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/blockstates/par_led.json b/common/src/main/resources/assets/theatrical/blockstates/par_led.json new file mode 100644 index 0000000..fa78761 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/blockstates/par_led.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "theatrical:block/parled/parled_body_whole"} + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel2x3_body.json b/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel2x3_body.json new file mode 100644 index 0000000..3fd6670 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel2x3_body.json @@ -0,0 +1,99 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/light_side", + "1": "theatrical:block/moving_head_body", + "particle": "theatrical:block/light_side" + }, + "elements": [ + { + "from": [16, -13, 0], + "to": [17, 32, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 7, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 16], "texture": "#0"} + } + }, + { + "from": [-15, -13, 4], + "to": [16, 29, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 7, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 9, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 9, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 9, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 9, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-15, 29, 0], + "to": [16, 32, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 7, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [-15, -16, 0], + "to": [17, -13, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 7, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [-16, -16, 0], + "to": [-15, 32, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 7, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "firstperson_lefthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [-1, 180, 0], + "translation": [-1.5, 0, 0], + "scale": [0.2, 0.3, 0.2] + }, + "head": { + "translation": [4, 0, 0] + } + }, + "groups": [ + { + "name": "group", + "origin": [-31, -17, 0], + "color": 0, + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_pan.json b/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_pan.json new file mode 100644 index 0000000..11804c9 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_pan.json @@ -0,0 +1,15 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/light_side" + }, + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [23, 149, 0], + "scale": [0.3, 0.3, 0.3] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_static.json b/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_static.json new file mode 100644 index 0000000..11804c9 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/bigpanel2x3/bigpanel_static.json @@ -0,0 +1,15 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/light_side" + }, + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [23, 149, 0], + "scale": [0.3, 0.3, 0.3] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_body.json b/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_body.json new file mode 100644 index 0000000..4809905 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_body.json @@ -0,0 +1,92 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/light_side", + "2": "theatrical:block/moving_head_whole", + "particle": "theatrical:block/light_side" + }, + "elements": [ + { + "from": [31, -16, 0], + "to": [32, 32, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 16], "texture": "#0"} + } + }, + { + "from": [-15, -13, 4], + "to": [31, 29, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 7.75, 4, 11.75], "texture": "#2"}, + "east": {"uv": [0, 0, 9, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 9, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 9, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 9, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-15, 29, 0], + "to": [31, 32, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [-15, -16, 0], + "to": [31, -13, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 3], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [-16, -16, 0], + "to": [-15, 32, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 16], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [23, 149, 0], + "scale": [0.3, 0.3, 0.3] + } + }, + "groups": [ + { + "name": "group", + "origin": [-31, -17, 0], + "color": 0, + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_pan.json b/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_pan.json new file mode 100644 index 0000000..11804c9 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_pan.json @@ -0,0 +1,15 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/light_side" + }, + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [23, 149, 0], + "scale": [0.3, 0.3, 0.3] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_static.json b/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_static.json new file mode 100644 index 0000000..11804c9 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/bigpanel3x3/bigpanel_static.json @@ -0,0 +1,15 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/light_side" + }, + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [23, 149, 0], + "scale": [0.3, 0.3, 0.3] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json index 04e387e..37dd06b 100644 --- a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json @@ -7,11 +7,67 @@ "elements": [ { "name": "Main Body", - "from": [5, 2, 1], - "to": [11, 8, 3], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 5]}, + "from": [11, 25, 4], + "to": [12, 31, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 28, 8]}, "faces": { - "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#1", "tintindex": 0}, + "north": {"uv": [1, 1, 15, 15], "rotation": 270, "texture": "#2", "tintindex": 0}, + "east": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [4, 25, 4], + "to": [5, 31, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [1, 28, 8]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 270, "texture": "#2", "tintindex": 0}, + "east": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [4, 31, 4], + "to": [12, 32, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [2, 28, 8]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 270, "texture": "#2", "tintindex": 0}, + "east": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [4, 24, 4], + "to": [12, 25, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [2, 21, 8]}, + "faces": { + "north": {"uv": [1, 1, 15, 15], "rotation": 270, "texture": "#2", "tintindex": 0}, + "east": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "south": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "west": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [5, 25, 4.75], + "to": [11, 31, 7.75], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 28, 8.75]}, + "faces": { + "north": {"uv": [4, 4, 12, 12], "rotation": 270, "texture": "#1", "tintindex": 0}, "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, "west": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, @@ -21,9 +77,9 @@ }, { "name": "Main Body", - "from": [6, 3, 3], - "to": [10, 7, 8], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 5]}, + "from": [6, 26, 6], + "to": [10, 30, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 28, 8]}, "faces": { "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#1", "tintindex": 0}, "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, @@ -53,6 +109,10 @@ "children": [] }, 0, - 1 + 1, + 2, + 3, + 4, + 5 ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json index 760a3f6..edce60f 100644 --- a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json @@ -5,31 +5,45 @@ }, "elements": [ { - "name": "Left", - "from": [5, -10, 5], - "to": [6, -1, 6], - "rotation": {"angle": 0, "axis": "y", "origin": [2, -10, -1]}, + "name": "Main Body", + "from": [10, 17, 7.5], + "to": [10.5, 28, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 22, 8.5]}, "faces": { - "north": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "east": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "south": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "west": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#2"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#2"} + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} } }, { - "name": "Right", - "from": [10, -10, 5], - "to": [11, -1, 6], - "rotation": {"angle": 0, "axis": "y", "origin": [-2, -10, -1]}, + "name": "Main Body", + "from": [5.5, 16, 7.5], + "to": [10.5, 17, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 22, 8.5]}, "faces": { - "north": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "east": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "south": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "west": {"uv": [0, 0, 1, 11], "texture": "#2"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#2"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#2"} + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [5.5, 17, 7.5], + "to": [6, 28, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 22, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} } } ], @@ -38,18 +52,23 @@ "rotation": [76, 0, 0], "translation": [-0.5, -5.5, -7.5] }, + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, "gui": { - "rotation": [0, 151, 0], - "translation": [0, -1, 0], - "scale": [0.8, 0.8, 0.8] + "translation": [0, -4.25, 0], + "scale": [0.4, 0.4, 0.4] } }, "groups": [ { - "name": "Handle", + "name": "Frame Holder", "origin": [8, 8, 8], "color": 0, - "children": [0, 1] - } + "children": [] + }, + 0, + 1, + 2 ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json index 76e4566..c4917d8 100644 --- a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json @@ -1,38 +1,43 @@ { "credit": "Made with Blockbench", "textures": { - "particle": "theatrical:block/bar" + "2": "theatrical:block/light_side" }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ], "display": { "thirdperson_righthand": { "rotation": [76, 0, 0], "translation": [-0.5, -5.5, -7.5] }, + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, "gui": { - "rotation": [0, 151, 0], - "translation": [0, -1, 0], - "scale": [0.8, 0.8, 0.8] + "translation": [0, -4.25, 0], + "scale": [0.4, 0.4, 0.4] } }, "groups": [ { - "name": "fresnel", - "origin": [8, 8, 8], - "color": 0, - "children": [ - { - "name": "Hook", - "origin": [8, 8, 8], - "color": 0, - "children": [] - } - ] - }, - { - "name": "bar", + "name": "Frame Holder", "origin": [8, 8, 8], "color": 0, "children": [] - } + }, + 0 ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_whole.json b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_whole.json new file mode 100644 index 0000000..304c0d0 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_whole.json @@ -0,0 +1,149 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/light_fresnel_active_full", + "2": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Main Body", + "from": [5, 30, 5], + "to": [11, 32, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 28, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [6, 25, 6], + "to": [10, 30, 10], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 28, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [10, 17, 7.5], + "to": [10.5, 28, 8.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 22, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [10, 17, 7.5], + "to": [10.5, 28, 8.5], + "rotation": {"angle": 0, "axis": "x", "origin": [12, 26, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [5.5, 16, 7.5], + "to": [10.5, 17, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 22, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "name": "Main Body", + "from": [5.5, 17, 7.5], + "to": [6, 28, 8.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 22, 8.5]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1", "tintindex": 0}, + "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [0, 0, 7], + "to": [1, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 0, 7]}, + "color": 7, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#missing"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [76, 0, 0], + "translation": [-0.5, -5.5, -7.5] + }, + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "translation": [0, -4.25, 0], + "scale": [0.4, 0.4, 0.4] + } + }, + "groups": [ + { + "name": "Frame Holder", + "origin": [8, 8, 8], + "color": 0, + "children": [] + }, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_body.json b/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_body.json new file mode 100644 index 0000000..da8b3dc --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_body.json @@ -0,0 +1,68 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "theatrical:block/led_panel_template", + "particle": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "panel", + "from": [0, 0, 0], + "to": [16, 16, 2], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#2"}, + "east": {"uv": [4, 7, 4.5, 11], "texture": "#2"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#2"}, + "west": {"uv": [4.5, 7, 5, 11], "texture": "#2"}, + "up": {"uv": [11, 5, 7, 4.5], "texture": "#2"}, + "down": {"uv": [9, 7, 5, 7.5], "texture": "#2"} + } + }, + { + "from": [2, 3.5, 2], + "to": [14, 12.5, 6.5], + "faces": { + "north": {"uv": [4, 0, 7, 2.25], "texture": "#2"}, + "east": {"uv": [7, 0, 8.25, 2.25], "texture": "#2"}, + "south": {"uv": [4, 2.25, 7, 4.5], "texture": "#2"}, + "west": {"uv": [7, 2.25, 8.25, 4.5], "texture": "#2"}, + "up": {"uv": [7, 5.75, 4, 4.5], "texture": "#2"}, + "down": {"uv": [7, 5.75, 4, 7], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "scale": [0.54, 0.54, 0.54] + }, + "thirdperson_lefthand": { + "scale": [0.54, 0.54, 0.54] + }, + "firstperson_righthand": { + "translation": [1.25, 0, 2.25], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_lefthand": { + "translation": [1.25, 0, 2.25] + }, + "ground": { + "translation": [0, 2.75, 0], + "scale": [0.8, 0.8, 0.8] + }, + "gui": { + "rotation": [-142, 45, 0], + "translation": [2.75, 1.5, 0], + "scale": [0.66, 0.66, 0.66] + } + }, + "groups": [ + 0, + 1, + { + "name": "pipe_holder", + "origin": [8, 8, 8], + "color": 0, + "children": [] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_pan.json b/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_pan.json new file mode 100644 index 0000000..81f0f92 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_pan.json @@ -0,0 +1,37 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/light_side" + }, + "display": { + "thirdperson_righthand": { + "scale": [0.54, 0.54, 0.54] + }, + "thirdperson_lefthand": { + "scale": [0.54, 0.54, 0.54] + }, + "firstperson_righthand": { + "translation": [1.25, 0, 2.25] + }, + "firstperson_lefthand": { + "translation": [1.25, 0, 2.25] + }, + "ground": { + "translation": [0, 2.75, 0], + "scale": [0.8, 0.8, 0.8] + }, + "gui": { + "rotation": [-142, 45, 0], + "translation": [2.75, 1.5, 0], + "scale": [0.66, 0.66, 0.66] + } + }, + "groups": [ + { + "name": "pipe_holder", + "origin": [8, 8, 8], + "color": 0, + "children": [] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_static.json b/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_static.json new file mode 100644 index 0000000..365fdff --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/ledpanel/led_panel_static.json @@ -0,0 +1,92 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/pipe_holder", + "particle": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "north", + "from": [7, 6, 6.5], + "to": [9, 10, 7], + "faces": { + "north": {"uv": [0, 0, 2, 4], "texture": "#1"}, + "east": {"uv": [0, 8, 0.5, 12], "texture": "#1"}, + "south": {"uv": [2, 0, 4, 4], "texture": "#1"}, + "west": {"uv": [8, 0, 8.5, 4], "texture": "#1"}, + "up": {"uv": [8, 8.5, 6, 8], "texture": "#1"}, + "down": {"uv": [10, 8, 8, 8.5], "texture": "#1"} + } + }, + { + "name": "south", + "from": [7, 6, 9], + "to": [9, 10, 9.5], + "faces": { + "north": {"uv": [0, 4, 2, 8], "texture": "#1"}, + "east": {"uv": [1, 8, 1.5, 12], "texture": "#1"}, + "south": {"uv": [4, 0, 6, 4], "texture": "#1"}, + "west": {"uv": [2, 8, 2.5, 12], "texture": "#1"}, + "up": {"uv": [11, 0.5, 9, 0], "texture": "#1"}, + "down": {"uv": [11, 1, 9, 1.5], "texture": "#1"} + } + }, + { + "name": "west", + "from": [6.5, 6, 7], + "to": [7, 10, 9], + "faces": { + "north": {"uv": [3, 8, 3.5, 12], "texture": "#1"}, + "east": {"uv": [2, 4, 4, 8], "texture": "#1"}, + "south": {"uv": [4, 8, 4.5, 12], "texture": "#1"}, + "west": {"uv": [4, 4, 6, 8], "texture": "#1"}, + "up": {"uv": [9.5, 4, 9, 2], "texture": "#1"}, + "down": {"uv": [9.5, 4, 9, 6], "texture": "#1"} + } + }, + { + "name": "east", + "from": [9, 6, 7], + "to": [9.5, 10, 9], + "faces": { + "north": {"uv": [8, 4, 8.5, 8], "texture": "#1"}, + "east": {"uv": [6, 0, 8, 4], "texture": "#1"}, + "south": {"uv": [5, 8, 5.5, 12], "texture": "#1"}, + "west": {"uv": [6, 4, 8, 8], "texture": "#1"}, + "up": {"uv": [6.5, 11, 6, 9], "texture": "#1"}, + "down": {"uv": [9.5, 6, 9, 8], "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "scale": [0.54, 0.54, 0.54] + }, + "thirdperson_lefthand": { + "scale": [0.54, 0.54, 0.54] + }, + "firstperson_righthand": { + "translation": [1.25, 0, 2.25] + }, + "firstperson_lefthand": { + "translation": [1.25, 0, 2.25] + }, + "ground": { + "translation": [0, 2.75, 0], + "scale": [0.8, 0.8, 0.8] + }, + "gui": { + "rotation": [-142, 45, 0], + "translation": [2.75, 1.5, 0], + "scale": [0.66, 0.66, 0.66] + } + }, + "groups": [ + { + "name": "pipe_holder", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json index 13264c1..28059d4 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_pan.json @@ -7,9 +7,9 @@ "elements": [ { "name": "RightSide", - "from": [2, 8, 5.5], - "to": [4, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "from": [3.4, 6, 6.5], + "to": [4.9, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-1.1, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -21,9 +21,9 @@ }, { "name": "LeftSide", - "from": [12, 8, 5.5], - "to": [14, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "from": [10.975, 6, 6.5], + "to": [12.475, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6.85, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -35,9 +35,9 @@ }, { "name": "RotateBase", - "from": [6, 5, 6.5], - "to": [10, 6, 9.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "from": [6.4, 3, 6.5], + "to": [9.5, 4, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -49,9 +49,9 @@ }, { "name": "RotateBase", - "from": [2, 6, 5.5], - "to": [14, 8, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "from": [3.4, 4, 6.5], + "to": [12.5, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json index 3ee16f3..74d2562 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_static.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [0, 0, 0], - "to": [16, 5, 16], + "from": [2, 0, 2], + "to": [14, 3, 14], "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json index eb7607d..c3a48f2 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json @@ -6,100 +6,9 @@ }, "elements": [ { - "from": [4, 19, 0.5], - "to": [5, 20, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 8], "texture": "#0"} - } - }, - { - "from": [5, 20, 0.5], - "to": [6, 21, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 8], "texture": "#0"} - } - }, - { - "from": [10, 19, 0.5], - "to": [11, 21, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 3, 9], "texture": "#0"} - } - }, - { - "from": [11, 19, 0.5], - "to": [12, 20, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 3], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 6, 9], "texture": "#0"} - } - }, - { - "from": [10, 11, 0.5], - "to": [11, 12, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 1, 6, 0], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 0, 9], "texture": "#0"}, - "down": {"uv": [4, 0, 6, 9], "texture": "#0"} - } - }, - { - "from": [4, 13, 0.5], - "to": [5, 19, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 7], "texture": "#0"}, - "east": {"uv": [0, 0, 1, 7], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 7], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [11, 13, 0.5], - "to": [12, 19, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, - "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [5, 19, 0.5], - "to": [6, 20, 0.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [5, 9.5, 2.5], + "to": [6, 15.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "texture": "#0"}, @@ -110,9 +19,9 @@ } }, { - "from": [10, 12, 0.5], - "to": [11, 13, 13.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [10, 9.5, 2.5], + "to": [11, 15.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "texture": "#0"}, @@ -123,9 +32,9 @@ } }, { - "from": [9, 11, 0.5], - "to": [10, 13, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [9, 8.5, 2.5], + "to": [10, 10.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, "east": {"uv": [0, 0, 4, 6], "texture": "#0"}, @@ -136,9 +45,9 @@ } }, { - "from": [6, 11, 0.5], - "to": [7, 13, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 8.5, 2.5], + "to": [7, 10.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, "east": {"uv": [0, 0, 5, 6], "texture": "#0"}, @@ -149,9 +58,9 @@ } }, { - "from": [7, 11, 0.5], - "to": [9, 13, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [7, 8.5, 2.5], + "to": [9, 10.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, @@ -162,9 +71,9 @@ } }, { - "from": [5, 13, 1.5], - "to": [11, 19, 4.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 10.5, 3.5], + "to": [10, 14.5, 3.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, @@ -175,9 +84,9 @@ } }, { - "from": [6, 19, 0.5], - "to": [10, 21, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 14.5, 2.5], + "to": [10, 16.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 2], "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, @@ -188,81 +97,16 @@ } }, { - "from": [10, 12, 15.5], - "to": [12, 20, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 10.5, 12.5], + "to": [10, 14.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { - "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 0], "texture": "#0"} - } - }, - { - "from": [6, 11, 15.5], - "to": [10, 21, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "east": {"uv": [0, 0, 0, 10], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 10], "texture": "#0"}, - "up": {"uv": [0, 0, 4, 0], "texture": "#0"}, - "down": {"uv": [0, 0, 4, 0], "texture": "#0"} - } - }, - { - "from": [4, 12, 15.5], - "to": [6, 20, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 0], "texture": "#0"} - } - }, - { - "from": [11, 12, 0.5], - "to": [12, 13, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 2, 6, 0], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 6, 9], "texture": "#0"} - } - }, - { - "from": [5, 11, 0.5], - "to": [6, 13, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 13, 1, 14], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 8], "texture": "#0"}, - "down": {"uv": [3, 0, 6, 8], "texture": "#0"} - } - }, - { - "from": [4, 12, 0.5], - "to": [5, 13, 15.5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 15, 1, 16], "texture": "#0"}, - "down": {"uv": [3, 1, 6, 9], "texture": "#0"} + "north": {"uv": [0, 0, 1, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 4, 3], "texture": "#0"} } } ], @@ -276,7 +120,7 @@ "name": "SpotBit", "origin": [0, 19, -1], "color": 0, - "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + "children": [0, 1, 2, 3, 4, 5, 6, 7] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json index b2f92bb..9f2ca45 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json @@ -6,100 +6,9 @@ }, "elements": [ { - "from": [4, 8.5, 11], - "to": [5, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [5, 8.5, 12], - "to": [6, 23.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [10, 8.5, 11], - "to": [11, 23.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 2], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [11, 8.5, 11], - "to": [12, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 3], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [10, 8.5, 3], - "to": [11, 23.5, 4], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [4, 0, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 1, 6, 0], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 0, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [4, 8.5, 5], - "to": [5, 23.5, 11], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 1, 7], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 9], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 7], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 7], "texture": "#0"} - } - }, - { - "from": [11, 8.5, 5], - "to": [12, 23.5, 11], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 9], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 1, 6], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 6], "texture": "#0"} - } - }, - { - "from": [5, 23.5, 11], - "to": [6, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [5, 7, 5], + "to": [6, 18, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, @@ -110,9 +19,9 @@ } }, { - "from": [10, 10.5, 4], - "to": [11, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [10, 7, 5], + "to": [11, 18, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, @@ -123,9 +32,9 @@ } }, { - "from": [9, 8.5, 3], - "to": [10, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [9, 7, 4], + "to": [10, 18, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#0"}, @@ -136,9 +45,9 @@ } }, { - "from": [6, 8.5, 3], - "to": [7, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 7, 4], + "to": [7, 18, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [5, 0, 6, 9], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 5, 6], "rotation": 270, "texture": "#0"}, @@ -149,9 +58,9 @@ } }, { - "from": [7, 8.5, 3], - "to": [9, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [7, 7, 4], + "to": [9, 18, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, @@ -162,9 +71,9 @@ } }, { - "from": [5, 19.5, 5], - "to": [11, 22.5, 11], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 17, 6], + "to": [10, 17, 10], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 2, 3], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, @@ -175,9 +84,9 @@ } }, { - "from": [6, 8.5, 11], - "to": [10, 23.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 7, 10], + "to": [10, 18, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 4, 3], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, @@ -188,88 +97,23 @@ } }, { - "from": [10, 8.5, 4], - "to": [12, 8.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 9], "texture": "#0"} - } - }, - { - "from": [6, 8.5, 3], - "to": [10, 8.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 4, 0], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 0, 10], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 4, 0], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 10], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 9], "texture": "#0"} - } - }, - { - "from": [4, 8.5, 4], - "to": [6, 8.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 9], "texture": "#0"} - } - }, - { - "from": [11, 8.5, 4], - "to": [12, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 7, 6], + "to": [10, 8, 10], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { - "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 2, 6, 0], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [5, 8.5, 3], - "to": [6, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [3, 0, 6, 8], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 8], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 13, 1, 14], "texture": "#0"} - } - }, - { - "from": [4, 8.5, 4], - "to": [5, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [3, 1, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 15, 1, 16], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + "north": {"uv": [0, 0, 4, 3], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#0"} } }, { "name": "RightSide", - "from": [2, 8, 5.5], - "to": [4, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "from": [3.4, 6, 6.5], + "to": [4.9, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-1.1, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -281,9 +125,9 @@ }, { "name": "LeftSide", - "from": [12, 8, 5.5], - "to": [14, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "from": [10.975, 6, 6.5], + "to": [12.475, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6.85, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -295,9 +139,9 @@ }, { "name": "RotateBase", - "from": [6, 5, 6.5], - "to": [10, 6, 9.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "from": [6.4, 3, 6.5], + "to": [9.5, 4, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -309,9 +153,9 @@ }, { "name": "RotateBase", - "from": [2, 6, 5.5], - "to": [14, 8, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "from": [3.4, 4, 6.5], + "to": [12.5, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -322,8 +166,8 @@ } }, { - "from": [0, 0, 0], - "to": [16, 5, 16], + "from": [2, 0, 2], + "to": [14, 3, 14], "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -345,12 +189,18 @@ "name": "SpotBit", "origin": [0, 19, -1], "color": 0, - "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + "children": [0, 1, 2, 3, 4, 5, 6, 7] }, - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12, + { + "name": "group", + "origin": [8, 0, 8], + "color": 0, + "children": [] + } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json index 13264c1..28059d4 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_pan.json @@ -7,9 +7,9 @@ "elements": [ { "name": "RightSide", - "from": [2, 8, 5.5], - "to": [4, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "from": [3.4, 6, 6.5], + "to": [4.9, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-1.1, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -21,9 +21,9 @@ }, { "name": "LeftSide", - "from": [12, 8, 5.5], - "to": [14, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "from": [10.975, 6, 6.5], + "to": [12.475, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6.85, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -35,9 +35,9 @@ }, { "name": "RotateBase", - "from": [6, 5, 6.5], - "to": [10, 6, 9.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "from": [6.4, 3, 6.5], + "to": [9.5, 4, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -49,9 +49,9 @@ }, { "name": "RotateBase", - "from": [2, 6, 5.5], - "to": [14, 8, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "from": [3.4, 4, 6.5], + "to": [12.5, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json index 3ee16f3..74d2562 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_static.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [0, 0, 0], - "to": [16, 5, 16], + "from": [2, 0, 2], + "to": [14, 3, 14], "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json index 848f863..8fced7f 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json @@ -6,100 +6,9 @@ }, "elements": [ { - "from": [4, 19, 0.5], - "to": [5, 20, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 8], "texture": "#0"} - } - }, - { - "from": [5, 20, 0.5], - "to": [6, 21, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 8], "texture": "#0"} - } - }, - { - "from": [10, 20, 0.5], - "to": [11, 21, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 3, 9], "texture": "#0"} - } - }, - { - "from": [11, 19, 0.5], - "to": [12, 20, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 3], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 6, 9], "texture": "#0"} - } - }, - { - "from": [10, 11, 0.5], - "to": [11, 12, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 1, 6, 0], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 0, 9], "texture": "#0"}, - "down": {"uv": [4, 0, 6, 9], "texture": "#0"} - } - }, - { - "from": [4, 13, 0.5], - "to": [5, 19, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 7], "texture": "#0"}, - "east": {"uv": [0, 0, 1, 7], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 7], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [11, 13, 0.5], - "to": [12, 19, 14.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 6], "texture": "#0"}, - "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [5, 12, 0.5], - "to": [6, 20, 0.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [5, 9.5, 2.5], + "to": [6, 15.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "texture": "#0"}, @@ -110,9 +19,9 @@ } }, { - "from": [10, 12, 0.5], - "to": [11, 20, 0.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [10, 9.5, 2.5], + "to": [11, 15.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 8], "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "texture": "#0"}, @@ -123,9 +32,9 @@ } }, { - "from": [9, 11, 0.5], - "to": [10, 17, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [9, 8.5, 2.5], + "to": [10, 13.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, "east": {"uv": [0, 0, 4, 6], "texture": "#0"}, @@ -136,9 +45,9 @@ } }, { - "from": [6, 11, 0.5], - "to": [7, 17, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [6, 8.5, 2.5], + "to": [7, 13.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 6], "texture": "#0"}, "east": {"uv": [0, 0, 5, 6], "texture": "#0"}, @@ -149,9 +58,9 @@ } }, { - "from": [7, 11, 0.5], - "to": [9, 15, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [7, 8.5, 2.5], + "to": [9, 11.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, @@ -162,9 +71,22 @@ } }, { - "from": [7, 15, 1.5], - "to": [9, 17, 4.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [7, 11.5, 12.5], + "to": [9, 13.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "down": {"uv": [0, 0, 3, 9], "texture": "#0"} + } + }, + { + "from": [7, 11.5, 3.5], + "to": [9, 13.5, 3.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, @@ -175,9 +97,9 @@ } }, { - "from": [6, 17, 0.5], - "to": [10, 21, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "from": [6, 13.5, 2.5], + "to": [10, 16.5, 13.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 2], "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "texture": "#0"}, @@ -186,84 +108,6 @@ "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, "down": {"uv": [0, 0, 4, 3], "texture": "#0"} } - }, - { - "from": [10, 12, 15.5], - "to": [12, 20, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 0], "texture": "#0"} - } - }, - { - "from": [6, 11, 15.5], - "to": [10, 21, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "east": {"uv": [0, 0, 0, 10], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 10], "texture": "#0"}, - "up": {"uv": [0, 0, 4, 0], "texture": "#0"}, - "down": {"uv": [0, 0, 4, 0], "texture": "#0"} - } - }, - { - "from": [4, 12, 15.5], - "to": [6, 20, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 8], "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "down": {"uv": [0, 0, 2, 0], "texture": "#0"} - } - }, - { - "from": [11, 12, 0.5], - "to": [12, 13, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 2, 6, 0], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "down": {"uv": [0, 0, 6, 9], "texture": "#0"} - } - }, - { - "from": [5, 11, 0.5], - "to": [6, 12, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 13, 1, 14], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 8], "texture": "#0"}, - "down": {"uv": [3, 0, 6, 8], "texture": "#0"} - } - }, - { - "from": [4, 12, 0.5], - "to": [5, 13, 15.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, - "up": {"uv": [0, 15, 1, 16], "texture": "#0"}, - "down": {"uv": [3, 1, 6, 9], "texture": "#0"} - } } ], "display": { @@ -276,7 +120,13 @@ "name": "SpotBit", "origin": [0, 19, -1], "color": 0, - "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + "children": [0, 1, 2, 3, 4, 5, 6, 7] + }, + { + "name": "group", + "origin": [8, 0, 8], + "color": 0, + "children": [] } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json index d5ffecd..fc4605f 100644 --- a/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json @@ -6,100 +6,9 @@ }, "elements": [ { - "from": [4, 8.5, 11], - "to": [5, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [5, 8.5, 12], - "to": [6, 23.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 8], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [10, 8.5, 12], - "to": [11, 23.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 2], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [11, 8.5, 11], - "to": [12, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 3], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [10, 8.5, 3], - "to": [11, 23.5, 4], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [4, 0, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 1, 6, 0], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 0, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [4, 8.5, 5], - "to": [5, 23.5, 11], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 1, 7], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 9], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 7], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 7], "texture": "#0"} - } - }, - { - "from": [11, 9.5, 5], - "to": [12, 23.5, 11], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 6, 9], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#0"}, - "west": {"uv": [0, 0, 1, 6], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 6], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 6], "texture": "#0"} - } - }, - { - "from": [5, 23.5, 4], - "to": [6, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [5, 7, 5], + "to": [6, 18, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, @@ -110,9 +19,9 @@ } }, { - "from": [10, 23.5, 4], - "to": [11, 23.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [10, 7, 5], + "to": [11, 18, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 1, 8], "rotation": 270, "texture": "#0"}, @@ -123,9 +32,9 @@ } }, { - "from": [9, 8.5, 3], - "to": [10, 23.5, 9], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [9, 7, 4], + "to": [10, 18, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#0"}, @@ -136,9 +45,9 @@ } }, { - "from": [6, 8.5, 3], - "to": [7, 23.5, 9], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 7, 4], + "to": [7, 18, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [5, 0, 6, 9], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 5, 6], "rotation": 270, "texture": "#0"}, @@ -149,9 +58,9 @@ } }, { - "from": [7, 8.5, 3], - "to": [9, 23.5, 7], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [7, 7, 4], + "to": [9, 18, 7], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, @@ -162,9 +71,22 @@ } }, { - "from": [7, 19.5, 7], - "to": [9, 22.5, 9], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [7, 7, 7], + "to": [9, 8, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 3], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 4], "texture": "#0"} + } + }, + { + "from": [7, 17, 7], + "to": [9, 17, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 2, 3], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, @@ -175,9 +97,9 @@ } }, { - "from": [6, 8.5, 9], - "to": [10, 23.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, + "from": [6, 7, 9], + "to": [10, 18, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 8]}, "faces": { "north": {"uv": [0, 0, 4, 3], "rotation": 180, "texture": "#0"}, "east": {"uv": [0, 0, 3, 4], "rotation": 270, "texture": "#0"}, @@ -187,89 +109,11 @@ "down": {"uv": [0, 0, 4, 4], "texture": "#0"} } }, - { - "from": [10, 8.5, 4], - "to": [12, 8.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 9], "texture": "#0"} - } - }, - { - "from": [6, 8.5, 3], - "to": [10, 8.5, 13], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 4, 0], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 0, 10], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 4, 0], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 10], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 9], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 9], "texture": "#0"} - } - }, - { - "from": [4, 8.5, 4], - "to": [6, 8.5, 12], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 2, 0], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 0, 0, 8], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 2, 0], "texture": "#0"}, - "west": {"uv": [0, 0, 0, 8], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 9], "texture": "#0"} - } - }, - { - "from": [11, 8.5, 4], - "to": [12, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 2, 6, 0], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 1, 9], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, - { - "from": [5, 8.5, 3], - "to": [6, 23.5, 4], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [3, 0, 6, 8], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 6, 8], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 13, 1, 14], "texture": "#0"} - } - }, - { - "from": [4, 8.5, 4], - "to": [5, 23.5, 5], - "rotation": {"angle": 0, "axis": "x", "origin": [8, 16, 8]}, - "faces": { - "north": {"uv": [3, 1, 6, 9], "rotation": 180, "texture": "#0"}, - "east": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 15, 1, 16], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 2], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#0"} - } - }, { "name": "RightSide", - "from": [2, 8, 5.5], - "to": [4, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [-2, 8, 8.5]}, + "from": [3.4, 6, 6.5], + "to": [4.9, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-1.1, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -281,9 +125,9 @@ }, { "name": "LeftSide", - "from": [12, 8, 5.5], - "to": [14, 16, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]}, + "from": [10.975, 6, 6.5], + "to": [12.475, 13, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6.85, 6, 8.5]}, "faces": { "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, @@ -295,9 +139,9 @@ }, { "name": "RotateBase", - "from": [6, 5, 6.5], - "to": [10, 6, 9.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8.5]}, + "from": [6.4, 3, 6.5], + "to": [9.5, 4, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 3, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -309,9 +153,9 @@ }, { "name": "RotateBase", - "from": [2, 6, 5.5], - "to": [14, 8, 10.5], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8.5]}, + "from": [3.4, 4, 6.5], + "to": [12.5, 6, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8.5]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -322,8 +166,8 @@ } }, { - "from": [0, 0, 0], - "to": [16, 5, 16], + "from": [2, 0, 2], + "to": [14, 3, 14], "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, @@ -345,12 +189,18 @@ "name": "SpotBit", "origin": [0, 19, -1], "color": 0, - "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] + "children": [0, 1, 2, 3, 4, 5, 6, 7] }, - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12, + { + "name": "group", + "origin": [8, 0, 8], + "color": 0, + "children": [] + } ] } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_pan.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_pan.json new file mode 100644 index 0000000..43459d8 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_pan.json @@ -0,0 +1,80 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [2, 4, 6], + "to": [4, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [-12, 5, 0]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [12, 4, 6], + "to": [14, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [-2, 5, 0]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [2, 2, 6], + "to": [14, 4, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 2, 0]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + }, + { + "from": [6, 0, 6.5], + "to": [10, 2, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 0.5]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 5, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "firstperson_lefthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [0, 180, 0] + } + }, + "groups": [ + { + "name": "pan", + "origin": [0, 0, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_static.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_static.json new file mode 100644 index 0000000..545ff8a --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_static.json @@ -0,0 +1,33 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "name": "static", + "from": [4, 0, 4], + "to": [12, 1, 12], + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "firstperson_lefthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [0, 180, 0] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_tilt.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_tilt.json new file mode 100644 index 0000000..7eb1dad --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_tilt.json @@ -0,0 +1,145 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "from": [6.4, 14.5, 0], + "to": [9.65, 15, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 3.25, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 3.25, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 3.25, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 3.25, 1], "texture": "#0"} + } + }, + { + "from": [9.5, 11, 0], + "to": [10, 15, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1], "texture": "#0"} + } + }, + { + "from": [6.4, 11, 0], + "to": [9.65, 11.5, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 3.25, 0.5], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "south": {"uv": [0, 0, 3.25, 0.5], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 0.5], "texture": "#0"}, + "up": {"uv": [0, 0, 3.25, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 3.25, 1], "texture": "#0"} + } + }, + { + "from": [5, 9, 2], + "to": [11, 10, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 12], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [5, 16, 2], + "to": [11, 17, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "west": {"uv": [0, 15, 12, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 12], "texture": "#0"} + } + }, + { + "from": [6, 11, 0], + "to": [6.5, 15, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8.5, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 4], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 1], "texture": "#0"} + } + }, + { + "from": [5, 10, 1], + "to": [11, 16, 2], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#0"} + } + }, + { + "from": [6, 11.5, 0.75], + "to": [9.5, 14.5, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [7, 1, 11, 5], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#0"} + } + }, + { + "from": [4, 10, 2], + "to": [12, 16, 15], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "firstperson_lefthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [0, 180, 0] + } + }, + "groups": [ + { + "name": "tilt", + "origin": [4, 10, 5], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_whole.json b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_whole.json new file mode 100644 index 0000000..d8989c4 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl6/moving_vl6_whole.json @@ -0,0 +1,217 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "name": "static", + "from": [4, 0, 4], + "to": [12, 1, 12], + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [2, 4, 6], + "to": [4, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [12, 4, 6], + "to": [14, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [2, 2, 6], + "to": [14, 4, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 13, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 13, 16, 16], "texture": "#0"} + } + }, + { + "from": [6, 0, 6.5], + "to": [10, 2, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "up": {"uv": [0, 0, 5, 9], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + }, + { + "from": [6.4, 20, 9.5], + "to": [9.65, 21, 10], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 3.25, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 0.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 3.25, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 0.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 3.25, 0.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 3.25, 0.5], "texture": "#0"} + } + }, + { + "from": [9.5, 20, 6], + "to": [10, 21, 10], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#0"} + } + }, + { + "from": [6.4, 20, 6], + "to": [9.65, 21, 6.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 3.25, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 0.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 3.25, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 0.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 3.25, 0.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 3.25, 0.5], "texture": "#0"} + } + }, + { + "from": [5, 7, 4], + "to": [11, 19, 5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 12], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#0"} + } + }, + { + "from": [5, 7, 11], + "to": [11, 19, 12], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 12], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 15, 12, 16], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#0"} + } + }, + { + "from": [6, 20, 6], + "to": [6.5, 21, 10], + "rotation": {"angle": 0, "axis": "x", "origin": [8.5, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 4], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 4], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#0"} + } + }, + { + "from": [5, 19, 5], + "to": [11, 20, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 6], "texture": "#0"} + } + }, + { + "from": [6, 20, 6.5], + "to": [9.5, 20.25, 9.5], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 6], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 6], "rotation": 90, "texture": "#0"}, + "up": {"uv": [7, 1, 11, 5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 6], "texture": "#0"} + } + }, + { + "from": [4, 6, 5], + "to": [12, 19, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 13, 8]}, + "faces": { + "north": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 6, 9], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 6, 9], "texture": "#0"}, + "west": {"uv": [0, 13, 16, 16], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 6, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 6, 9], "texture": "#0"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.2, 0.2, 0.2] + }, + "firstperson_lefthand": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [0, 180, 0] + } + }, + "groups": [ + 0, + { + "name": "pan", + "origin": [0, 0, 0], + "color": 0, + "children": [1, 2, 3, 4] + }, + { + "name": "tilt", + "origin": [4, 10, 5], + "color": 0, + "children": [5, 6, 7, 8, 9, 10, 11, 12, 13] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/parled/parled_body_whole.json b/common/src/main/resources/assets/theatrical/models/block/parled/parled_body_whole.json new file mode 100644 index 0000000..e856f90 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/parled/parled_body_whole.json @@ -0,0 +1,538 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/light_side", + "particle": "theatrical:block/light_fresnel_active_full" + }, + "elements": [ + { + "from": [13, 0, 7], + "to": [14, 8, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 0, 7]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 16], "texture": "#1"} + } + }, + { + "from": [3, 0, 7], + "to": [13, 1, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, 0, 7]}, + "faces": { + "north": {"uv": [0, 15, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 1], "texture": "#1"} + } + }, + { + "from": [2, 0, 7], + "to": [3, 8, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 7]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#1"} + } + }, + { + "from": [12, 2.5, 6], + "to": [13, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 9], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [7.75, 3.5, 6], + "to": [8.25, 11, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [9.75, 3.5, 6], + "to": [10.25, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [5.75, 3.5, 6], + "to": [6.25, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [3, 2.5, 6], + "to": [4, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 9], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [4, 11, 6], + "to": [12, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 8, 4], "texture": "#1"} + } + }, + { + "from": [4, 2.5, 6], + "to": [12, 3.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 4], "texture": "#1"}, + "down": {"uv": [0, 15, 7, 16], "texture": "#1"} + } + }, + { + "from": [10.25, 7, 6], + "to": [12, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [8.15, 7, 6], + "to": [9.75, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [6.25, 7, 6], + "to": [7.75, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [6.25, 9, 6], + "to": [7.75, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [6.25, 5, 6], + "to": [7.75, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [4, 7, 6], + "to": [5.75, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [8.15, 9, 6], + "to": [9.75, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [4, 9, 6], + "to": [5.75, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [10.25, 9, 6], + "to": [12, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [8.15, 5, 6], + "to": [9.75, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [4, 5, 6], + "to": [5.75, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [10.25, 5, 6], + "to": [12, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [10.25, 9.5, 6], + "to": [12, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [4, 9.5, 6], + "to": [5.75, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.75, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [4, 3.5, 6], + "to": [5.75, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "south": {"uv": [0, 0, 1.25, 1.25], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [10.25, 3.5, 6], + "to": [12, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [8, 9.25, 6.5], + "to": [10, 11.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 9.25, 6.5], + "to": [8, 11.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 7.25, 6.5], + "to": [8, 9.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [4, 7.25, 6.5], + "to": [6, 9.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [8, 7.25, 6.5], + "to": [10, 9.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [10, 7.25, 6.5], + "to": [12, 9.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [10, 5.25, 6.5], + "to": [12, 7.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [8, 5.25, 6.5], + "to": [10, 7.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 5.25, 6.5], + "to": [8, 7.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [4, 5.25, 6.5], + "to": [6, 7.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 3.25, 6.5], + "to": [8, 5.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [8, 3.25, 6.5], + "to": [10, 5.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [4, 3.5, 10], + "to": [12, 11, 12.75], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.4, 0.4, 0.4] + }, + "gui": { + "rotation": [0, 180, 0] + } + }, + "groups": [ + { + "name": "Pan", + "origin": [2, 0, 7], + "color": 0, + "children": [0, 1, 2] + }, + { + "name": "Tilt", + "origin": [10.5, 5.25, 10], + "color": 0, + "children": [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] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/parled/parled_pan.json b/common/src/main/resources/assets/theatrical/models/block/parled/parled_pan.json new file mode 100644 index 0000000..83d8dc2 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/parled/parled_pan.json @@ -0,0 +1,64 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/light_side", + "particle": "theatrical:block/light_fresnel_active_full" + }, + "elements": [ + { + "from": [13, 0, 7], + "to": [14, 8, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 0, 7]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 16], "texture": "#1"} + } + }, + { + "from": [3, 0, 7], + "to": [13, 1, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, 0, 7]}, + "faces": { + "north": {"uv": [0, 15, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 1], "texture": "#1"} + } + }, + { + "from": [2, 0, 7], + "to": [3, 8, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 7]}, + "faces": { + "north": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#1"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.4, 0.4, 0.4] + }, + "gui": { + "rotation": [0, 180, 0] + } + }, + "groups": [ + { + "name": "Pan", + "origin": [2, 0, 7], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/parled/parled_static.json b/common/src/main/resources/assets/theatrical/models/block/parled/parled_static.json new file mode 100644 index 0000000..9cead14 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/parled/parled_static.json @@ -0,0 +1,14 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "particle": "theatrical:block/light_fresnel_active_full" + }, + "display": { + "firstperson_righthand": { + "scale": [0.4, 0.4, 0.4] + }, + "gui": { + "rotation": [0, 180, 0] + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/parled/parled_tilt.json b/common/src/main/resources/assets/theatrical/models/block/parled/parled_tilt.json new file mode 100644 index 0000000..abdc55f --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/parled/parled_tilt.json @@ -0,0 +1,493 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/light_side", + "particle": "theatrical:block/light_fresnel_active_full" + }, + "elements": [ + { + "from": [12, 2.5, 6], + "to": [13, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 9], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [7.75, 3.5, 6], + "to": [8.25, 11, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [9.75, 3.5, 6], + "to": [10.25, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [5.75, 3.5, 6], + "to": [6.25, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [3, 2.5, 6], + "to": [4, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 9], "texture": "#1"}, + "south": {"uv": [0, 0, 0.5, 9], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0.5, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 0.5, 4], "texture": "#1"} + } + }, + { + "from": [4, 11, 6], + "to": [12, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 8, 4], "texture": "#1"} + } + }, + { + "from": [4, 2.5, 6], + "to": [12, 3.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 0.5], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 0.5], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 7, 1], "texture": "#1"} + } + }, + { + "from": [10.25, 7, 6], + "to": [12, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [8.15, 7, 6], + "to": [9.75, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [6.25, 7, 6], + "to": [7.75, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [6.25, 9, 6], + "to": [7.75, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [6.25, 5, 6], + "to": [7.75, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [4, 7, 6], + "to": [5.75, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [8.15, 9, 6], + "to": [9.75, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [4, 9, 6], + "to": [5.75, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [10.25, 9, 6], + "to": [12, 9.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [8.15, 5, 6], + "to": [9.75, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [4, 5, 6], + "to": [5.75, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [10.25, 5, 6], + "to": [12, 5.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 12, 8], "texture": "#1"}, + "east": {"uv": [0, 8, 4, 8], "texture": "#1"}, + "south": {"uv": [16, 8, 24, 8], "texture": "#1"}, + "west": {"uv": [12, 8, 16, 8], "texture": "#1"}, + "up": {"uv": [12, 8, 4, 4], "texture": "#1"}, + "down": {"uv": [20, 4, 12, 8], "texture": "#1"} + } + }, + { + "from": [10.25, 9.5, 6], + "to": [12, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [4, 9.5, 6], + "to": [5.75, 11, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.75, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 2], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [4, 3.5, 6], + "to": [5.75, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "south": {"uv": [0, 0, 1.25, 1.25], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [10.25, 3.5, 6], + "to": [12, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1.5], "texture": "#1"}, + "up": {"uv": [0, 0, 1.75, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1.75, 4], "texture": "#1"} + } + }, + { + "from": [8, 9.25, 6.5], + "to": [10, 11.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 9.25, 6.5], + "to": [8, 11.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 7.25, 6.5], + "to": [8, 9.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [4, 7.25, 6.5], + "to": [6, 9.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [8, 7.25, 6.5], + "to": [10, 9.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [10, 7.25, 6.5], + "to": [12, 9.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [10, 5.25, 6.5], + "to": [12, 7.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [8, 5.25, 6.5], + "to": [10, 7.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 5.25, 6.5], + "to": [8, 7.25, 10.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [4, 5.25, 6.5], + "to": [6, 7.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [6, 3.25, 6.5], + "to": [8, 5.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [8, 3.25, 6.5], + "to": [10, 5.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#particle"}, + "east": {"uv": [0, 0, 15.75, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [4, 3.5, 10], + "to": [12, 11, 12.75], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ], + "display": { + "firstperson_righthand": { + "scale": [0.4, 0.4, 0.4] + }, + "gui": { + "rotation": [0, 180, 0] + } + }, + "groups": [ + { + "name": "Tilt", + "origin": [10.5, 5.25, 10], + "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] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/block/searchlight/searchlight_body.json b/common/src/main/resources/assets/theatrical/models/block/searchlight/searchlight_body.json new file mode 100644 index 0000000..e1ca007 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/searchlight/searchlight_body.json @@ -0,0 +1,142 @@ +{ + "credit": "Made with Blockbench", + "elements": [ + { + "from": [-1, 0, -2], + "to": [17, 6, 18], + "color": 1, + "faces": { + "north": {"uv": [0, 0, 16, 6], "texture": "#missing"}, + "east": {"uv": [0, 0, 16, 6], "texture": "#missing"}, + "south": {"uv": [0, 0, 16, 6], "texture": "#missing"}, + "west": {"uv": [0, 0, 16, 6], "texture": "#missing"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#missing"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#missing"} + } + }, + { + "from": [0, 7, 6], + "to": [16, 10, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 25, 8]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 16, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 5, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 16, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 5, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 16, 5], "texture": "#missing"}, + "down": {"uv": [0, 0, 16, 5], "texture": "#missing"} + } + }, + { + "from": [13, 10, 6], + "to": [16, 25, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 25, 8]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "east": {"uv": [0, 0, 5, 15], "texture": "#missing"}, + "south": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "west": {"uv": [0, 0, 5, 15], "texture": "#missing"}, + "up": {"uv": [0, 0, 3, 5], "texture": "#missing"}, + "down": {"uv": [0, 0, 3, 5], "texture": "#missing"} + } + }, + { + "from": [0, 10, 6], + "to": [3, 25, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 25, 8]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "east": {"uv": [0, 0, 5, 15], "texture": "#missing"}, + "south": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "west": {"uv": [0, 0, 5, 15], "texture": "#missing"}, + "up": {"uv": [0, 0, 3, 5], "texture": "#missing"}, + "down": {"uv": [0, 0, 3, 5], "texture": "#missing"} + } + }, + { + "from": [3, 18, 0], + "to": [13, 29, 18], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 23.5, 9.25]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 10, 11], "texture": "#missing"}, + "east": {"uv": [0, 0, 16, 11], "texture": "#missing"}, + "south": {"uv": [0, 0, 10, 11], "texture": "#missing"}, + "west": {"uv": [0, 0, 16, 11], "texture": "#missing"}, + "up": {"uv": [0, 0, 10, 16], "texture": "#missing"}, + "down": {"uv": [0, 0, 10, 16], "texture": "#missing"} + } + }, + { + "from": [4, 28, -2], + "to": [12, 31, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 23.5, 9.25]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 3, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 3, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "down": {"uv": [0, 0, 8, 3], "texture": "#missing"} + } + }, + { + "from": [2, 16, -2], + "to": [4, 31, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 23.5, 9.25]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 2, 15], "texture": "#missing"}, + "east": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "south": {"uv": [0, 0, 2, 15], "texture": "#missing"}, + "west": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#missing"}, + "down": {"uv": [0, 0, 2, 3], "texture": "#missing"} + } + }, + { + "from": [12, 16, -2], + "to": [14, 31, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 23.5, 9.25]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 2, 15], "texture": "#missing"}, + "east": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "south": {"uv": [0, 0, 2, 15], "texture": "#missing"}, + "west": {"uv": [0, 0, 3, 15], "texture": "#missing"}, + "up": {"uv": [0, 0, 2, 3], "texture": "#missing"}, + "down": {"uv": [0, 0, 2, 3], "texture": "#missing"} + } + }, + { + "from": [4, 16, -2], + "to": [12, 19, 1], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 23.5, 9.25]}, + "color": 1, + "faces": { + "north": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 3, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 3, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "down": {"uv": [0, 0, 8, 3], "texture": "#missing"} + } + } + ], + "groups": [ + 0, + 1, + 2, + 3, + { + "name": "group", + "origin": [8, 23, 8.75], + "color": 0, + "children": [4, 5, 6, 7, 8] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/big_panel.json b/common/src/main/resources/assets/theatrical/models/item/big_panel.json new file mode 100644 index 0000000..f374f2c --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/big_panel.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/bigpanel3x3/bigpanel_body" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/big_panel2.json b/common/src/main/resources/assets/theatrical/models/item/big_panel2.json new file mode 100644 index 0000000..b9d8bf0 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/big_panel2.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/bigpanel2x3/bigpanel2x3_body" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/led_fountain.json b/common/src/main/resources/assets/theatrical/models/item/led_fountain.json index e0afdff..53b643a 100644 --- a/common/src/main/resources/assets/theatrical/models/item/led_fountain.json +++ b/common/src/main/resources/assets/theatrical/models/item/led_fountain.json @@ -1,3 +1,3 @@ { - "parent": "theatrical:block/fountain_lamp/fountain_lamp_body_only" + "parent": "theatrical:block/fountain_lamp/fountain_lamp_whole" } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/led_panel_2.json b/common/src/main/resources/assets/theatrical/models/item/led_panel_2.json new file mode 100644 index 0000000..bfd7f3e --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/led_panel_2.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/ledpanel/led_panel_body" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/moving_vl6.json b/common/src/main/resources/assets/theatrical/models/item/moving_vl6.json new file mode 100644 index 0000000..acceea8 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/moving_vl6.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/moving_vl6/moving_vl6_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/models/item/par_led.json b/common/src/main/resources/assets/theatrical/models/item/par_led.json new file mode 100644 index 0000000..d74ed74 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/item/par_led.json @@ -0,0 +1,3 @@ +{ + "parent": "theatrical:block/parled/parled_body_whole" + } \ No newline at end of file diff --git a/common/src/main/resources/assets/theatrical/textures/block/moving_scan_body.png b/common/src/main/resources/assets/theatrical/textures/block/moving_scan_body.png index 89d3f5da17fe598ed316f04cb9a7948de1dfeff2..c7f69d52b26fccc0bfcf04098caedcc87975c76f 100644 GIT binary patch delta 294 zcmbOubXItRW4&L1Pl#)HczAq#d`3n_dU|?NQW66LLqtSGVq#)yYHDrJV$7Pqb7fVPl&6WoE!rK!_%iv4;(lEWF+R@^#oF^B|(0{|ABzv_cp%Zjr&SD zY&ASx978mMlN%V^3=$ZbW-tf~1ZXwnX)qfL7zk)GC^d+Y$jl(6AE&$6zo5&0?103KP1fP551ac+M{XxlcGWodCa@b^#C^gM}pCTzST zkK^bG<=`FPpnP}&mnh*c2?UB~K==SduKVK|Y?zn@NFt&CUn}B`25EPajn2yG8(vCU znTdonmACnIW}NEQSRn>nhFn~h#f&)JSd39#0P52P2voLa00000NkvXXu0mjfI0|!B delta 281 zcmV+!0p|Xr6T%a)vj~6sNkl%|3`E^*2Nnql3I6}%IKYWbAl6Qv0}-Q4 zG?RNuDq)OW-Cb@>Q4}_gV@Z-kj^mJdo~3CTsj5nTfjOTF#~34ybgEle&EqWR-UFw_I=k~v~8=Ne1gJfe1Hlt1)2~d{*#HE8xh8LpU6Mn zhyF}B@4BuU$z33Zef##!n>VjowQBwP^%4>i3JMAu8XCgF!o0k^d-m+vv}sdg zW23XPb3;SJl3Iq<%?$geGMrh&aB@Dw_CAKyjSP#c85UMC?487LY&OG*xeQyo7+O*p z*0eHg>tQ&xfMHq*!>kg9i^~|AnwmOO81_wJ*xbo*a5_Uz4nuP?&=Cw5YnF)tDeaOV zzu^Bw0|w=j%P#=6aTa()7BevL9R^{>TTEKfKV zK4A~ZaeDG%sb)|R8(YM4^*^cS8vJLfFn*Adn=+B{QgXmUF_lLK&mTmm)W~d4X)wMZ za&mp+dd`c&at%jinCe&_=p6l^_|U@|=F}EI_;OqVw!m{PujMb}O)g4|aZ*^wFIin31c5tj%mmImp z^`v6{@6v_egX0|UtbVuQX@Y!gvit2h<}$x_ZM|kQ|7=*>!-~qj#fIW+)0VHiusZtr vo4+3|_S{HZx#&Xm+*iBa`5*pZ?R#0CXQxMOPRnU$P#k-@`njxgN@xNAVm&=m literal 0 HcmV?d00001