Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the patterning #2689

Draft
wants to merge 64 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0b4392e
scuffed commit, more red than lines changed
vrejhead Jul 13, 2024
5de619b
IT COMPILES!!!! debugging time
vrejhead Jul 14, 2024
4ba4503
spotless n stuff
vrejhead Jul 14, 2024
4a45b62
it actually kinda works
vrejhead Jul 15, 2024
49bdb1d
caching and stuff
vrejhead Jul 15, 2024
2694a0a
spotless, deprecations, and not nulls
vrejhead Jul 15, 2024
96078bb
iterable, apparently this is like 20x faster than the blockpos iterable
vrejhead Jul 16, 2024
0419271
step 1 of 13918238091 to making previews work
vrejhead Jul 16, 2024
b0bdbd0
groundwork for hell
vrejhead Jul 16, 2024
f7e76e6
time for hell
vrejhead Jul 16, 2024
0f21cf7
free from terminal
vrejhead Jul 17, 2024
47a7737
shoutout to crtl-slash i love you
vrejhead Jul 17, 2024
f9e4ccb
startoffset stuff
vrejhead Jul 17, 2024
d9dc706
default impls
vrejhead Jul 17, 2024
45691e8
the third dimension
vrejhead Jul 18, 2024
9645487
use hashmap pt1 + spotless
vrejhead Jul 18, 2024
cc0e227
javadocs + default cause lazy + fix yo stuff
vrejhead Jul 19, 2024
3de4af5
the list thing works + hopefully lbb works
vrejhead Jul 20, 2024
96d472c
hopefully it works fr(still didn't test)
vrejhead Jul 20, 2024
f0bd6dd
:reading:
vrejhead Jul 20, 2024
6c82b0a
smallest arch commit
vrejhead Aug 3, 2024
8f7f1c1
misc stuff
vrejhead Aug 3, 2024
fc20c37
reversed patterns
vrejhead Aug 11, 2024
5e182d6
cleanroom part 0
vrejhead Aug 12, 2024
07519df
assembly line and cleanroom
vrejhead Aug 12, 2024
9b50b62
assembly line and cleanroom but they work
vrejhead Aug 14, 2024
22e979b
central monitor stuff
vrejhead Aug 15, 2024
25abc28
java 11 method :sob:
vrejhead Aug 15, 2024
f09a0b6
charcoal pile igniter and refactor
vrejhead Aug 16, 2024
d65a1a7
persistent nbt data
vrejhead Aug 17, 2024
f8f014c
default pattern got real
vrejhead Aug 17, 2024
9fd8202
arch code is like an onion......
vrejhead Aug 18, 2024
ec3f7f8
zpotlezz
vrejhead Aug 18, 2024
6842647
predicate tooltips and candidates
vrejhead Aug 18, 2024
0ba18a3
in world preview part 1
vrejhead Aug 18, 2024
b8ce93f
part 2 ft. extended rotation
vrejhead Aug 18, 2024
d0abbd8
cleanup
vrejhead Aug 19, 2024
33f2c96
relative direction refactor(central monitor doesnt work again, as exp…
vrejhead Aug 20, 2024
82d30ed
central monitor but it works(and half the things that didn't work bef…
vrejhead Aug 21, 2024
5f49bc7
autobuild but it doesn't work(and dot blocks)
vrejhead Aug 26, 2024
dd9455a
spotless yet again
vrejhead Aug 28, 2024
088d6eb
fix conflicts, and part 1 of autobuild
vrejhead Sep 8, 2024
1b3368d
multi aisling
vrejhead Sep 23, 2024
befb7cf
but it works
vrejhead Sep 23, 2024
cc5211b
generify default pattern generation, and multi aisles
vrejhead Sep 28, 2024
d60c59b
the worst code this has even seen
vrejhead Oct 13, 2024
8ab848f
spotlessApply spotlessApply spotlessApply spotlessApply spotlessApply…
vrejhead Oct 13, 2024
1df1c2d
the calm before the refactor
vrejhead Dec 22, 2024
fbc55ac
"it compiles at least"
vrejhead Dec 23, 2024
36863b7
"it works”
vrejhead Dec 24, 2024
8f9537d
the todo crusade
vrejhead Dec 25, 2024
40c8276
MultiblockShapeInfo is half dead
vrejhead Dec 26, 2024
99c6dcd
spotless and stuff
vrejhead Dec 26, 2024
d3c6865
bruh
vrejhead Dec 26, 2024
1c15477
addressing the deprecations
vrejhead Dec 26, 2024
7d57405
not beating the n squared allegations
vrejhead Dec 27, 2024
0be978c
vrej
vrejhead Dec 27, 2024
fc6acde
:moyai:
vrejhead Dec 27, 2024
b2eebd8
lowercase
vrejhead Dec 27, 2024
f0798f1
constant + oops
vrejhead Dec 27, 2024
a58923f
how it feels to spotless
vrejhead Dec 27, 2024
98979da
the great unboxing
vrejhead Dec 27, 2024
14ae70e
caught
vrejhead Dec 28, 2024
c8ba33f
stuff
vrejhead Jan 1, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static int assignId() {
public static final int UPDATE_STRUCTURE_SIZE = assignId();
public static final int STRUCTURE_FORMED = assignId();
public static final int VARIANT_RENDER_UPDATE = assignId();
public static final int RENDER_UPDATE = assignId();
public static final int IS_TAPED = assignId();
public static final int STORE_MAINTENANCE = assignId();
public static final int STORE_TAPED = assignId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

import net.minecraft.util.math.BlockPos;

import java.util.List;
import java.util.NavigableSet;

/**
* intended for use in conjunction with {@link gregtech.api.capability.impl.DistillationTowerLogicHandler}
* use with distillation tower type multiblocks
*/
public interface IDistillationTower {

List<IMultiblockPart> getMultiblockParts();
NavigableSet<IMultiblockPart> getMultiblockParts();

BlockPos getPos();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package gregtech.api.capability;

import gregtech.api.metatileentity.multiblock.MultiblockControllerBase;

public interface IMultiblockController {

boolean isStructureFormed();
boolean isStructureFormed(String name);
vrejhead marked this conversation as resolved.
Show resolved Hide resolved

default boolean isStructureFormed() {
return isStructureFormed(MultiblockControllerBase.DEFAULT_STRUCTURE);
}

default boolean isStructureObstructed() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import gregtech.api.capability.IMultipleTankHandler;
import gregtech.api.metatileentity.multiblock.IMultiblockAbilityPart;
import gregtech.api.metatileentity.multiblock.MultiblockAbility;
import gregtech.api.pattern.BlockPattern;
import gregtech.api.pattern.pattern.BlockPattern;
import gregtech.api.util.GTLog;
import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityMultiblockPart;

Expand Down Expand Up @@ -63,7 +63,7 @@ public boolean applyFluidToOutputs(List<FluidStack> fluids, boolean doFill) {
* @param structurePattern the structure pattern
*/
public void determineLayerCount(@NotNull BlockPattern structurePattern) {
this.setLayerCount(structurePattern.formedRepetitionCount[1] + 1);
this.setLayerCount(structurePattern.getRepetitionCount(1) + 1);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
package gregtech.api.metatileentity.multiblock;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface IMultiblockPart {

boolean isAttachedToMultiBlock();

void addToMultiBlock(MultiblockControllerBase controllerBase);
default void addToMultiBlock(@NotNull MultiblockControllerBase controllerBase) {
addToMultiBlock(controllerBase, MultiblockControllerBase.DEFAULT_STRUCTURE);
}

void addToMultiBlock(@NotNull MultiblockControllerBase controllerBase, @NotNull String substructureName);

void removeFromMultiBlock(@NotNull MultiblockControllerBase controllerBase);

void removeFromMultiBlock(MultiblockControllerBase controllerBase);
/**
* Gets how many multiblocks are currently using the part.
*/
int getWallshareCount();

/**
* Gets the name of the substructure the part is attached to, or null if it is not attached.
*/
@Nullable
String getSubstructureName();

boolean canPartShare(MultiblockControllerBase target, String substructureName);
vrejhead marked this conversation as resolved.
Show resolved Hide resolved

default boolean canPartShare(MultiblockControllerBase target) {
return canPartShare(target, MultiblockControllerBase.DEFAULT_STRUCTURE);
}

default boolean canPartShare() {
return true;
Expand Down
Loading
Loading