Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
12aaab1
start of patterns
YoungOnionMC Feb 22, 2025
48a4496
erm mots?
YoungOnionMC Feb 26, 2025
a3572e7
buddy
YoungOnionMC Feb 26, 2025
ffa9b0e
predicate nonsense
YoungOnionMC Feb 27, 2025
ab7fc1b
structure forming logic
YoungOnionMC Feb 28, 2025
f92b9e0
activeblock storing
YoungOnionMC Mar 7, 2025
e4ed154
method renaming
YoungOnionMC Mar 7, 2025
edf515b
imports
YoungOnionMC Mar 7, 2025
c11c5a6
start of structure forming in game
YoungOnionMC Mar 8, 2025
25fe550
forgor a file
YoungOnionMC Mar 8, 2025
32d0fb4
edit upwards facing
YoungOnionMC Mar 8, 2025
1bcf1e5
erm
YoungOnionMC Apr 23, 2025
ee07930
multiblock code :)
YoungOnionMC May 14, 2025
cf7bbff
the multiblock state partial works, parts are dumb
YoungOnionMC May 15, 2025
d08f9c2
structure forming and unforming works :lets: wall sharing is kinda cu…
YoungOnionMC May 27, 2025
c0cb953
predicate printing :)
YoungOnionMC May 27, 2025
d6f7e67
package renaming
YoungOnionMC May 27, 2025
6119c2e
Merge branch '1.20.1' of https://github.com/GregTechCEu/GregTech-Mode…
YoungOnionMC May 27, 2025
c90fcaf
merge dn
YoungOnionMC May 27, 2025
bdfdd1d
global to relative stuff
YoungOnionMC May 27, 2025
c435a0f
removal of BetterBlockPos, use MutableBlockPos instead :)
YoungOnionMC May 28, 2025
b02ef7d
101 dalmatians
YoungOnionMC May 28, 2025
85fb7f6
SinglePredicateError Type enumeration and CBI npe
YoungOnionMC May 28, 2025
684c343
thread locking stuff(doesnt work), use embedded level tinter
YoungOnionMC May 29, 2025
cee618d
stuff still doesnt work
YoungOnionMC May 29, 2025
2fee63d
stuff works again, fixed recipe logic as well
YoungOnionMC May 29, 2025
60df005
Substructures work BAYBEE :lets::lets::lets::lets::lets::lets::lets::…
YoungOnionMC May 30, 2025
5158d0a
Expandable patterns(cleanroom) works, current bug when reloading world
YoungOnionMC May 30, 2025
f8c6a67
Helper Funcs for OriginOffset, fixing certain world load orders for p…
YoungOnionMC Jun 1, 2025
485ae01
fix recipe logic resetting on world load
YoungOnionMC Jun 6, 2025
31717e9
shruge
YoungOnionMC Jun 6, 2025
88b290e
basic autobuilding, fixed substructure validation
YoungOnionMC Jun 10, 2025
1973002
fix global cache values being double counted :pepela:
YoungOnionMC Jun 10, 2025
bb3db55
spotless just for neganote
YoungOnionMC Jun 10, 2025
057d8ea
auto building substructures
YoungOnionMC Jun 10, 2025
5edbb56
predicate cleanup
YoungOnionMC Jun 11, 2025
5893992
java doc
YoungOnionMC Jun 14, 2025
e0adecb
multi edge cases and anchor position setting
YoungOnionMC Jun 14, 2025
500126d
predicate equality, multi line predicate error info, fix MOST multis …
YoungOnionMC Jun 15, 2025
99c9df2
move multi aisle int array to an actual data class, fix slight error …
YoungOnionMC Jun 15, 2025
5fa0748
fix aisle repetition for extruder
YoungOnionMC Jun 15, 2025
dacb3a3
fix autobuilding machines to correctly orient post placement
YoungOnionMC Jun 15, 2025
e1bb831
expandable pattern autobuilder, get data bank, research station worki…
YoungOnionMC Jun 16, 2025
65bf8eb
completely fix and rewrite the charcoal pile ignitor update logic, us…
YoungOnionMC Jun 16, 2025
cdc7723
edit miners and drills to use the frame predicate instead of frame bl…
YoungOnionMC Jun 16, 2025
2ae0728
various error reporting whenever a multiblock tries to invalidate
YoungOnionMC Jun 16, 2025
d70f4e5
more CPI fixing
YoungOnionMC Jun 16, 2025
2718bf1
spotless dn
YoungOnionMC Jun 16, 2025
abec38b
fix the "randomness" of predicates for candidate matching
YoungOnionMC Jun 17, 2025
745ed40
Refactor TraceabilityPredicate->PatternPredicate, SimplePredicate->Ba…
YoungOnionMC Jun 19, 2025
0b44a01
Merge branch '1.20.1-v8.0.0' of https://github.com/GregTechCEu/GregTe…
YoungOnionMC Jan 19, 2026
a0517eb
merge 8.0.0 into the patterning, clean up relative direction and get …
YoungOnionMC Jan 20, 2026
51e5232
fix up model rotations
YoungOnionMC Jan 21, 2026
518c80a
add back test machine, update mui, fix up steam forge hammer, steam s…
YoungOnionMC May 16, 2026
fb7294b
update to use progress drawables
YoungOnionMC May 17, 2026
d959ad4
magnet cts fixes and button sizing
Spicierspace153 May 17, 2026
02f4dd2
small padding + datagen
YoungOnionMC May 17, 2026
7262349
Merge remote-tracking branch 'origin/yo/mui2/covers-p3' into yo/mui2/…
YoungOnionMC May 17, 2026
3c732e3
enumrowbuilder fix
Spicierspace153 May 17, 2026
d8dbc82
Merge branch 'yo/mui2/covers-p3' of github.com:GregTechCEu/GregTech-M…
Spicierspace153 May 17, 2026
932bf41
some more cover stuff
YoungOnionMC May 17, 2026
69de4cb
Merge remote-tracking branch 'origin/mui2-refactor' into yo/the-patte…
YoungOnionMC May 17, 2026
db013c1
start of mui merge into multiblocks
YoungOnionMC May 17, 2026
9112292
Merge branch 'yo/mui2/covers-p3' of https://github.com/GregTechCEu/Gr…
YoungOnionMC May 17, 2026
f9cddb0
Fix cover removal (#4841)
screret May 17, 2026
4909721
start of mui merge into multiblocks
YoungOnionMC May 17, 2026
002a279
requested changes
YoungOnionMC May 17, 2026
a6e0135
urrrg, gets rid of async structure checking
YoungOnionMC May 18, 2026
10730a8
removal of try lock
YoungOnionMC May 18, 2026
24b9a89
remove reentrant lock
YoungOnionMC May 18, 2026
4ef4f61
Update Sync BE neighborChanged (#4846)
YoungOnionMC May 18, 2026
cdec7ce
Merge branch '1.20.1' of https://github.com/GregTechCEu/GregTech-Mode…
YoungOnionMC May 18, 2026
e02fba2
attempt to sync pattern error and pattern state
YoungOnionMC May 18, 2026
3d7050d
another sync test
YoungOnionMC May 18, 2026
9f35387
another sync test 2
YoungOnionMC May 18, 2026
4efb464
another sync test 3
YoungOnionMC May 18, 2026
3c50e91
Add ISyncAnnotated for syncable data classes and clean up some other …
gustovafing May 18, 2026
2d6057f
Move away from sync system to MUI sync
jurrejelle May 18, 2026
73492ce
model orientation working :)
YoungOnionMC May 19, 2026
f82ba93
attempt
YoungOnionMC May 19, 2026
658bedd
Small changes to BE loading (#4851)
gustovafing May 19, 2026
9fe2f9a
Merge remote-tracking branch 'origin/1.20.1' into yo/the-patterning
YoungOnionMC May 19, 2026
0eda00d
Merge remote-tracking branch 'origin/1.20.1' into yo/the-patterning
YoungOnionMC May 19, 2026
9db1f75
attempt 2
YoungOnionMC May 19, 2026
bf47a5f
fix data migration
gustovafing May 20, 2026
41cce3c
oops
gustovafing May 20, 2026
5860e59
Fix trait holder not synced (#4853)
gustovafing May 20, 2026
c5e457a
add extra check for transformers (#4855)
gustovafing May 20, 2026
f27d887
get data fixer to work, add some info to simple error predicate repor…
YoungOnionMC May 20, 2026
3c3970f
add multiple structure pattern defining to the multiblock builder, re…
YoungOnionMC May 20, 2026
01f6727
Merge remote-tracking branch 'origin/1.20.1' into yo/the-patterning
YoungOnionMC May 20, 2026
023a782
start of multiblock pattern preview widget
YoungOnionMC May 21, 2026
b32f9ea
menu?
YoungOnionMC May 23, 2026
48d8340
cleanup
YoungOnionMC May 23, 2026
e35cf04
Merge remote-tracking branch 'origin/mui2-refactor' into yo/the-patte…
YoungOnionMC May 23, 2026
6a771c4
start of menu in menu stuff for multiblock previewing, change candida…
YoungOnionMC May 23, 2026
57e406d
update definition
YoungOnionMC May 24, 2026
ea869ca
predicate priority system start, add aisle sliders to the pattern pre…
YoungOnionMC May 27, 2026
cf4945b
add todo
YoungOnionMC May 27, 2026
f902c81
Syncing/redrawing for the schema widget
jurrejelle May 27, 2026
bef2049
block list, seperate out user defined vs predicate defined block infos
YoungOnionMC May 28, 2026
707af7d
fix multi parts being unformed visually on world load
YoungOnionMC May 28, 2026
e7c2fcd
test out a mutable schema so that you can set the BE dynamically
YoungOnionMC May 28, 2026
ea08b4f
grrrr
YoungOnionMC May 28, 2026
e4dd606
test 4?
YoungOnionMC May 28, 2026
7014fab
erm 2
YoungOnionMC May 28, 2026
8e308e1
the annotating
gustovafing May 29, 2026
92cf8ef
the annotating part 2
gustovafing May 29, 2026
f08d20b
the annotating part 3
gustovafing May 29, 2026
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
53 changes: 42 additions & 11 deletions docs/content/Development/Data-Sync-System/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,59 @@ title: "Usage"

### Registering classes with the sync system

At the core of the system is the interface `ISyncManaged`, which represents a class that to be synchronised with the client or saved.
At the core of the system are the `ISyncManaged` and `ISyncAnnotated` interfaces, which allow for their fields to have sync annotations..
All block entities which should be synchronised or saved must extend the abstract class `ManagedSyncBlockEntity`.

`ISyncManaged` should be used for classes with any form of persistent state, and cannot be instantiated or reassigned.<br>
`ISyncAnnotated` should be used for record-like classes that hold data, and must define a no-args constructor.


!!! warning
Block entities that inherit `ManagedSyncBlockEntity` must call `ManagedSyncBlockEntity::updateTick`***every tick*** within their ticker, or they will not be saved.

#### Example of `ISyncManaged` usage
```java
class MySyncObject implements ISyncManaged {
// Any class that directly implements ISyncManaged must have the following:

// Any class that directly implements ISyncManaged must have a SyncDataHolder:
@Getter
protected final SyncDataHolder syncDataHolder = new SyncDataHolder(this);

// ISyncManaged objects should be attached to a parent sync managed object,
// unless the sync managed object is a blockentity
// ISyncManaged classes must implement a getter for their parent sync object
@Getter
private final MetaMachine parentSyncObject;

@SaveField
@SyncToClient
private BlockPos syncPos;

@SaveField
@SyncToClient
private ExampleSyncAnnotated syncAnnotatedField;

public MySyncObject(MetaMachine machine) {
this.parentSyncObject = machine;
}

public void doChanges() {

syncPos = BlockPos.ZERO;
// Client sync fields do not update automatically.
getSyncDataHolder().markClientSyncFieldDirty("syncPos")

syncAnnotatedField.someValue = 10;
/*
* Because ISyncAnnotated classes do not manage their own sync state,
* updating a field in an ISyncAnnotated class requires the parent field to be marked as changed.
*/
getSyncDataHolder().markClientSyncFieldDirty("syncAnnotatedField");
}

/**
* Function called when the SyncDataHolder requests a rerender
*/
void scheduleRenderUpdate();

/**
* Function called to notify the server that this object has been updated and must be synced to clients
*/
void markAsChanged();
private static class ExampleSyncAnnotated implements ISyncAnnotated {
public int someValue = 0;
}
}
```

Expand Down
7 changes: 3 additions & 4 deletions docs/content/Development/General-Topics/Tick-Updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ Lets look at how we implement it in `QuantumChest`.
@Override
public void onLoad() {
super.onLoad();
if (getLevel() instanceof ServerLevel serverLevel) {
// you cant call ItemTransferHelper.getItemTransfer while chunk is loading, so lets defer it next tick.
serverLevel.getServer().tell(new TickTask(0, this::updateAutoOutputSubscription));
}

// you cant call ItemTransferHelper.getItemTransfer while chunk is loading, so lets defer it next tick.
scheduleForNextServerTick(this::updateAutoOutputSubscription);
// add a listener to listen the changes of inner inventory. (for ex, if inventory not empty anymore, we may need to unpdate logic)
exportItemSubs = cache.addChangedListener(this::updateAutoOutputSubscription);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"variants": {
"facing=down,upwards_facing=down": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=down,upwards_facing=east": {
"gtceu:z": 90,
"model": "gtceu:block/machine/active_transformer",
Expand All @@ -14,56 +17,77 @@
"model": "gtceu:block/machine/active_transformer",
"x": 90
},
"facing=down,upwards_facing=up": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=down,upwards_facing=west": {
"gtceu:z": 270,
"model": "gtceu:block/machine/active_transformer",
"x": 90
},
"facing=east,upwards_facing=east": {
"gtceu:z": 270,
"facing=east,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/active_transformer",
"y": 90
},
"facing=east,upwards_facing=east": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=east,upwards_facing=north": {
"gtceu:z": 270,
"model": "gtceu:block/machine/active_transformer",
"y": 90
},
"facing=east,upwards_facing=south": {
"gtceu:z": 180,
"gtceu:z": 90,
"model": "gtceu:block/machine/active_transformer",
"y": 90
},
"facing=east,upwards_facing=west": {
"gtceu:z": 90,
"facing=east,upwards_facing=up": {
"model": "gtceu:block/machine/active_transformer",
"y": 90
},
"facing=east,upwards_facing=west": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=north,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/active_transformer"
},
"facing=north,upwards_facing=east": {
"gtceu:z": 270,
"gtceu:z": 90,
"model": "gtceu:block/machine/active_transformer"
},
"facing=north,upwards_facing=north": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=north,upwards_facing=south": {
"gtceu:z": 180,
"model": "gtceu:block/machine/active_transformer"
},
"facing=north,upwards_facing=up": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=north,upwards_facing=west": {
"gtceu:z": 90,
"gtceu:z": 270,
"model": "gtceu:block/machine/active_transformer"
},
"facing=south,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/active_transformer",
"y": 180
},
"facing=south,upwards_facing=east": {
"gtceu:z": 270,
"model": "gtceu:block/machine/active_transformer",
"y": 180
},
"facing=south,upwards_facing=north": {
"model": "gtceu:block/machine/active_transformer",
"y": 180
"model": "gtceu:block/machine/active_transformer"
},
"facing=south,upwards_facing=south": {
"gtceu:z": 180,
"model": "gtceu:block/machine/active_transformer"
},
"facing=south,upwards_facing=up": {
"model": "gtceu:block/machine/active_transformer",
"y": 180
},
Expand All @@ -72,6 +96,9 @@
"model": "gtceu:block/machine/active_transformer",
"y": 180
},
"facing=up,upwards_facing=down": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=up,upwards_facing=east": {
"gtceu:z": 90,
"model": "gtceu:block/machine/active_transformer",
Expand All @@ -86,29 +113,38 @@
"model": "gtceu:block/machine/active_transformer",
"x": 270
},
"facing=up,upwards_facing=up": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=up,upwards_facing=west": {
"gtceu:z": 270,
"model": "gtceu:block/machine/active_transformer",
"x": 270
},
"facing=west,upwards_facing=east": {
"gtceu:z": 270,
"facing=west,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/active_transformer",
"y": 270
},
"facing=west,upwards_facing=east": {
"model": "gtceu:block/machine/active_transformer"
},
"facing=west,upwards_facing=north": {
"gtceu:z": 90,
"model": "gtceu:block/machine/active_transformer",
"y": 270
},
"facing=west,upwards_facing=south": {
"gtceu:z": 180,
"gtceu:z": 270,
"model": "gtceu:block/machine/active_transformer",
"y": 270
},
"facing=west,upwards_facing=west": {
"gtceu:z": 90,
"facing=west,upwards_facing=up": {
"model": "gtceu:block/machine/active_transformer",
"y": 270
},
"facing=west,upwards_facing=west": {
"model": "gtceu:block/machine/active_transformer"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"variants": {
"facing=down,upwards_facing=down": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=down,upwards_facing=east": {
"gtceu:z": 90,
"model": "gtceu:block/machine/advanced_monitor",
Expand All @@ -14,56 +17,77 @@
"model": "gtceu:block/machine/advanced_monitor",
"x": 90
},
"facing=down,upwards_facing=up": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=down,upwards_facing=west": {
"gtceu:z": 270,
"model": "gtceu:block/machine/advanced_monitor",
"x": 90
},
"facing=east,upwards_facing=east": {
"gtceu:z": 270,
"facing=east,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/advanced_monitor",
"y": 90
},
"facing=east,upwards_facing=east": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=east,upwards_facing=north": {
"gtceu:z": 270,
"model": "gtceu:block/machine/advanced_monitor",
"y": 90
},
"facing=east,upwards_facing=south": {
"gtceu:z": 180,
"gtceu:z": 90,
"model": "gtceu:block/machine/advanced_monitor",
"y": 90
},
"facing=east,upwards_facing=west": {
"gtceu:z": 90,
"facing=east,upwards_facing=up": {
"model": "gtceu:block/machine/advanced_monitor",
"y": 90
},
"facing=east,upwards_facing=west": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=north,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=north,upwards_facing=east": {
"gtceu:z": 270,
"gtceu:z": 90,
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=north,upwards_facing=north": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=north,upwards_facing=south": {
"gtceu:z": 180,
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=north,upwards_facing=up": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=north,upwards_facing=west": {
"gtceu:z": 90,
"gtceu:z": 270,
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=south,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/advanced_monitor",
"y": 180
},
"facing=south,upwards_facing=east": {
"gtceu:z": 270,
"model": "gtceu:block/machine/advanced_monitor",
"y": 180
},
"facing=south,upwards_facing=north": {
"model": "gtceu:block/machine/advanced_monitor",
"y": 180
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=south,upwards_facing=south": {
"gtceu:z": 180,
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=south,upwards_facing=up": {
"model": "gtceu:block/machine/advanced_monitor",
"y": 180
},
Expand All @@ -72,6 +96,9 @@
"model": "gtceu:block/machine/advanced_monitor",
"y": 180
},
"facing=up,upwards_facing=down": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=up,upwards_facing=east": {
"gtceu:z": 90,
"model": "gtceu:block/machine/advanced_monitor",
Expand All @@ -86,29 +113,38 @@
"model": "gtceu:block/machine/advanced_monitor",
"x": 270
},
"facing=up,upwards_facing=up": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=up,upwards_facing=west": {
"gtceu:z": 270,
"model": "gtceu:block/machine/advanced_monitor",
"x": 270
},
"facing=west,upwards_facing=east": {
"gtceu:z": 270,
"facing=west,upwards_facing=down": {
"gtceu:z": 180,
"model": "gtceu:block/machine/advanced_monitor",
"y": 270
},
"facing=west,upwards_facing=east": {
"model": "gtceu:block/machine/advanced_monitor"
},
"facing=west,upwards_facing=north": {
"gtceu:z": 90,
"model": "gtceu:block/machine/advanced_monitor",
"y": 270
},
"facing=west,upwards_facing=south": {
"gtceu:z": 180,
"gtceu:z": 270,
"model": "gtceu:block/machine/advanced_monitor",
"y": 270
},
"facing=west,upwards_facing=west": {
"gtceu:z": 90,
"facing=west,upwards_facing=up": {
"model": "gtceu:block/machine/advanced_monitor",
"y": 270
},
"facing=west,upwards_facing=west": {
"model": "gtceu:block/machine/advanced_monitor"
}
}
}
Loading
Loading