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 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/Task b/Task new file mode 100644 index 0000000..e69de29 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/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java index cb6ddde..374a538 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalClient.java @@ -11,17 +11,41 @@ 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.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.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; @@ -57,8 +81,19 @@ 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.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(); @@ -220,11 +255,42 @@ 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)); + } + } case BASIC_LIGHTING_DESK -> { if(Minecraft.getInstance().level.getBlockEntity(openScreen.getPos()) instanceof BasicLightingDeskBlockEntity bse) { 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 22fd2da..de75d23 100644 --- a/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java +++ b/common/src/main/java/dev/imabad/theatrical/TheatricalScreen.java @@ -4,6 +4,11 @@ public enum TheatricalScreen { GENERIC_DMX, BASIC_LIGHTING_DESK, - FRESNEL - + 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 828dcd4..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,8 +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; @@ -19,7 +30,22 @@ 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_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/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/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/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/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/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 7b7e500..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,8 +7,19 @@ 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; import dev.imabad.theatrical.blocks.rigging.TrussBlock; import net.minecraft.core.BlockPos; @@ -23,9 +34,20 @@ 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_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/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/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/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/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/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/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 new file mode 100644 index 0000000..40bbec9 --- /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, 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); + 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..af23674 --- /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, 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); + 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/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/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/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 new file mode 100644 index 0000000..9324b0d --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/client/blockentities/RGBbarRenderer.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.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 { + // 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(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 { + // 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/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/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/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 cc32e9c..18971f2 100644 --- a/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/Fixtures.java @@ -14,13 +14,45 @@ 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 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); + 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 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"), RedstoneInterfaceFixture::new 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 new file mode 100644 index 0000000..3a9e211 --- /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, 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}; + + + @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.78125F, 0.132F}; + } + + @Override + public float getDefaultRotation() { + return 90; + } + + @Override + public float getBeamWidth() { + return 0.17f; + } + + @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..194b4c2 --- /dev/null +++ b/common/src/main/java/dev/imabad/theatrical/fixtures/MovingVL2CFixture.java @@ -0,0 +1,100 @@ +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, 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}; + + + @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.78125F, 0.132F}; + } + + @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/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/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/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/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 5fc9a6b..2f379aa 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,49 @@ 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)) + ); + 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)) + ); + 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 new file mode 100644 index 0000000..96fd05f --- /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_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_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/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/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/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/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/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 new file mode 100644 index 0000000..37dd06b --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_body_only.json @@ -0,0 +1,118 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/light_fresnel_active_full", + "2": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Main Body", + "from": [11, 25, 4], + "to": [12, 31, 6], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 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, 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"}, + "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, 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"}, + "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, + 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 new file mode 100644 index 0000000..edce60f --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_handle_only.json @@ -0,0 +1,74 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "theatrical:block/light_side" + }, + "elements": [ + { + "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, 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, 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": "#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"} + } + } + ], + "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 + ] +} \ 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..c4917d8 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/fountain_lamp/fountain_lamp_hook_bar.json @@ -0,0 +1,43 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "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": { + "translation": [0, -4.25, 0], + "scale": [0.4, 0.4, 0.4] + } + }, + "groups": [ + { + "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/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/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 new file mode 100644 index 0000000..28059d4 --- /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": [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"}, + "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": [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"}, + "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.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"}, + "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": [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"}, + "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..74d2562 --- /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": [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"}, + "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..c3a48f2 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_tilt.json @@ -0,0 +1,126 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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": [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"}, + "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, 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"}, + "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": [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, 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"} + } + } + ], + "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] + } + ] +} \ 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..9f2ca45 --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_beam/moving_beam_whole.json @@ -0,0 +1,206 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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": [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"}, + "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, 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"}, + "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": [6, 7, 6], + "to": [10, 8, 10], + "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"}, + "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": [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"}, + "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": [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"}, + "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.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"}, + "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": [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"}, + "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": [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"}, + "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, + { + "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_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..28059d4 --- /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": [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"}, + "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": [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"}, + "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.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"}, + "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": [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"}, + "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..74d2562 --- /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": [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"}, + "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..8fced7f --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_tilt.json @@ -0,0 +1,132 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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"} + } + } + ], + "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] + }, + { + "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 new file mode 100644 index 0000000..fc4605f --- /dev/null +++ b/common/src/main/resources/assets/theatrical/models/block/moving_vl2c/moving_vl2c_whole.json @@ -0,0 +1,206 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_vl2c_body", + "particle": "theatrical:block/moving_vl2c_body" + }, + "elements": [ + { + "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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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, 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"}, + "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": [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"}, + "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": [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"}, + "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.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"}, + "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": [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"}, + "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": [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"}, + "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, + { + "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/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 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 new file mode 100644 index 0000000..53b643a --- /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_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_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_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/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/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/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 0000000..c7f69d5 Binary files /dev/null and b/common/src/main/resources/assets/theatrical/textures/block/moving_scan_body.png differ diff --git a/common/src/main/resources/assets/theatrical/textures/block/moving_vl2c_body.png b/common/src/main/resources/assets/theatrical/textures/block/moving_vl2c_body.png new file mode 100644 index 0000000..b4d9498 Binary files /dev/null and b/common/src/main/resources/assets/theatrical/textures/block/moving_vl2c_body.png differ diff --git a/common/src/main/resources/assets/theatrical/textures/block/waterpump.png b/common/src/main/resources/assets/theatrical/textures/block/waterpump.png new file mode 100644 index 0000000..f0b1920 Binary files /dev/null and b/common/src/main/resources/assets/theatrical/textures/block/waterpump.png differ 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 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");