Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ minecraft {
}
}
}

spotless {
java {
toggleOffOn()
}
}
apply from: "$rootDir/gradle/scripts/spotless.gradle"

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,18 @@ public ManagedFieldHolder getFieldHolder() {

@Override
public void onStructureInvalid() {
super.onStructureInvalid();
changeColorState(Color.RED);
updateColoredActiveBlocks(false);
fluidBlockOffsets.clear();
super.onStructureInvalid();
}

@Override
public void onStructureFormed() {
super.onStructureFormed();

saveOffsets();
updateColoredActiveBlocks(true);
}

@Override
Expand Down Expand Up @@ -113,17 +115,18 @@ public void afterWorking() {
newKey = Color.getRandomColor();
}
changeColorState(Color.getColorFromKey(newKey));
updateColoredActiveBlocks(true);
}

private void changeColorState(Color newColor) {
color = newColor;
this.notifiableChromaContainer.setColor(newColor);
updateSignal();
updateColoredActiveBlocks();
}

public void updateColoredActiveBlocks() {
if (activeBlocks != null) {
public void updateColoredActiveBlocks(boolean active) {
super.updateActiveBlocks(active);
if (active && activeBlocks != null) {
for (Long pos : activeBlocks) {
var blockPos = BlockPos.of(pos);
var blockState = Objects.requireNonNull(getLevel()).getBlockState(blockPos);
Expand All @@ -139,8 +142,8 @@ public void updateColoredActiveBlocks() {

@Override
public void updateActiveBlocks(boolean active) {
super.updateActiveBlocks(active);
updateColoredActiveBlocks();
// Does Nothing LMAO, behavior changed
// See updateColoredActiveBlocks
}

// Stolen from LargeChemicalBathMachine
Expand Down
22 changes: 18 additions & 4 deletions src/main/java/net/neganote/monilabs/data/MoniMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.gregtechceu.gtceu.api.machine.MultiblockMachineDefinition;
import com.gregtechceu.gtceu.api.pattern.FactoryBlockPattern;
import com.gregtechceu.gtceu.client.util.TooltipHelper;
import com.gregtechceu.gtceu.common.data.GTMaterials;

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

.pattern(definition -> FactoryBlockPattern.start()
.aisle("LLL", "LCL", "LPL")
.aisle("LLL", "L#L", "L#L")
.aisle("LLL", "LML", "LLL")
// spotless:off
.aisle("LLL LLL", " ", " ", " ", " ", " ", " ", " ", " ", " ")
.aisle("LLLLL LLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F L L F ", " LLL LLL ")
.aisle("LLLLLLLLLLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " FLL LLF ", " LLLL LLLL ")
.aisle(" LLCCCCCCCLL ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " LLCCC CCCLL ", " LLLL LLLL ")
.aisle(" LLCLLCLLCLL ", " LCL ", " C ", " ", " ", " ", " ", " LCL ", " LCLCCCLCL ", " LL LL ")
.aisle(" LCLLLLLCL ", " L L ", " ", " ", " ", " ", " F ", " LLCLL ", " CCL LCC ", " ")
.aisle(" LCCLLLCCL ", " C C ", " C C ", " ", " ", " ", " FPF ", " CCCCC ", " C C ", " ")
.aisle(" LCLLLLLCL ", " L L ", " ", " ", " ", " ", " F ", " LLCLL ", " CCL LCC ", " ")
.aisle(" LLCLLCLLCLL ", " LCL ", " C ", " ", " ", " ", " ", " LCL ", " LCLCCCLCL ", " LL LL ")
.aisle(" LLCCCCCCCLL ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " C C ", " LLCCC CCCLL ", " LLLL LLLL ")
.aisle("LLLLLLMLLLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " FLL LLF ", " LLLL LLLL ")
.aisle("LLLLL LLLLL", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F F ", " F L L F ", " LLL LLL ")
.aisle("LLL LLL", " ", " ", " ", " ", " ", " ", " ", " ", " ")
// spotless:on
.where('L', blocks(MoniBlocks.PRISMATIC_CONTAINMENT_LINING.get()).setMinGlobalLimited(9)
.or(autoAbilities(definition.getRecipeTypes()))
.or(autoAbilities(true, false, false)))
.where('C', blocks(MoniBlocks.PRISMATIC_CASING.get()))
.where('M', controller(blocks(definition.getBlock())))
.where('P', blocks(PRISMATIC_FOCUS.get()))
.where('#', any())
.where('F', frames(GTMaterials.Neutronium))
.where(' ', any())
.build())
.additionalDisplay((controller, components) -> {
if (controller instanceof PrismaticCrucibleMachine prismMachine && controller.isFormed()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ldlib": {
"connection": "monilabs:block/casings/prismatic_casing_ctm"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ldlib": {
"connection": "monilabs:block/casings/prismatic_casing_active_ctm"
},
"animation": {
"interpolate": true,
"frametime": 40
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"animation": {
"interpolate": true,
"frametime": 40
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ldlib": {
"connection": "monilabs:block/casings/prismatic_casing_inactive_ctm"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...sources/assets/monilabs/textures/block/casings/prismatic_containment_lining.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ldlib": {
"connection": "monilabs:block/casings/prismatic_containment_lining_ctm"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.