-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
complete rewrite of how dmx & artnet work
RDM over artnet, now supported!
- Loading branch information
Showing
51 changed files
with
2,033 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
common/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// 1.20.2 2023-12-11T00:30:48.3049893 Languages: en_us | ||
dba74bb7077ce77df26626ba0432be702cf27329 assets/theatrical/lang/en_us.json | ||
// 1.20.2 2024-05-27T10:52:44.9149037 Languages: en_us | ||
008623f80efad0b7b210bfcdcd1374bc1dd74f63 assets/theatrical/lang/en_us.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package dev.imabad.theatrical; | ||
|
||
public class Constants { | ||
public static final short MANUFACTURER_ID = 0x7FF0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
common/src/main/java/dev/imabad/theatrical/api/dmx/DMXConsumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
package dev.imabad.theatrical.api.dmx; | ||
|
||
import ch.bildspur.artnet.rdm.RDMDeviceId; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
public interface DMXConsumer { | ||
|
||
int getChannelCount(); | ||
|
||
int getChannelStart(); | ||
|
||
int getUniverse(); | ||
|
||
void consume(byte[] dmxValues); | ||
|
||
RDMDeviceId getDeviceId(); | ||
|
||
int getDeviceTypeId(); | ||
|
||
String getModelName(); | ||
|
||
ResourceLocation getFixtureId(); | ||
|
||
int getActivePersonality(); | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
common/src/main/java/dev/imabad/theatrical/api/dmx/DMXPersonality.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package dev.imabad.theatrical.api.dmx; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class DMXPersonality { | ||
private final int channelCount; | ||
private final String description; | ||
private final List<DMXSlot> slots; | ||
|
||
public DMXPersonality(int channelCount, String description){ | ||
this.channelCount = channelCount; | ||
this.description = description; | ||
this.slots = new ArrayList<>(); | ||
} | ||
|
||
public DMXPersonality addSlot(DMXSlot slot){ | ||
slots.add(slot); | ||
return this; | ||
} | ||
|
||
public DMXPersonality addSlot(int position, DMXSlot slot){ | ||
slots.add(position, slot); | ||
return this; | ||
} | ||
|
||
public int getChannelCount() { | ||
return channelCount; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public List<DMXSlot> getSlots() { | ||
return slots; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
common/src/main/java/dev/imabad/theatrical/api/dmx/DMXSlot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.imabad.theatrical.api.dmx; | ||
|
||
import ch.bildspur.artnet.rdm.RDMSlotID; | ||
import ch.bildspur.artnet.rdm.RDMSlotType; | ||
|
||
public record DMXSlot(String label, RDMSlotType slotType, RDMSlotID slotID) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.