From 80c2d258ac3515705e5cc18236082c118a168f43 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 12:18:09 +0100 Subject: [PATCH 01/21] Added the German Language into Theatrical --- .../assets/theatrical/lang/de_de.json | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/generated/resources/assets/theatrical/lang/de_de.json diff --git a/src/generated/resources/assets/theatrical/lang/de_de.json b/src/generated/resources/assets/theatrical/lang/de_de.json new file mode 100644 index 0000000..54952c8 --- /dev/null +++ b/src/generated/resources/assets/theatrical/lang/de_de.json @@ -0,0 +1,25 @@ +{ + "block.theatrical.artnet_interface": "ArtNet Schnittstelle", + "block.theatrical.basic_lighting_desk": "Einfaches Lichtpult", + "block.theatrical.dimmed_power_cable": "Gedimmtes Stromkabel", + "block.theatrical.dimmer_rack": "Dimmer Rack", + "block.theatrical.dmx_cable": "DMX Kabel", + "block.theatrical.generic_light": "Konventionelle Lampe", + "block.theatrical.iwb": "Intern verdrahtete Leiste (IWB)", + "block.theatrical.moving_light": "Moving Light", + "block.theatrical.power_cable": "Stromkabel", + "block.theatrical.redstone_interface": "DMX-Redstone Schnittstelle", + "block.theatrical.socapex_cable": "Socapex Kabel", + "block.theatrical.socapex_distribution": "Socapex Verteiler", + "block.theatrical.test_dmx": "Test DMX Block", + "block.theatrical.truss": "MT100 Gerüst", + "guide.theatrical.landing_text": "Zur Kunst des Theaters", + "guide.theatrical.name": "Theatrical Handbuch", + "item.theatrical.bulb": "Wolframlampe", + "item.theatrical.cog": "Mechanisches Zahnrad", + "item.theatrical.led": "LED", + "item.theatrical.motor": "Elektrischer Motor", + "item.theatrical.positioner": "Fernlichtpositionierer", + "item.theatrical.wrench": "Schraubenschlüssel", + "itemGroup.theatrical": "Theatrical" +} \ No newline at end of file From c536f0621758e1139fe7ba79dcffe6a9331545c9 Mon Sep 17 00:00:00 2001 From: nicode3141 Date: Sun, 29 Jan 2023 19:52:28 +0100 Subject: [PATCH 02/21] Added Floods --- .../theatrical/fixtures/FloodFixture.java | 22 ++ .../fixtures/MovingLightWashFixture.java | 29 ++ .../models/block/flood/flood_body_only.json | 109 +++++++ .../models/block/flood/flood_hook.json | 261 +++++++++++++++++ .../models/block/flood/flood_hook_bar.json | 269 ++++++++++++++++++ .../models/block/flood/flood_whole.json | 109 +++++++ .../moving_light_wash/moving_head_bar.json | 120 ++++++++ .../moving_light_wash/moving_head_pan.json | 46 +++ .../moving_light_wash/moving_head_static.json | 22 ++ .../moving_light_wash/moving_head_tilt.json | 22 ++ .../moving_light_wash/moving_head_whole.json | 202 +++++++++++++ 11 files changed, 1211 insertions(+) create mode 100644 src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java create mode 100644 src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java create mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json create mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_hook.json create mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json create mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_whole.json create mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json create mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json create mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json create mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json create mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json diff --git a/src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java b/src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java new file mode 100644 index 0000000..5acbf3b --- /dev/null +++ b/src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java @@ -0,0 +1,22 @@ +package dev.theatricalmod.theatrical.fixtures; + +import dev.theatricalmod.theatrical.TheatricalMod; +import dev.theatricalmod.theatrical.api.ChannelsDefinition; +import dev.theatricalmod.theatrical.api.fixtures.Fixture; +import dev.theatricalmod.theatrical.api.fixtures.FixtureType; +import dev.theatricalmod.theatrical.api.fixtures.HangableType; +import net.minecraft.util.ResourceLocation; + +public class FloodFixture extends Fixture { + + public FloodFixture() { + super(new ResourceLocation(TheatricalMod.MOD_ID, "flood_fixture"), FixtureType.TUNGSTEN, HangableType.HOOK_BAR, + new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_hook_bar"), + new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_hook"), + new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_body_only"), + new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_handle_only"), + new float[]{0.5F, 0.3F, 0.39F}, new float[]{0.5F, 0, 0.41F}, new float[]{0.5F, 0.24F, 0.1F}, 0, 1F, 0, 5, 0, + 255, 0, 0, new ChannelsDefinition()); + } + +} diff --git a/src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java b/src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java new file mode 100644 index 0000000..3949b2b --- /dev/null +++ b/src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java @@ -0,0 +1,29 @@ +package dev.theatricalmod.theatrical.fixtures; + +import dev.theatricalmod.theatrical.TheatricalMod; +import dev.theatricalmod.theatrical.api.ChannelType; +import dev.theatricalmod.theatrical.api.ChannelsDefinition; +import dev.theatricalmod.theatrical.api.fixtures.Fixture; +import dev.theatricalmod.theatrical.api.fixtures.FixtureType; +import dev.theatricalmod.theatrical.api.fixtures.HangableType; +import net.minecraft.util.ResourceLocation; + +public class MovingLightWashFixture extends Fixture { + + public static final ResourceLocation ID = new ResourceLocation(TheatricalMod.MOD_ID, "moving_head_fixture"); + + public MovingLightWashFixture() { + super(ID, FixtureType.INTELLIGENT, HangableType.BRACE_BAR, + new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_static"), new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_bar"), + new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_tilt"), new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_pan"), + new float[]{0.5F, .6F, .5F}, new float[]{0.5F, .5F, .5F}, new float[]{0F, -0.8F, -0.35F}, 90, 0.5F, 0F, 10, 5, + 50, 0, 7, new ChannelsDefinition(), new ResourceLocation("theatrical:block/moving_head_whole")); + getChannelsDefinition().setChannel(ChannelType.INTENSITY, 0); + getChannelsDefinition().setChannel(ChannelType.RED, 1); + getChannelsDefinition().setChannel(ChannelType.GREEN, 2); + getChannelsDefinition().setChannel(ChannelType.BLUE, 3); + getChannelsDefinition().setChannel(ChannelType.FOCUS, 4); + getChannelsDefinition().setChannel(ChannelType.PAN, 5); + getChannelsDefinition().setChannel(ChannelType.TILT, 6); + } +} diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json b/src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json new file mode 100644 index 0000000..28ea00c --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json @@ -0,0 +1,109 @@ +{ + "credit": "Made with Blockbench", + "elements": [ + { + "from": [3, 0, 2], + "to": [14, 8, 5], + "color": 6, + "faces": { + "north": {"uv": [0, 0, 11, 8], "texture": "#missing"}, + "east": {"uv": [0, 0, 3, 8], "texture": "#missing"}, + "south": {"uv": [0, 0, 11, 8], "texture": "#missing"}, + "west": {"uv": [0, 0, 3, 8], "texture": "#missing"}, + "up": {"uv": [0, 0, 11, 3], "texture": "#missing"}, + "down": {"uv": [0, 0, 11, 3], "texture": "#missing"} + } + }, + { + "from": [3, 1, 5], + "to": [14, 7, 7], + "color": 6, + "faces": { + "north": {"uv": [0, 0, 11, 6], "texture": "#missing"}, + "east": {"uv": [0, 0, 2, 6], "texture": "#missing"}, + "south": {"uv": [0, 0, 11, 6], "texture": "#missing"}, + "west": {"uv": [0, 0, 2, 6], "texture": "#missing"}, + "up": {"uv": [0, 0, 11, 2], "texture": "#missing"}, + "down": {"uv": [0, 0, 11, 2], "texture": "#missing"} + } + }, + { + "from": [14, 3, 4], + "to": [15, 13, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [2, 3, 4], + "to": [3, 13, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [8, 13, 4], + "to": [9, 16, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [8, 14, 7], + "to": [9, 16, 8], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [8, 15, 5], + "to": [9, 16, 7], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 2], "rotation": 270, "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 2], "rotation": 90, "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#missing"} + } + }, + { + "from": [3, 12, 4], + "to": [14, 13, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 11], "rotation": 270, "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_hook.json b/src/main/resources/assets/theatrical/models/block/flood/flood_hook.json new file mode 100644 index 0000000..b9e2ff2 --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/flood/flood_hook.json @@ -0,0 +1,261 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Front", + "from": [ + 7.5, + 16, + 9 + ], + "to": [ + 8.5, + 18, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + } + } + }, + { + "name": "Top", + "from": [ + 7.5, + 17, + 7 + ], + "to": [ + 8.5, + 18, + 9 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + } + } + }, + { + "name": "Back", + "from": [ + 7.5, + 15, + 6 + ], + "to": [ + 8.5, + 18, + 7 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 76, + 0, + 0 + ], + "translation": [ + -0.5, + -5.5, + -7.5 + ] + }, + "gui": { + "rotation": [ + 0, + 151, + 0 + ], + "translation": [ + 0, + -1, + 0 + ], + "scale": [ + 0.8, + 0.8, + 0.8 + ] + } + }, + "groups": [ + { + "name": "fresnel", + "children": [ + { + "name": "Hook", + "children": [ + 0, + 1, + 2 + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json b/src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json new file mode 100644 index 0000000..c4f479d --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json @@ -0,0 +1,269 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/bar", + "2": "theatrical:block/light_side", + "particle": "theatrical:block/bar" + }, + "elements": [ + { + "name": "Front", + "from": [ + 7.5, + 16, + 9 + ], + "to": [ + 8.5, + 18, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + } + } + }, + { + "name": "Top", + "from": [ + 7.5, + 17, + 7 + ], + "to": [ + 8.5, + 18, + 9 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#2" + } + } + }, + { + "name": "Back", + "from": [ + 7.5, + 15, + 6 + ], + "to": [ + 8.5, + 18, + 7 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 3 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#2" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 76, + 0, + 0 + ], + "translation": [ + -0.5, + -5.5, + -7.5 + ] + }, + "gui": { + "rotation": [ + 0, + 151, + 0 + ], + "translation": [ + 0, + -1, + 0 + ], + "scale": [ + 0.8, + 0.8, + 0.8 + ] + } + }, + "groups": [ + { + "name": "fresnel", + "children": [ + { + "name": "Hook", + "children": [ + 0, + 1, + 2 + ] + } + ] + }, + { + "name": "bar", + "children": [ + 3 + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_whole.json b/src/main/resources/assets/theatrical/models/block/flood/flood_whole.json new file mode 100644 index 0000000..28ea00c --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/flood/flood_whole.json @@ -0,0 +1,109 @@ +{ + "credit": "Made with Blockbench", + "elements": [ + { + "from": [3, 0, 2], + "to": [14, 8, 5], + "color": 6, + "faces": { + "north": {"uv": [0, 0, 11, 8], "texture": "#missing"}, + "east": {"uv": [0, 0, 3, 8], "texture": "#missing"}, + "south": {"uv": [0, 0, 11, 8], "texture": "#missing"}, + "west": {"uv": [0, 0, 3, 8], "texture": "#missing"}, + "up": {"uv": [0, 0, 11, 3], "texture": "#missing"}, + "down": {"uv": [0, 0, 11, 3], "texture": "#missing"} + } + }, + { + "from": [3, 1, 5], + "to": [14, 7, 7], + "color": 6, + "faces": { + "north": {"uv": [0, 0, 11, 6], "texture": "#missing"}, + "east": {"uv": [0, 0, 2, 6], "texture": "#missing"}, + "south": {"uv": [0, 0, 11, 6], "texture": "#missing"}, + "west": {"uv": [0, 0, 2, 6], "texture": "#missing"}, + "up": {"uv": [0, 0, 11, 2], "texture": "#missing"}, + "down": {"uv": [0, 0, 11, 2], "texture": "#missing"} + } + }, + { + "from": [14, 3, 4], + "to": [15, 13, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [2, 3, 4], + "to": [3, 13, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [8, 13, 4], + "to": [9, 16, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [8, 14, 7], + "to": [9, 16, 8], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 2], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "from": [8, 15, 5], + "to": [9, 16, 7], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 2], "rotation": 270, "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 2], "rotation": 90, "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 2], "texture": "#missing"} + } + }, + { + "from": [3, 12, 4], + "to": [14, 13, 5], + "color": 4, + "faces": { + "north": {"uv": [0, 0, 1, 11], "rotation": 270, "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json new file mode 100644 index 0000000..cf8d3c2 --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json @@ -0,0 +1,120 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "name": "Base", + "from": [2, 3, 2], + "to": [14, 6, 14], + "faces": { + "north": {"uv": [3, 3, 6, 3.75], "texture": "#1"}, + "east": {"uv": [6, 3, 9, 3.75], "texture": "#1"}, + "south": {"uv": [9, 3, 12, 3.75], "texture": "#1"}, + "west": {"uv": [0, 3, 3, 3.75], "texture": "#1"}, + "up": {"uv": [3, 0, 6, 3], "texture": "#1"}, + "down": {"uv": [6, 0, 9, 3], "texture": "#1"} + } + }, + { + "from": [10, 0, 7], + "to": [11, 1, 9], + "faces": { + "north": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "east": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, + "south": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "west": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, + "up": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"}, + "down": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"} + } + }, + { + "from": [5, 0, 7], + "to": [6, 1, 9], + "faces": { + "north": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "east": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, + "south": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "west": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, + "up": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"}, + "down": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"} + } + }, + { + "from": [5, 0, 6], + "to": [6, 3, 7], + "faces": { + "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "down": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"} + } + }, + { + "from": [5, 0, 9], + "to": [6, 3, 10], + "faces": { + "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "down": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"} + } + }, + { + "from": [10, 0, 6], + "to": [11, 3, 7], + "faces": { + "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "down": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"} + } + }, + { + "from": [10, 0, 9], + "to": [11, 3, 10], + "faces": { + "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, + "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, + "down": {"uv": [0.5, 8, 1.5, 9], "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [0, 0, 90], + "translation": [8.5, 3.5, -1.5] + }, + "gui": { + "rotation": [0, 57, 13], + "translation": [1, -7, 0] + } + }, + "groups": [0, + { + "name": "bar", + "origin": [8, 8, 8], + "children": [1, 2] + }, + { + "name": "Left Hook", + "origin": [8, 8, 8], + "children": [3, 4] + }, + { + "name": "Left Hook2", + "origin": [8, 8, 8], + "children": [5, 6] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json new file mode 100644 index 0000000..d75a418 --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json @@ -0,0 +1,46 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "name": "RotateBase", + "from": [5, 3, 5], + "to": [11, 4, 11], + "faces": { + "north": {"uv": [3.5, 1.25, 5.25, 1.75], "texture": "#1"}, + "east": {"uv": [3.25, 1, 5.75, 1.5], "texture": "#1"}, + "south": {"uv": [3.5, 1.25, 5.25, 1.75], "texture": "#1"}, + "west": {"uv": [0, 0, 6, 1], "texture": "#1"}, + "up": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "down": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"} + } + }, + { + "name": "RightSide", + "from": [11, 3, 5], + "to": [11.5, 9, 11], + "faces": { + "north": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "east": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "south": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "west": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "up": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"}, + "down": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"} + } + }, + { + "from": [4.5, 3, 5], + "to": [5, 9, 11], + "faces": { + "north": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "east": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "south": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "west": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, + "up": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"}, + "down": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json new file mode 100644 index 0000000..a173dbe --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json @@ -0,0 +1,22 @@ +{ + "textures": { + "0": "theatrical:block/moving_head_whole", + "2": "theatrical:block/moving_head_body", + "particle": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Base", + "from": [2, 0, 2], + "to": [14, 3, 14], + "faces": { + "north": {"uv": [3, 3, 6, 3.75], "texture": "#0"}, + "east": {"uv": [9, 3, 12, 3.75], "texture": "#0"}, + "south": {"uv": [9, 3, 12, 3.75], "texture": "#0"}, + "west": {"uv": [9, 3, 12, 3.75], "texture": "#0"}, + "up": {"uv": [3, 0, 6, 3], "texture": "#0"}, + "down": {"uv": [6, 0, 9, 3], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json new file mode 100644 index 0000000..dbd4d61 --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "theatrical:block/moving_head_whole", + "particle": "theatrical:block/moving_head_whole" + }, + "elements": [ + { + "name": "SpotBit", + "from": [5, 5, 5], + "to": [11, 14, 11], + "faces": { + "north": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, + "east": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, + "south": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, + "west": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, + "up": {"uv": [1.5, 3.75, 3, 5.25], "texture": "#0"}, + "down": {"uv": [7.5, 6, 9, 7.5], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json new file mode 100644 index 0000000..682c200 --- /dev/null +++ b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json @@ -0,0 +1,202 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/cube", + "textures": { + "0": "theatrical:block/light_side", + "2": "theatrical:block/moving_head_body", + "particle": "theatrical:block/light_side" + }, + "elements": [ + { + "name": "Base", + "from": [2, 0, 2], + "to": [14, 3, 14], + "faces": { + "north": {"uv": [0, 13, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 13, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 13, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 13, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "RotateBase", + "from": [4, 3, 5], + "to": [12, 4, 11], + "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, 0, 6, 1], "texture": "#0"}, + "up": {"uv": [5, 5, 11, 11], "texture": "#0"}, + "down": {"uv": [5, 5, 11, 11], "texture": "#0"} + } + }, + { + "name": "RightSide", + "from": [12, 3, 5], + "to": [12.5, 10, 11], + "faces": { + "north": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, + "east": {"uv": [5, 5, 11, 10], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, + "west": {"uv": [5, 5, 11, 10], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 6], "texture": "#0"} + } + }, + { + "name": "RightSide", + "from": [3.5, 3, 5], + "to": [4, 10, 11], + "faces": { + "north": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, + "east": {"uv": [5, 5, 11, 10], "texture": "#0"}, + "south": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, + "west": {"uv": [5, 5, 11, 10], "texture": "#0"}, + "up": {"uv": [0, 0, 0.5, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 0.5, 6], "texture": "#0"} + } + }, + { + "from": [7, 6, 7], + "to": [8, 7, 8], + "color": 2, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} + } + }, + { + "name": "main", + "from": [4, 8, 6], + "to": [12, 11, 10], + "color": 3, + "faces": { + "north": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 4, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 8, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 4, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 8, 4], "texture": "#missing"}, + "down": {"uv": [0, 0, 8, 4], "texture": "#missing"} + } + }, + { + "name": "main", + "from": [5, 7, 6], + "to": [11, 8, 10], + "color": 3, + "faces": { + "north": {"uv": [0, 0, 6, 1], "texture": "#missing"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#missing"}, + "south": {"uv": [0, 0, 6, 1], "texture": "#missing"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#missing"}, + "up": {"uv": [0, 0, 6, 4], "texture": "#missing"}, + "down": {"uv": [0, 0, 6, 4], "texture": "#missing"} + } + }, + { + "name": "main", + "from": [5, 8, 5], + "to": [11, 11, 6], + "color": 3, + "faces": { + "north": {"uv": [0, 0, 6, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 6, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 6, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#missing"} + } + }, + { + "name": "main", + "from": [6, 8, 4], + "to": [10, 11, 5], + "color": 3, + "faces": { + "north": {"uv": [0, 0, 4, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 4, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 4, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 4, 1], "texture": "#missing"} + } + }, + { + "name": "main", + "from": [5, 8, 10], + "to": [11, 11, 11], + "color": 3, + "faces": { + "north": {"uv": [0, 0, 6, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 6, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 6, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 6, 1], "texture": "#missing"} + } + }, + { + "name": "main", + "from": [6, 8, 11], + "to": [10, 11, 12], + "color": 3, + "faces": { + "north": {"uv": [0, 0, 4, 3], "texture": "#missing"}, + "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "south": {"uv": [0, 0, 4, 3], "texture": "#missing"}, + "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, + "up": {"uv": [0, 0, 4, 1], "texture": "#missing"}, + "down": {"uv": [0, 0, 4, 1], "texture": "#missing"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 5.5, 0], + "scale": [0.7, 0.7, 0.7] + }, + "thirdperson_lefthand": { + "translation": [0, 5.5, 0], + "scale": [0.7, 0.7, 0.7] + }, + "firstperson_righthand": { + "rotation": [-73, 0, 0], + "translation": [0, 3.25, 3.25], + "scale": [0.7, 0.7, 0.7] + }, + "firstperson_lefthand": { + "rotation": [-73, 0, 0], + "translation": [0, 3.25, 3.25], + "scale": [0.7, 0.7, 0.7] + }, + "ground": { + "translation": [0, 4.5, 0] + }, + "gui": { + "scale": [0.8, 0.8, 0.8] + }, + "head": { + "translation": [0, 14.5, 0] + } + }, + "groups": [ + 0, + 1, + 2, + 3, + 4, + { + "name": "head", + "origin": [0, 0, 0], + "color": 0, + "children": [5, 6, 7, 8, 9, 10] + } + ] +} \ No newline at end of file From 6e9a20fb66fa49a9db16cf4e56275b06fecf9613 Mon Sep 17 00:00:00 2001 From: nicode3141 Date: Sun, 29 Jan 2023 20:20:18 +0100 Subject: [PATCH 03/21] Added Floods --- .../theatrical/block/TheatricalBlocks.java | 1 + .../block/light/BlockFloodLight.java | 30 +++++++++++++++++++ .../fixtures/TheatricalFixtures.java | 2 ++ .../theatrical/items/TheatricalItems.java | 1 + 4 files changed, 34 insertions(+) create mode 100644 src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java diff --git a/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java b/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java index 6cc4676..d0e0256 100644 --- a/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java +++ b/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java @@ -39,6 +39,7 @@ public class TheatricalBlocks { public static final RegistryObject TRUSS = BLOCKS.register("truss", BlockTruss::new); public static final RegistryObject MOVING_LIGHT = BLOCKS.register("moving_light", BlockMovingLight::new); + public static final RegistryObject FLOOD_LIGHT = BLOCKS.register("flood_light", BlockMovingLight::new); public static final RegistryObject GENERIC_LIGHT = BLOCKS.register("generic_light", () -> new BlockGenericFixture(TheatricalFixtures.FRESNSEL)); public static final RegistryObject DMX_CABLE = BLOCKS.register("dmx_cable", () -> new BlockCable(CableType.DMX)); public static final RegistryObject SOCAPEX_CABLE = BLOCKS.register("socapex_cable", () -> new BlockCable(CableType.SOCAPEX)); diff --git a/src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java b/src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java new file mode 100644 index 0000000..e1d528a --- /dev/null +++ b/src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java @@ -0,0 +1,30 @@ +package dev.theatricalmod.theatrical.block.light; + +import dev.theatricalmod.theatrical.block.TheatricalBlocks; +import dev.theatricalmod.theatrical.fixtures.TheatricalFixtures; +import dev.theatricalmod.theatrical.tiles.lights.TileEntityIntelligentFixture; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +import javax.annotation.Nullable; + +public class BlockFloodLight extends BlockIntelligentFixture { + + public BlockFloodLight() { + super(TheatricalFixtures.FLOOD_LIGHT, TheatricalBlocks.LIGHT_PROPERTIES); + } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Nullable + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + TileEntityIntelligentFixture tileEntityIntelligentFixture = new TileEntityIntelligentFixture(); + tileEntityIntelligentFixture.setFixture(TheatricalFixtures.FLOOD_LIGHT); + return tileEntityIntelligentFixture; + } +} diff --git a/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java b/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java index 6077726..3b989b0 100644 --- a/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java +++ b/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java @@ -5,6 +5,8 @@ public class TheatricalFixtures { public static final Fixture MOVING_LIGHT = new MovingLightFixture(); + + public static final Fixture FLOOD_LIGHT = new FloodFixture(); public static final Fixture FRESNSEL = new FixtureFresnel(); } diff --git a/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java b/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java index fea8ef2..29a3fb1 100644 --- a/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java +++ b/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java @@ -26,6 +26,7 @@ public class TheatricalItems { public static final RegistryObject IWB = ITEMS.register("iwb", () -> new BlockItem(TheatricalBlocks.IWB.get(), BASE_PROPERTIES)); public static final RegistryObject TEST_DMX = ITEMS.register("test_dmx", () -> new BlockItem(TheatricalBlocks.TEST_DMX.get(), BASE_PROPERTIES)); public static final RegistryObject MOVING_LIGHT = ITEMS.register("moving_light", () -> new BlockItem(TheatricalBlocks.MOVING_LIGHT.get(), BASE_PROPERTIES)); + public static final RegistryObject FLOOD_LIGHT = ITEMS.register("flood_light", () -> new BlockItem(TheatricalBlocks.FLOOD_LIGHT.get(), BASE_PROPERTIES)); public static final RegistryObject GENERIC_LIGHT = ITEMS.register("generic_light", () -> new BlockItem(TheatricalBlocks.GENERIC_LIGHT.get(), BASE_PROPERTIES)); public static final RegistryObject DIMMER_RACK = ITEMS.register("dimmer_rack", () -> new BlockItem(TheatricalBlocks.DIMMER_RACK.get(), BASE_PROPERTIES)); public static final RegistryObject SOCAPEX_DISTRIBUTION = ITEMS.register("socapex_distribution", () -> new BlockItem(TheatricalBlocks.SOCAPEX_DISTRIBUTION.get(), BASE_PROPERTIES)); From acfce880afa7cfff69d26bba112b5a64b6a6c0b6 Mon Sep 17 00:00:00 2001 From: nicode3141 Date: Sun, 29 Jan 2023 20:25:41 +0100 Subject: [PATCH 04/21] Added Floods --- src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java b/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java index a9d545a..5ed7afc 100644 --- a/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java +++ b/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java @@ -20,6 +20,7 @@ import dev.theatricalmod.theatrical.compat.top.TOPCompat; import dev.theatricalmod.theatrical.entity.TheatricalEntities; import dev.theatricalmod.theatrical.fixtures.FixtureFresnel; +import dev.theatricalmod.theatrical.fixtures.FloodFixture; import dev.theatricalmod.theatrical.fixtures.MovingLightFixture; import dev.theatricalmod.theatrical.items.TheatricalItems; import dev.theatricalmod.theatrical.network.TheatricalNetworkHandler; @@ -144,6 +145,7 @@ public void shutdown(FMLServerStoppedEvent serverStoppedEvent){ private void registerFixture(RegistryEvent.Register event){ + event.getRegistry().register(new FloodFixture()); event.getRegistry().register(new MovingLightFixture()); event.getRegistry().register(new FixtureFresnel()); } From 19de8a8374ad0ce12dcf903c531b9d9ea55b5a25 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:42:02 +0100 Subject: [PATCH 05/21] Delete FloodFixture.java --- .../theatrical/fixtures/FloodFixture.java | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java diff --git a/src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java b/src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java deleted file mode 100644 index 5acbf3b..0000000 --- a/src/main/java/dev/theatricalmod/theatrical/fixtures/FloodFixture.java +++ /dev/null @@ -1,22 +0,0 @@ -package dev.theatricalmod.theatrical.fixtures; - -import dev.theatricalmod.theatrical.TheatricalMod; -import dev.theatricalmod.theatrical.api.ChannelsDefinition; -import dev.theatricalmod.theatrical.api.fixtures.Fixture; -import dev.theatricalmod.theatrical.api.fixtures.FixtureType; -import dev.theatricalmod.theatrical.api.fixtures.HangableType; -import net.minecraft.util.ResourceLocation; - -public class FloodFixture extends Fixture { - - public FloodFixture() { - super(new ResourceLocation(TheatricalMod.MOD_ID, "flood_fixture"), FixtureType.TUNGSTEN, HangableType.HOOK_BAR, - new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_hook_bar"), - new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_hook"), - new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_body_only"), - new ResourceLocation(TheatricalMod.MOD_ID, "block/flood/flood_handle_only"), - new float[]{0.5F, 0.3F, 0.39F}, new float[]{0.5F, 0, 0.41F}, new float[]{0.5F, 0.24F, 0.1F}, 0, 1F, 0, 5, 0, - 255, 0, 0, new ChannelsDefinition()); - } - -} From f7dcc9bc1636f2f739e30810fa5adbf524e0cdb9 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:42:23 +0100 Subject: [PATCH 06/21] Delete MovingLightWashFixture.java --- .../fixtures/MovingLightWashFixture.java | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java diff --git a/src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java b/src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java deleted file mode 100644 index 3949b2b..0000000 --- a/src/main/java/dev/theatricalmod/theatrical/fixtures/MovingLightWashFixture.java +++ /dev/null @@ -1,29 +0,0 @@ -package dev.theatricalmod.theatrical.fixtures; - -import dev.theatricalmod.theatrical.TheatricalMod; -import dev.theatricalmod.theatrical.api.ChannelType; -import dev.theatricalmod.theatrical.api.ChannelsDefinition; -import dev.theatricalmod.theatrical.api.fixtures.Fixture; -import dev.theatricalmod.theatrical.api.fixtures.FixtureType; -import dev.theatricalmod.theatrical.api.fixtures.HangableType; -import net.minecraft.util.ResourceLocation; - -public class MovingLightWashFixture extends Fixture { - - public static final ResourceLocation ID = new ResourceLocation(TheatricalMod.MOD_ID, "moving_head_fixture"); - - public MovingLightWashFixture() { - super(ID, FixtureType.INTELLIGENT, HangableType.BRACE_BAR, - new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_static"), new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_bar"), - new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_tilt"), new ResourceLocation(TheatricalMod.MOD_ID, "block/moving_light_wash/moving_head_pan"), - new float[]{0.5F, .6F, .5F}, new float[]{0.5F, .5F, .5F}, new float[]{0F, -0.8F, -0.35F}, 90, 0.5F, 0F, 10, 5, - 50, 0, 7, new ChannelsDefinition(), new ResourceLocation("theatrical:block/moving_head_whole")); - getChannelsDefinition().setChannel(ChannelType.INTENSITY, 0); - getChannelsDefinition().setChannel(ChannelType.RED, 1); - getChannelsDefinition().setChannel(ChannelType.GREEN, 2); - getChannelsDefinition().setChannel(ChannelType.BLUE, 3); - getChannelsDefinition().setChannel(ChannelType.FOCUS, 4); - getChannelsDefinition().setChannel(ChannelType.PAN, 5); - getChannelsDefinition().setChannel(ChannelType.TILT, 6); - } -} From 2f3284250a9a08714562e2636e2bf533744e71a0 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:42:46 +0100 Subject: [PATCH 07/21] Update TheatricalFixtures.java --- .../theatricalmod/theatrical/fixtures/TheatricalFixtures.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java b/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java index 3b989b0..6077726 100644 --- a/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java +++ b/src/main/java/dev/theatricalmod/theatrical/fixtures/TheatricalFixtures.java @@ -5,8 +5,6 @@ public class TheatricalFixtures { public static final Fixture MOVING_LIGHT = new MovingLightFixture(); - - public static final Fixture FLOOD_LIGHT = new FloodFixture(); public static final Fixture FRESNSEL = new FixtureFresnel(); } From 1c9e7477fd807e233deed57e64bd15f0b9cfdf11 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:43:13 +0100 Subject: [PATCH 08/21] Delete flood_body_only.json --- .../models/block/flood/flood_body_only.json | 109 ------------------ 1 file changed, 109 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json b/src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json deleted file mode 100644 index 28ea00c..0000000 --- a/src/main/resources/assets/theatrical/models/block/flood/flood_body_only.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "credit": "Made with Blockbench", - "elements": [ - { - "from": [3, 0, 2], - "to": [14, 8, 5], - "color": 6, - "faces": { - "north": {"uv": [0, 0, 11, 8], "texture": "#missing"}, - "east": {"uv": [0, 0, 3, 8], "texture": "#missing"}, - "south": {"uv": [0, 0, 11, 8], "texture": "#missing"}, - "west": {"uv": [0, 0, 3, 8], "texture": "#missing"}, - "up": {"uv": [0, 0, 11, 3], "texture": "#missing"}, - "down": {"uv": [0, 0, 11, 3], "texture": "#missing"} - } - }, - { - "from": [3, 1, 5], - "to": [14, 7, 7], - "color": 6, - "faces": { - "north": {"uv": [0, 0, 11, 6], "texture": "#missing"}, - "east": {"uv": [0, 0, 2, 6], "texture": "#missing"}, - "south": {"uv": [0, 0, 11, 6], "texture": "#missing"}, - "west": {"uv": [0, 0, 2, 6], "texture": "#missing"}, - "up": {"uv": [0, 0, 11, 2], "texture": "#missing"}, - "down": {"uv": [0, 0, 11, 2], "texture": "#missing"} - } - }, - { - "from": [14, 3, 4], - "to": [15, 13, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [2, 3, 4], - "to": [3, 13, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [8, 13, 4], - "to": [9, 16, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [8, 14, 7], - "to": [9, 16, 8], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [8, 15, 5], - "to": [9, 16, 7], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 2], "rotation": 270, "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 2], "rotation": 90, "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 2], "texture": "#missing"} - } - }, - { - "from": [3, 12, 4], - "to": [14, 13, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 11], "rotation": 270, "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"} - } - } - ] -} \ No newline at end of file From f99d57ad329007103c2e902ea35b95c332550270 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:43:23 +0100 Subject: [PATCH 09/21] Delete flood_hook.json --- .../models/block/flood/flood_hook.json | 261 ------------------ 1 file changed, 261 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_hook.json diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_hook.json b/src/main/resources/assets/theatrical/models/block/flood/flood_hook.json deleted file mode 100644 index b9e2ff2..0000000 --- a/src/main/resources/assets/theatrical/models/block/flood/flood_hook.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "2": "theatrical:block/light_side" - }, - "elements": [ - { - "name": "Front", - "from": [ - 7.5, - 16, - 9 - ], - "to": [ - 8.5, - 18, - 10 - ], - "faces": { - "north": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - } - } - }, - { - "name": "Top", - "from": [ - 7.5, - 17, - 7 - ], - "to": [ - 8.5, - 18, - 9 - ], - "faces": { - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "east": { - "uv": [ - 0, - 0, - 2, - 1 - ], - "texture": "#2" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "west": { - "uv": [ - 0, - 0, - 2, - 1 - ], - "texture": "#2" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "down": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - } - } - }, - { - "name": "Back", - "from": [ - 7.5, - 15, - 6 - ], - "to": [ - 8.5, - 18, - 7 - ], - "faces": { - "north": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - } - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [ - 76, - 0, - 0 - ], - "translation": [ - -0.5, - -5.5, - -7.5 - ] - }, - "gui": { - "rotation": [ - 0, - 151, - 0 - ], - "translation": [ - 0, - -1, - 0 - ], - "scale": [ - 0.8, - 0.8, - 0.8 - ] - } - }, - "groups": [ - { - "name": "fresnel", - "children": [ - { - "name": "Hook", - "children": [ - 0, - 1, - 2 - ] - } - ] - } - ] -} \ No newline at end of file From 930cfadf0b98846deb91e87b4cc5e04db8ea7b95 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:43:35 +0100 Subject: [PATCH 10/21] Delete flood_hook_bar.json --- .../models/block/flood/flood_hook_bar.json | 269 ------------------ 1 file changed, 269 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json b/src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json deleted file mode 100644 index c4f479d..0000000 --- a/src/main/resources/assets/theatrical/models/block/flood/flood_hook_bar.json +++ /dev/null @@ -1,269 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "theatrical:block/bar", - "2": "theatrical:block/light_side", - "particle": "theatrical:block/bar" - }, - "elements": [ - { - "name": "Front", - "from": [ - 7.5, - 16, - 9 - ], - "to": [ - 8.5, - 18, - 10 - ], - "faces": { - "north": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - } - } - }, - { - "name": "Top", - "from": [ - 7.5, - 17, - 7 - ], - "to": [ - 8.5, - 18, - 9 - ], - "faces": { - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "east": { - "uv": [ - 0, - 0, - 2, - 1 - ], - "texture": "#2" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "west": { - "uv": [ - 0, - 0, - 2, - 1 - ], - "texture": "#2" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - }, - "down": { - "uv": [ - 0, - 0, - 1, - 2 - ], - "texture": "#2" - } - } - }, - { - "name": "Back", - "from": [ - 7.5, - 15, - 6 - ], - "to": [ - 8.5, - 18, - 7 - ], - "faces": { - "north": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 3 - ], - "texture": "#2" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - }, - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "#2" - } - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [ - 76, - 0, - 0 - ], - "translation": [ - -0.5, - -5.5, - -7.5 - ] - }, - "gui": { - "rotation": [ - 0, - 151, - 0 - ], - "translation": [ - 0, - -1, - 0 - ], - "scale": [ - 0.8, - 0.8, - 0.8 - ] - } - }, - "groups": [ - { - "name": "fresnel", - "children": [ - { - "name": "Hook", - "children": [ - 0, - 1, - 2 - ] - } - ] - }, - { - "name": "bar", - "children": [ - 3 - ] - } - ] -} \ No newline at end of file From 63da50dd97648ec1930635cd547d805f9ee7fe51 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:43:44 +0100 Subject: [PATCH 11/21] Delete flood_whole.json --- .../models/block/flood/flood_whole.json | 109 ------------------ 1 file changed, 109 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/flood/flood_whole.json diff --git a/src/main/resources/assets/theatrical/models/block/flood/flood_whole.json b/src/main/resources/assets/theatrical/models/block/flood/flood_whole.json deleted file mode 100644 index 28ea00c..0000000 --- a/src/main/resources/assets/theatrical/models/block/flood/flood_whole.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "credit": "Made with Blockbench", - "elements": [ - { - "from": [3, 0, 2], - "to": [14, 8, 5], - "color": 6, - "faces": { - "north": {"uv": [0, 0, 11, 8], "texture": "#missing"}, - "east": {"uv": [0, 0, 3, 8], "texture": "#missing"}, - "south": {"uv": [0, 0, 11, 8], "texture": "#missing"}, - "west": {"uv": [0, 0, 3, 8], "texture": "#missing"}, - "up": {"uv": [0, 0, 11, 3], "texture": "#missing"}, - "down": {"uv": [0, 0, 11, 3], "texture": "#missing"} - } - }, - { - "from": [3, 1, 5], - "to": [14, 7, 7], - "color": 6, - "faces": { - "north": {"uv": [0, 0, 11, 6], "texture": "#missing"}, - "east": {"uv": [0, 0, 2, 6], "texture": "#missing"}, - "south": {"uv": [0, 0, 11, 6], "texture": "#missing"}, - "west": {"uv": [0, 0, 2, 6], "texture": "#missing"}, - "up": {"uv": [0, 0, 11, 2], "texture": "#missing"}, - "down": {"uv": [0, 0, 11, 2], "texture": "#missing"} - } - }, - { - "from": [14, 3, 4], - "to": [15, 13, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [2, 3, 4], - "to": [3, 13, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 10], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [8, 13, 4], - "to": [9, 16, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [8, 14, 7], - "to": [9, 16, 8], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 2], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "from": [8, 15, 5], - "to": [9, 16, 7], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 2], "rotation": 270, "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 2], "rotation": 90, "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 2], "rotation": 180, "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 2], "texture": "#missing"} - } - }, - { - "from": [3, 12, 4], - "to": [14, 13, 5], - "color": 4, - "faces": { - "north": {"uv": [0, 0, 1, 11], "rotation": 270, "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 11], "rotation": 90, "texture": "#missing"} - } - } - ] -} \ No newline at end of file From a62624e1e9c942ee68afbb7a8c51beeb77c74433 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:43:53 +0100 Subject: [PATCH 12/21] Delete moving_head_bar.json --- .../moving_light_wash/moving_head_bar.json | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json deleted file mode 100644 index cf8d3c2..0000000 --- a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_bar.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "1": "theatrical:block/moving_head_whole" - }, - "elements": [ - { - "name": "Base", - "from": [2, 3, 2], - "to": [14, 6, 14], - "faces": { - "north": {"uv": [3, 3, 6, 3.75], "texture": "#1"}, - "east": {"uv": [6, 3, 9, 3.75], "texture": "#1"}, - "south": {"uv": [9, 3, 12, 3.75], "texture": "#1"}, - "west": {"uv": [0, 3, 3, 3.75], "texture": "#1"}, - "up": {"uv": [3, 0, 6, 3], "texture": "#1"}, - "down": {"uv": [6, 0, 9, 3], "texture": "#1"} - } - }, - { - "from": [10, 0, 7], - "to": [11, 1, 9], - "faces": { - "north": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "east": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, - "south": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "west": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, - "up": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"}, - "down": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"} - } - }, - { - "from": [5, 0, 7], - "to": [6, 1, 9], - "faces": { - "north": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "east": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, - "south": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "west": {"uv": [0, 7.75, 2, 8.75], "texture": "#1"}, - "up": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"}, - "down": {"uv": [0, 7.75, 1, 9.75], "texture": "#1"} - } - }, - { - "from": [5, 0, 6], - "to": [6, 3, 7], - "faces": { - "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "down": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"} - } - }, - { - "from": [5, 0, 9], - "to": [6, 3, 10], - "faces": { - "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "down": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"} - } - }, - { - "from": [10, 0, 6], - "to": [11, 3, 7], - "faces": { - "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "down": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"} - } - }, - { - "from": [10, 0, 9], - "to": [11, 3, 10], - "faces": { - "north": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "east": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "south": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "west": {"uv": [0, 7.75, 1, 10.75], "texture": "#1"}, - "up": {"uv": [0, 7.75, 1, 8.75], "texture": "#1"}, - "down": {"uv": [0.5, 8, 1.5, 9], "texture": "#1"} - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [0, 0, 90], - "translation": [8.5, 3.5, -1.5] - }, - "gui": { - "rotation": [0, 57, 13], - "translation": [1, -7, 0] - } - }, - "groups": [0, - { - "name": "bar", - "origin": [8, 8, 8], - "children": [1, 2] - }, - { - "name": "Left Hook", - "origin": [8, 8, 8], - "children": [3, 4] - }, - { - "name": "Left Hook2", - "origin": [8, 8, 8], - "children": [5, 6] - } - ] -} \ No newline at end of file From 3ce4c03d35a131983738a26c958bfdc9c011cd51 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:44:07 +0100 Subject: [PATCH 13/21] Delete moving_head_pan.json --- .../moving_light_wash/moving_head_pan.json | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json deleted file mode 100644 index d75a418..0000000 --- a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_pan.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "1": "theatrical:block/moving_head_whole" - }, - "elements": [ - { - "name": "RotateBase", - "from": [5, 3, 5], - "to": [11, 4, 11], - "faces": { - "north": {"uv": [3.5, 1.25, 5.25, 1.75], "texture": "#1"}, - "east": {"uv": [3.25, 1, 5.75, 1.5], "texture": "#1"}, - "south": {"uv": [3.5, 1.25, 5.25, 1.75], "texture": "#1"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#1"}, - "up": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "down": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"} - } - }, - { - "name": "RightSide", - "from": [11, 3, 5], - "to": [11.5, 9, 11], - "faces": { - "north": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "east": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "south": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "west": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "up": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"}, - "down": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"} - } - }, - { - "from": [4.5, 3, 5], - "to": [5, 9, 11], - "faces": { - "north": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "east": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "south": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "west": {"uv": [3.75, 0.75, 5.25, 2.25], "texture": "#1"}, - "up": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"}, - "down": {"uv": [4.25, 0.75, 4.75, 2.75], "texture": "#1"} - } - } - ] -} \ No newline at end of file From 4e6f3633801b4c8894ab29663ba436cc0d3b23b7 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:44:18 +0100 Subject: [PATCH 14/21] Delete BlockFloodLight.java --- .../block/light/BlockFloodLight.java | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java diff --git a/src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java b/src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java deleted file mode 100644 index e1d528a..0000000 --- a/src/main/java/dev/theatricalmod/theatrical/block/light/BlockFloodLight.java +++ /dev/null @@ -1,30 +0,0 @@ -package dev.theatricalmod.theatrical.block.light; - -import dev.theatricalmod.theatrical.block.TheatricalBlocks; -import dev.theatricalmod.theatrical.fixtures.TheatricalFixtures; -import dev.theatricalmod.theatrical.tiles.lights.TileEntityIntelligentFixture; -import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockReader; - -import javax.annotation.Nullable; - -public class BlockFloodLight extends BlockIntelligentFixture { - - public BlockFloodLight() { - super(TheatricalFixtures.FLOOD_LIGHT, TheatricalBlocks.LIGHT_PROPERTIES); - } - - @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Nullable - @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - TileEntityIntelligentFixture tileEntityIntelligentFixture = new TileEntityIntelligentFixture(); - tileEntityIntelligentFixture.setFixture(TheatricalFixtures.FLOOD_LIGHT); - return tileEntityIntelligentFixture; - } -} From 4899945d07380e9158b2a0f2558aa6c7345a8487 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:44:31 +0100 Subject: [PATCH 15/21] Delete TheatricalMod.java --- .../theatrical/TheatricalMod.java | 153 ------------------ 1 file changed, 153 deletions(-) delete mode 100644 src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java diff --git a/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java b/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java deleted file mode 100644 index 5ed7afc..0000000 --- a/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java +++ /dev/null @@ -1,153 +0,0 @@ -package dev.theatricalmod.theatrical; - -import dev.theatricalmod.theatrical.api.capabilities.WorldSocapexNetwork; -import dev.theatricalmod.theatrical.api.capabilities.dmx.WorldDMXNetwork; -import dev.theatricalmod.theatrical.api.capabilities.dmx.provider.DMXProvider; -import dev.theatricalmod.theatrical.api.capabilities.dmx.provider.IDMXProvider; -import dev.theatricalmod.theatrical.api.capabilities.dmx.receiver.DMXReceiver; -import dev.theatricalmod.theatrical.api.capabilities.dmx.receiver.IDMXReceiver; -import dev.theatricalmod.theatrical.api.capabilities.power.ITheatricalPowerStorage; -import dev.theatricalmod.theatrical.api.capabilities.power.TheatricalPower; -import dev.theatricalmod.theatrical.api.capabilities.socapex.ISocapexProvider; -import dev.theatricalmod.theatrical.api.capabilities.socapex.ISocapexReceiver; -import dev.theatricalmod.theatrical.api.capabilities.socapex.SocapexProvider; -import dev.theatricalmod.theatrical.api.capabilities.socapex.SocapexReceiver; -import dev.theatricalmod.theatrical.api.fixtures.Fixture; -import dev.theatricalmod.theatrical.artnet.ArtNetManager; -import dev.theatricalmod.theatrical.block.TheatricalBlocks; -import dev.theatricalmod.theatrical.client.TheatricalClient; -import dev.theatricalmod.theatrical.client.gui.container.TheatricalContainers; -import dev.theatricalmod.theatrical.compat.top.TOPCompat; -import dev.theatricalmod.theatrical.entity.TheatricalEntities; -import dev.theatricalmod.theatrical.fixtures.FixtureFresnel; -import dev.theatricalmod.theatrical.fixtures.FloodFixture; -import dev.theatricalmod.theatrical.fixtures.MovingLightFixture; -import dev.theatricalmod.theatrical.items.TheatricalItems; -import dev.theatricalmod.theatrical.network.TheatricalNetworkHandler; -import dev.theatricalmod.theatrical.tiles.TheatricalTiles; -import dev.theatricalmod.theatrical.util.CapabilityStorageProvider; -import net.minecraft.item.ItemGroup; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.capabilities.CapabilityManager; -import net.minecraftforge.event.AttachCapabilitiesEvent; -import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.event.TickEvent.Phase; -import net.minecraftforge.event.TickEvent.WorldTickEvent; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.DistExecutor; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.config.ModConfig; -import net.minecraftforge.fml.config.ModConfig.Type; -import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; -import net.minecraftforge.fml.event.server.FMLServerStoppedEvent; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -@Mod(TheatricalMod.MOD_ID) -public class TheatricalMod { - - public static final String MOD_ID = "theatrical"; - - public static final Logger LOGGER = LogManager.getLogger(); - - public static final ItemGroup theatricalItemGroup = new ItemGroup("theatrical") { - @Override - public ItemStack createIcon() { - return new ItemStack(TheatricalItems.DIMMER_RACK.get()); - } - }; - - public static TheatricalCommon proxy; - private static ArtNetManager artNetManager; - - private static final ResourceLocation WORLD_CAP_ID = new ResourceLocation(MOD_ID, "dmx_world_network"); - private static final ResourceLocation PIPE_PANEL_NETWORK = new ResourceLocation(MOD_ID, "pipe_panel_network"); - private static final ResourceLocation SOCAPEX_NETWORK_ID = new ResourceLocation(MOD_ID, "socapex_network"); - - - public TheatricalMod() { - //noinspection Convert2MethodRef - proxy = DistExecutor.runForDist(() -> () -> new TheatricalClient(), () -> () -> new TheatricalCommon()); - Fixture.createRegistry(); - ModLoadingContext.get().registerConfig(Type.COMMON, TheatricalConfigHandler.COMMON_SPEC); - ModLoadingContext.get().registerConfig(Type.CLIENT, TheatricalConfigHandler.CLIENT_SPEC); - IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); - eventBus.addListener(this::setup); - eventBus.addGenericListener(Fixture.class, this::registerFixture); - eventBus.addListener(this::imc); - TheatricalBlocks.BLOCKS.register(eventBus); - TheatricalItems.ITEMS.register(eventBus); - TheatricalTiles.TILES.register(eventBus); - TheatricalEntities.ENTITIES.register(eventBus); - TheatricalContainers.CONTAINERS.register(eventBus); - proxy.init(); - TheatricalNetworkHandler.init(); - artNetManager = new ArtNetManager(); - - } - - public static ArtNetManager getArtNetManager(){ - return artNetManager; - } - - private void worldTickEvent(WorldTickEvent event) { - if(event.phase == Phase.END){ - event.world.getCapability(WorldDMXNetwork.CAP).ifPresent(worldDMXNetwork -> worldDMXNetwork.tick(event.world)); - event.world.getCapability(WorldSocapexNetwork.CAP).ifPresent(worldSocapexNetwork -> worldSocapexNetwork.tick(event.world)); -// event.world.getCapability(WorldPipePanelNetwork.CAP).ifPresent(WorldPipePanelNetwork::tick); - } - } - - private void imc(final InterModEnqueueEvent enqueueEvent){ - TOPCompat.register(); - } - - private void attachWorldCap(final AttachCapabilitiesEvent t) { - if(t.getObject() != null){ - World w = t.getObject(); - if(w.isRemote) return; - t.addCapability(WORLD_CAP_ID, new WorldDMXNetwork()); - t.addCapability(SOCAPEX_NETWORK_ID, new WorldSocapexNetwork()); - } -// t.addCapability(PIPE_PANEL_NETWORK, new WorldPipePanelNetwork(t.getObject())); - } - - private void registerCapabilities() { - CapabilityManager.INSTANCE.register(IDMXProvider.class, new CapabilityStorageProvider<>(), DMXProvider::new); - CapabilityManager.INSTANCE.register(IDMXReceiver.class, new CapabilityStorageProvider<>(), DMXReceiver::new); - CapabilityManager.INSTANCE.register(WorldDMXNetwork.class, new CapabilityStorageProvider<>(), WorldDMXNetwork::new); - - CapabilityManager.INSTANCE.register(ISocapexReceiver.class, new CapabilityStorageProvider<>(), SocapexReceiver::new); - CapabilityManager.INSTANCE.register(ISocapexProvider.class, new CapabilityStorageProvider<>(), SocapexProvider::new); - CapabilityManager.INSTANCE.register(WorldSocapexNetwork.class, new CapabilityStorageProvider<>(), WorldSocapexNetwork::new); - - CapabilityManager.INSTANCE.register(ITheatricalPowerStorage.class, new CapabilityStorageProvider<>(), TheatricalPower::new); - } - - - private void setup(final FMLCommonSetupEvent event) { - LOGGER.info("Initialising Theatrical "); - registerCapabilities(); - MinecraftForge.EVENT_BUS.addGenericListener(World.class, this::attachWorldCap); - MinecraftForge.EVENT_BUS.addListener(this::worldTickEvent); - MinecraftForge.EVENT_BUS.addListener(this::shutdown); - } - - public void shutdown(FMLServerStoppedEvent serverStoppedEvent){ - getArtNetManager().shutdownAll(); - } - - - private void registerFixture(RegistryEvent.Register event){ - event.getRegistry().register(new FloodFixture()); - event.getRegistry().register(new MovingLightFixture()); - event.getRegistry().register(new FixtureFresnel()); - } - -} From 633601795b7e33bafd948755dd9f16fff487fe90 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:49:29 +0100 Subject: [PATCH 16/21] Add files via upload --- .../theatrical/TheatricalMod.java | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java diff --git a/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java b/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java new file mode 100644 index 0000000..a9d545a --- /dev/null +++ b/src/main/java/dev/theatricalmod/theatrical/TheatricalMod.java @@ -0,0 +1,151 @@ +package dev.theatricalmod.theatrical; + +import dev.theatricalmod.theatrical.api.capabilities.WorldSocapexNetwork; +import dev.theatricalmod.theatrical.api.capabilities.dmx.WorldDMXNetwork; +import dev.theatricalmod.theatrical.api.capabilities.dmx.provider.DMXProvider; +import dev.theatricalmod.theatrical.api.capabilities.dmx.provider.IDMXProvider; +import dev.theatricalmod.theatrical.api.capabilities.dmx.receiver.DMXReceiver; +import dev.theatricalmod.theatrical.api.capabilities.dmx.receiver.IDMXReceiver; +import dev.theatricalmod.theatrical.api.capabilities.power.ITheatricalPowerStorage; +import dev.theatricalmod.theatrical.api.capabilities.power.TheatricalPower; +import dev.theatricalmod.theatrical.api.capabilities.socapex.ISocapexProvider; +import dev.theatricalmod.theatrical.api.capabilities.socapex.ISocapexReceiver; +import dev.theatricalmod.theatrical.api.capabilities.socapex.SocapexProvider; +import dev.theatricalmod.theatrical.api.capabilities.socapex.SocapexReceiver; +import dev.theatricalmod.theatrical.api.fixtures.Fixture; +import dev.theatricalmod.theatrical.artnet.ArtNetManager; +import dev.theatricalmod.theatrical.block.TheatricalBlocks; +import dev.theatricalmod.theatrical.client.TheatricalClient; +import dev.theatricalmod.theatrical.client.gui.container.TheatricalContainers; +import dev.theatricalmod.theatrical.compat.top.TOPCompat; +import dev.theatricalmod.theatrical.entity.TheatricalEntities; +import dev.theatricalmod.theatrical.fixtures.FixtureFresnel; +import dev.theatricalmod.theatrical.fixtures.MovingLightFixture; +import dev.theatricalmod.theatrical.items.TheatricalItems; +import dev.theatricalmod.theatrical.network.TheatricalNetworkHandler; +import dev.theatricalmod.theatrical.tiles.TheatricalTiles; +import dev.theatricalmod.theatrical.util.CapabilityStorageProvider; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.capabilities.CapabilityManager; +import net.minecraftforge.event.AttachCapabilitiesEvent; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.event.TickEvent.Phase; +import net.minecraftforge.event.TickEvent.WorldTickEvent; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.config.ModConfig; +import net.minecraftforge.fml.config.ModConfig.Type; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; +import net.minecraftforge.fml.event.server.FMLServerStoppedEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +@Mod(TheatricalMod.MOD_ID) +public class TheatricalMod { + + public static final String MOD_ID = "theatrical"; + + public static final Logger LOGGER = LogManager.getLogger(); + + public static final ItemGroup theatricalItemGroup = new ItemGroup("theatrical") { + @Override + public ItemStack createIcon() { + return new ItemStack(TheatricalItems.DIMMER_RACK.get()); + } + }; + + public static TheatricalCommon proxy; + private static ArtNetManager artNetManager; + + private static final ResourceLocation WORLD_CAP_ID = new ResourceLocation(MOD_ID, "dmx_world_network"); + private static final ResourceLocation PIPE_PANEL_NETWORK = new ResourceLocation(MOD_ID, "pipe_panel_network"); + private static final ResourceLocation SOCAPEX_NETWORK_ID = new ResourceLocation(MOD_ID, "socapex_network"); + + + public TheatricalMod() { + //noinspection Convert2MethodRef + proxy = DistExecutor.runForDist(() -> () -> new TheatricalClient(), () -> () -> new TheatricalCommon()); + Fixture.createRegistry(); + ModLoadingContext.get().registerConfig(Type.COMMON, TheatricalConfigHandler.COMMON_SPEC); + ModLoadingContext.get().registerConfig(Type.CLIENT, TheatricalConfigHandler.CLIENT_SPEC); + IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); + eventBus.addListener(this::setup); + eventBus.addGenericListener(Fixture.class, this::registerFixture); + eventBus.addListener(this::imc); + TheatricalBlocks.BLOCKS.register(eventBus); + TheatricalItems.ITEMS.register(eventBus); + TheatricalTiles.TILES.register(eventBus); + TheatricalEntities.ENTITIES.register(eventBus); + TheatricalContainers.CONTAINERS.register(eventBus); + proxy.init(); + TheatricalNetworkHandler.init(); + artNetManager = new ArtNetManager(); + + } + + public static ArtNetManager getArtNetManager(){ + return artNetManager; + } + + private void worldTickEvent(WorldTickEvent event) { + if(event.phase == Phase.END){ + event.world.getCapability(WorldDMXNetwork.CAP).ifPresent(worldDMXNetwork -> worldDMXNetwork.tick(event.world)); + event.world.getCapability(WorldSocapexNetwork.CAP).ifPresent(worldSocapexNetwork -> worldSocapexNetwork.tick(event.world)); +// event.world.getCapability(WorldPipePanelNetwork.CAP).ifPresent(WorldPipePanelNetwork::tick); + } + } + + private void imc(final InterModEnqueueEvent enqueueEvent){ + TOPCompat.register(); + } + + private void attachWorldCap(final AttachCapabilitiesEvent t) { + if(t.getObject() != null){ + World w = t.getObject(); + if(w.isRemote) return; + t.addCapability(WORLD_CAP_ID, new WorldDMXNetwork()); + t.addCapability(SOCAPEX_NETWORK_ID, new WorldSocapexNetwork()); + } +// t.addCapability(PIPE_PANEL_NETWORK, new WorldPipePanelNetwork(t.getObject())); + } + + private void registerCapabilities() { + CapabilityManager.INSTANCE.register(IDMXProvider.class, new CapabilityStorageProvider<>(), DMXProvider::new); + CapabilityManager.INSTANCE.register(IDMXReceiver.class, new CapabilityStorageProvider<>(), DMXReceiver::new); + CapabilityManager.INSTANCE.register(WorldDMXNetwork.class, new CapabilityStorageProvider<>(), WorldDMXNetwork::new); + + CapabilityManager.INSTANCE.register(ISocapexReceiver.class, new CapabilityStorageProvider<>(), SocapexReceiver::new); + CapabilityManager.INSTANCE.register(ISocapexProvider.class, new CapabilityStorageProvider<>(), SocapexProvider::new); + CapabilityManager.INSTANCE.register(WorldSocapexNetwork.class, new CapabilityStorageProvider<>(), WorldSocapexNetwork::new); + + CapabilityManager.INSTANCE.register(ITheatricalPowerStorage.class, new CapabilityStorageProvider<>(), TheatricalPower::new); + } + + + private void setup(final FMLCommonSetupEvent event) { + LOGGER.info("Initialising Theatrical "); + registerCapabilities(); + MinecraftForge.EVENT_BUS.addGenericListener(World.class, this::attachWorldCap); + MinecraftForge.EVENT_BUS.addListener(this::worldTickEvent); + MinecraftForge.EVENT_BUS.addListener(this::shutdown); + } + + public void shutdown(FMLServerStoppedEvent serverStoppedEvent){ + getArtNetManager().shutdownAll(); + } + + + private void registerFixture(RegistryEvent.Register event){ + event.getRegistry().register(new MovingLightFixture()); + event.getRegistry().register(new FixtureFresnel()); + } + +} From ac94d23009a25fb066313c295bdcd996428a18cc Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:52:00 +0100 Subject: [PATCH 17/21] Update TheatricalBlocks.java --- .../dev/theatricalmod/theatrical/block/TheatricalBlocks.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java b/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java index d0e0256..6cc4676 100644 --- a/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java +++ b/src/main/java/dev/theatricalmod/theatrical/block/TheatricalBlocks.java @@ -39,7 +39,6 @@ public class TheatricalBlocks { public static final RegistryObject TRUSS = BLOCKS.register("truss", BlockTruss::new); public static final RegistryObject MOVING_LIGHT = BLOCKS.register("moving_light", BlockMovingLight::new); - public static final RegistryObject FLOOD_LIGHT = BLOCKS.register("flood_light", BlockMovingLight::new); public static final RegistryObject GENERIC_LIGHT = BLOCKS.register("generic_light", () -> new BlockGenericFixture(TheatricalFixtures.FRESNSEL)); public static final RegistryObject DMX_CABLE = BLOCKS.register("dmx_cable", () -> new BlockCable(CableType.DMX)); public static final RegistryObject SOCAPEX_CABLE = BLOCKS.register("socapex_cable", () -> new BlockCable(CableType.SOCAPEX)); From eb3f0c0f022bc7ed7d004f8070674bc573d56313 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:53:00 +0100 Subject: [PATCH 18/21] Update TheatricalItems.java --- .../java/dev/theatricalmod/theatrical/items/TheatricalItems.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java b/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java index 29a3fb1..fea8ef2 100644 --- a/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java +++ b/src/main/java/dev/theatricalmod/theatrical/items/TheatricalItems.java @@ -26,7 +26,6 @@ public class TheatricalItems { public static final RegistryObject IWB = ITEMS.register("iwb", () -> new BlockItem(TheatricalBlocks.IWB.get(), BASE_PROPERTIES)); public static final RegistryObject TEST_DMX = ITEMS.register("test_dmx", () -> new BlockItem(TheatricalBlocks.TEST_DMX.get(), BASE_PROPERTIES)); public static final RegistryObject MOVING_LIGHT = ITEMS.register("moving_light", () -> new BlockItem(TheatricalBlocks.MOVING_LIGHT.get(), BASE_PROPERTIES)); - public static final RegistryObject FLOOD_LIGHT = ITEMS.register("flood_light", () -> new BlockItem(TheatricalBlocks.FLOOD_LIGHT.get(), BASE_PROPERTIES)); public static final RegistryObject GENERIC_LIGHT = ITEMS.register("generic_light", () -> new BlockItem(TheatricalBlocks.GENERIC_LIGHT.get(), BASE_PROPERTIES)); public static final RegistryObject DIMMER_RACK = ITEMS.register("dimmer_rack", () -> new BlockItem(TheatricalBlocks.DIMMER_RACK.get(), BASE_PROPERTIES)); public static final RegistryObject SOCAPEX_DISTRIBUTION = ITEMS.register("socapex_distribution", () -> new BlockItem(TheatricalBlocks.SOCAPEX_DISTRIBUTION.get(), BASE_PROPERTIES)); From 74e1c32ea847774850755f24aded90dda8b5f5f4 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:53:09 +0100 Subject: [PATCH 19/21] Delete moving_head_static.json --- .../moving_light_wash/moving_head_static.json | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json deleted file mode 100644 index a173dbe..0000000 --- a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_static.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "textures": { - "0": "theatrical:block/moving_head_whole", - "2": "theatrical:block/moving_head_body", - "particle": "theatrical:block/light_side" - }, - "elements": [ - { - "name": "Base", - "from": [2, 0, 2], - "to": [14, 3, 14], - "faces": { - "north": {"uv": [3, 3, 6, 3.75], "texture": "#0"}, - "east": {"uv": [9, 3, 12, 3.75], "texture": "#0"}, - "south": {"uv": [9, 3, 12, 3.75], "texture": "#0"}, - "west": {"uv": [9, 3, 12, 3.75], "texture": "#0"}, - "up": {"uv": [3, 0, 6, 3], "texture": "#0"}, - "down": {"uv": [6, 0, 9, 3], "texture": "#0"} - } - } - ] -} \ No newline at end of file From 3b815eb3d32b288e737e2701165ceaf6aa624689 Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:53:26 +0100 Subject: [PATCH 20/21] Delete moving_head_whole.json --- .../moving_light_wash/moving_head_whole.json | 202 ------------------ 1 file changed, 202 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json deleted file mode 100644 index 682c200..0000000 --- a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_whole.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "credit": "Made with Blockbench", - "parent": "block/cube", - "textures": { - "0": "theatrical:block/light_side", - "2": "theatrical:block/moving_head_body", - "particle": "theatrical:block/light_side" - }, - "elements": [ - { - "name": "Base", - "from": [2, 0, 2], - "to": [14, 3, 14], - "faces": { - "north": {"uv": [0, 13, 16, 16], "texture": "#2"}, - "east": {"uv": [0, 13, 16, 16], "texture": "#2"}, - "south": {"uv": [0, 13, 16, 16], "texture": "#2"}, - "west": {"uv": [0, 13, 16, 16], "texture": "#2"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#0"} - } - }, - { - "name": "RotateBase", - "from": [4, 3, 5], - "to": [12, 4, 11], - "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, 0, 6, 1], "texture": "#0"}, - "up": {"uv": [5, 5, 11, 11], "texture": "#0"}, - "down": {"uv": [5, 5, 11, 11], "texture": "#0"} - } - }, - { - "name": "RightSide", - "from": [12, 3, 5], - "to": [12.5, 10, 11], - "faces": { - "north": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, - "east": {"uv": [5, 5, 11, 10], "texture": "#0"}, - "south": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, - "west": {"uv": [5, 5, 11, 10], "texture": "#0"}, - "up": {"uv": [0, 0, 0.5, 6], "texture": "#0"}, - "down": {"uv": [0, 0, 0.5, 6], "texture": "#0"} - } - }, - { - "name": "RightSide", - "from": [3.5, 3, 5], - "to": [4, 10, 11], - "faces": { - "north": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, - "east": {"uv": [5, 5, 11, 10], "texture": "#0"}, - "south": {"uv": [0, 0, 0.5, 5], "texture": "#0"}, - "west": {"uv": [5, 5, 11, 10], "texture": "#0"}, - "up": {"uv": [0, 0, 0.5, 6], "texture": "#0"}, - "down": {"uv": [0, 0, 0.5, 6], "texture": "#0"} - } - }, - { - "from": [7, 6, 7], - "to": [8, 7, 8], - "color": 2, - "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "up": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 1, 1], "texture": "#missing"} - } - }, - { - "name": "main", - "from": [4, 8, 6], - "to": [12, 11, 10], - "color": 3, - "faces": { - "north": {"uv": [0, 0, 8, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 4, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 8, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 4, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 8, 4], "texture": "#missing"}, - "down": {"uv": [0, 0, 8, 4], "texture": "#missing"} - } - }, - { - "name": "main", - "from": [5, 7, 6], - "to": [11, 8, 10], - "color": 3, - "faces": { - "north": {"uv": [0, 0, 6, 1], "texture": "#missing"}, - "east": {"uv": [0, 0, 4, 1], "texture": "#missing"}, - "south": {"uv": [0, 0, 6, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 4, 1], "texture": "#missing"}, - "up": {"uv": [0, 0, 6, 4], "texture": "#missing"}, - "down": {"uv": [0, 0, 6, 4], "texture": "#missing"} - } - }, - { - "name": "main", - "from": [5, 8, 5], - "to": [11, 11, 6], - "color": 3, - "faces": { - "north": {"uv": [0, 0, 6, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 6, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 6, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 6, 1], "texture": "#missing"} - } - }, - { - "name": "main", - "from": [6, 8, 4], - "to": [10, 11, 5], - "color": 3, - "faces": { - "north": {"uv": [0, 0, 4, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 4, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 4, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 4, 1], "texture": "#missing"} - } - }, - { - "name": "main", - "from": [5, 8, 10], - "to": [11, 11, 11], - "color": 3, - "faces": { - "north": {"uv": [0, 0, 6, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 6, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 6, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 6, 1], "texture": "#missing"} - } - }, - { - "name": "main", - "from": [6, 8, 11], - "to": [10, 11, 12], - "color": 3, - "faces": { - "north": {"uv": [0, 0, 4, 3], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "south": {"uv": [0, 0, 4, 3], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "up": {"uv": [0, 0, 4, 1], "texture": "#missing"}, - "down": {"uv": [0, 0, 4, 1], "texture": "#missing"} - } - } - ], - "display": { - "thirdperson_righthand": { - "translation": [0, 5.5, 0], - "scale": [0.7, 0.7, 0.7] - }, - "thirdperson_lefthand": { - "translation": [0, 5.5, 0], - "scale": [0.7, 0.7, 0.7] - }, - "firstperson_righthand": { - "rotation": [-73, 0, 0], - "translation": [0, 3.25, 3.25], - "scale": [0.7, 0.7, 0.7] - }, - "firstperson_lefthand": { - "rotation": [-73, 0, 0], - "translation": [0, 3.25, 3.25], - "scale": [0.7, 0.7, 0.7] - }, - "ground": { - "translation": [0, 4.5, 0] - }, - "gui": { - "scale": [0.8, 0.8, 0.8] - }, - "head": { - "translation": [0, 14.5, 0] - } - }, - "groups": [ - 0, - 1, - 2, - 3, - 4, - { - "name": "head", - "origin": [0, 0, 0], - "color": 0, - "children": [5, 6, 7, 8, 9, 10] - } - ] -} \ No newline at end of file From e2b1d264607c8415a39e99f7115412431fa7d9df Mon Sep 17 00:00:00 2001 From: Nicode <60321253+nicode3141@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:53:38 +0100 Subject: [PATCH 21/21] Delete moving_head_tilt.json --- .../moving_light_wash/moving_head_tilt.json | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json diff --git a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json b/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json deleted file mode 100644 index dbd4d61..0000000 --- a/src/main/resources/assets/theatrical/models/block/moving_light_wash/moving_head_tilt.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "theatrical:block/moving_head_whole", - "particle": "theatrical:block/moving_head_whole" - }, - "elements": [ - { - "name": "SpotBit", - "from": [5, 5, 5], - "to": [11, 14, 11], - "faces": { - "north": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, - "east": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, - "south": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, - "west": {"uv": [0, 5.25, 1.5, 7.5], "texture": "#0"}, - "up": {"uv": [1.5, 3.75, 3, 5.25], "texture": "#0"}, - "down": {"uv": [7.5, 6, 9, 7.5], "texture": "#0"} - } - } - ] -} \ No newline at end of file