Skip to content

Commit 85effda

Browse files
authored
Merge pull request #6
Add textures and PrismaC shape (rendering issues still present)
2 parents 07ce6ab + 494470d commit 85effda

14 files changed

+62
-11
lines changed

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ minecraft {
113113
}
114114
}
115115
}
116-
116+
spotless {
117+
java {
118+
toggleOffOn()
119+
}
120+
}
117121
apply from: "$rootDir/gradle/scripts/spotless.gradle"
118122

119123
dependencies {

src/main/java/net/neganote/monilabs/common/machine/multiblock/PrismaticCrucibleMachine.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,18 @@ public ManagedFieldHolder getFieldHolder() {
6060

6161
@Override
6262
public void onStructureInvalid() {
63-
super.onStructureInvalid();
6463
changeColorState(Color.RED);
64+
updateColoredActiveBlocks(false);
6565
fluidBlockOffsets.clear();
66+
super.onStructureInvalid();
6667
}
6768

6869
@Override
6970
public void onStructureFormed() {
7071
super.onStructureFormed();
7172

7273
saveOffsets();
74+
updateColoredActiveBlocks(true);
7375
}
7476

7577
@Override
@@ -113,17 +115,18 @@ public void afterWorking() {
113115
newKey = Color.getRandomColor();
114116
}
115117
changeColorState(Color.getColorFromKey(newKey));
118+
updateColoredActiveBlocks(true);
116119
}
117120

118121
private void changeColorState(Color newColor) {
119122
color = newColor;
120123
this.notifiableChromaContainer.setColor(newColor);
121124
updateSignal();
122-
updateColoredActiveBlocks();
123125
}
124126

125-
public void updateColoredActiveBlocks() {
126-
if (activeBlocks != null) {
127+
public void updateColoredActiveBlocks(boolean active) {
128+
super.updateActiveBlocks(active);
129+
if (active && activeBlocks != null) {
127130
for (Long pos : activeBlocks) {
128131
var blockPos = BlockPos.of(pos);
129132
var blockState = Objects.requireNonNull(getLevel()).getBlockState(blockPos);
@@ -139,8 +142,8 @@ public void updateColoredActiveBlocks() {
139142

140143
@Override
141144
public void updateActiveBlocks(boolean active) {
142-
super.updateActiveBlocks(active);
143-
updateColoredActiveBlocks();
145+
// Does Nothing LMAO, behavior changed
146+
// See updateColoredActiveBlocks
144147
}
145148

146149
// Stolen from LargeChemicalBathMachine

src/main/java/net/neganote/monilabs/data/MoniMachines.java

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.gregtechceu.gtceu.api.machine.MultiblockMachineDefinition;
55
import com.gregtechceu.gtceu.api.pattern.FactoryBlockPattern;
66
import com.gregtechceu.gtceu.client.util.TooltipHelper;
7+
import com.gregtechceu.gtceu.common.data.GTMaterials;
78

89
import net.minecraft.network.chat.Component;
910
import net.neganote.monilabs.MoniLabs;
@@ -29,16 +30,29 @@ public class MoniMachines {
2930
.recipeTypes(MoniRecipeTypes.PRISMATIC_CRUCIBLE_RECIPES)
3031

3132
.pattern(definition -> FactoryBlockPattern.start()
32-
.aisle("LLL", "LCL", "LPL")
33-
.aisle("LLL", "L#L", "L#L")
34-
.aisle("LLL", "LML", "LLL")
33+
// spotless:off
34+
.aisle("LLL LLL", " ", " ", " ", " ", " ", " ", " ", " ", " ")
35+
.aisle("LLLLL LLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F L L F ", " LLL LLL ")
36+
.aisle("LLLLLLLLLLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " FLL LLF ", " LLLL LLLL ")
37+
.aisle(" LLCCCCCCCLL ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " LLCCC CCCLL ", " LLLL LLLL ")
38+
.aisle(" LLCLLCLLCLL ", " LCL ", " C ", " ", " ", " ", " ", " LCL ", " LCLCCCLCL ", " LL LL ")
39+
.aisle(" LCLLLLLCL ", " L L ", " ", " ", " ", " ", " F ", " LLCLL ", " CCL LCC ", " ")
40+
.aisle(" LCCLLLCCL ", " C C ", " C C ", " ", " ", " ", " FPF ", " CCCCC ", " C C ", " ")
41+
.aisle(" LCLLLLLCL ", " L L ", " ", " ", " ", " ", " F ", " LLCLL ", " CCL LCC ", " ")
42+
.aisle(" LLCLLCLLCLL ", " LCL ", " C ", " ", " ", " ", " ", " LCL ", " LCLCCCLCL ", " LL LL ")
43+
.aisle(" LLCCCCCCCLL ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " LLCCC CCCLL ", " LLLL LLLL ")
44+
.aisle("LLLLLLMLLLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " FLL LLF ", " LLLL LLLL ")
45+
.aisle("LLLLL LLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F L L F ", " LLL LLL ")
46+
.aisle("LLL LLL", " ", " ", " ", " ", " ", " ", " ", " ", " ")
47+
// spotless:on
3548
.where('L', blocks(MoniBlocks.PRISMATIC_CONTAINMENT_LINING.get()).setMinGlobalLimited(9)
3649
.or(autoAbilities(definition.getRecipeTypes()))
3750
.or(autoAbilities(true, false, false)))
3851
.where('C', blocks(MoniBlocks.PRISMATIC_CASING.get()))
3952
.where('M', controller(blocks(definition.getBlock())))
4053
.where('P', blocks(PRISMATIC_FOCUS.get()))
41-
.where('#', any())
54+
.where('F', frames(GTMaterials.Neutronium))
55+
.where(' ', any())
4256
.build())
4357
.additionalDisplay((controller, components) -> {
4458
if (controller instanceof PrismaticCrucibleMachine prismMachine && controller.isFormed()) {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ldlib": {
3+
"connection": "monilabs:block/casings/prismatic_casing_ctm"
4+
}
5+
}
130 Bytes
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"ldlib": {
3+
"connection": "monilabs:block/casings/prismatic_casing_active_ctm"
4+
},
5+
"animation": {
6+
"interpolate": true,
7+
"frametime": 40
8+
}
9+
}
9.69 KB
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"animation": {
3+
"interpolate": true,
4+
"frametime": 40
5+
}
6+
}
590 Bytes
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ldlib": {
3+
"connection": "monilabs:block/casings/prismatic_casing_inactive_ctm"
4+
}
5+
}

0 commit comments

Comments
 (0)