Skip to content

Commit 85c613e

Browse files
committed
Merge branch 'mui2-refactor' of https://github.com/GregTechCEu/GregTech-Modern into fork/zetrock1/mui2-coke-oven-machine
2 parents 044355d + f887fec commit 85c613e

File tree

500 files changed

+16492
-13464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

500 files changed

+16492
-13464
lines changed

.github/workflows/manage-pr-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
mode: minimum
3232
count: 1
33-
labels: 'type: feature, type: bugfix, type: refactor, type: translation, ignore changelog'
33+
labels: 'type: feature, type: bugfix, type: refactor, type: translation, type: tests, ignore changelog'
3434
exit_type: failure
3535

3636
- name: Check for Required Release Label # require exactly one of these labels

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
# ChangeLog
22

3+
## Version [v7.4.1](https://github.com/GregTechCEu/GregTech-Modern/compare/v7.4.0-1.20.1...v7.4.1-1.20.1)
4+
### Added
5+
6+
- Improvements to Sodalite and Lazurite by @htmlcsjs in [#4297](https://github.com/GregTechCEu/GregTech-Modern/pull/4297)
7+
- Allow accessing block nbt from placeholders by @TarLaboratories in [#4161](https://github.com/GregTechCEu/GregTech-Modern/pull/4161)
8+
- Fix blackstone and tuff ores not dropping dusts by @JuiceyBeans in [#4376](https://github.com/GregTechCEu/GregTech-Modern/pull/4376)
9+
- Make netherite tools and items fire resistant by @JuiceyBeans in [#4378](https://github.com/GregTechCEu/GregTech-Modern/pull/4378)
10+
- Jade support for Long Distance Pipeline Endpoints by @JuiceyBeans in [#4420](https://github.com/GregTechCEu/GregTech-Modern/pull/4420)
11+
12+
### Fixed
13+
14+
- Fix vanilla fuel not working in boilers by @jurrejelle in [#4249](https://github.com/GregTechCEu/GregTech-Modern/pull/4249)
15+
- Fix manual mode for item/fluid filter covers and conveyors/pumps by @programmer3481 in [#4245](https://github.com/GregTechCEu/GregTech-Modern/pull/4245)
16+
- no more z fighting by @Spicierspace153 in [#4240](https://github.com/GregTechCEu/GregTech-Modern/pull/4240)
17+
- Fix #4154 Charcoal Pile Igniter by @zetrock1 in [#4246](https://github.com/GregTechCEu/GregTech-Modern/pull/4246)
18+
- Add tooltips for link covers by @zetrock1 in [#4265](https://github.com/GregTechCEu/GregTech-Modern/pull/4265)
19+
- Large Boiler throttle modifies burn time of current fuel by @DilithiumThoride in [#4258](https://github.com/GregTechCEu/GregTech-Modern/pull/4258)
20+
- Fix scythe not breaking items in an AOE by @Ujhik in [#4207](https://github.com/GregTechCEu/GregTech-Modern/pull/4207)
21+
- Fix GT Capes not rendering in multiplayer by @DilithiumThoride in [#4271](https://github.com/GregTechCEu/GregTech-Modern/pull/4271)
22+
- Fix dupes of Carbon dust and Coal dust by @zetrock1 in [#4301](https://github.com/GregTechCEu/GregTech-Modern/pull/4301)
23+
- rework the check for decomposition amounts by @jonasGajdosikas in [#4298](https://github.com/GregTechCEu/GregTech-Modern/pull/4298)
24+
- Fix ghost circuit in item detector by @zetrock1 in [#4293](https://github.com/GregTechCEu/GregTech-Modern/pull/4293)
25+
- Fixes shiny material set double plates. by @Flare32 in [#4213](https://github.com/GregTechCEu/GregTech-Modern/pull/4213)
26+
- Add directional setting UI and fix Machine UI TitleBar by @remakefactory in [#4238](https://github.com/GregTechCEu/GregTech-Modern/pull/4238)
27+
- KubeJS Duration Check by @YoungOnionMC in [#4327](https://github.com/GregTechCEu/GregTech-Modern/pull/4327)
28+
- Fixes some cases where handleRecipe() succeeds when it should fail by @DilithiumThoride in [#4300](https://github.com/GregTechCEu/GregTech-Modern/pull/4300)
29+
- Allow tags in shaped recipes to get recycle info by @jurrejelle in [#4292](https://github.com/GregTechCEu/GregTech-Modern/pull/4292)
30+
- Prevent clientside state mutations in QuarkTechSuite helmet by @Mqrius in [#4322](https://github.com/GregTechCEu/GregTech-Modern/pull/4322)
31+
- (Docs) Fix GTValues.VA being used as a function in material property modification, add reference to coil temps in Material Properties by @carbonatek in [#4338](https://github.com/GregTechCEu/GregTech-Modern/pull/4338)
32+
- Update spotless to 8.1.0 by @Reabstraction in [#4323](https://github.com/GregTechCEu/GregTech-Modern/pull/4323)
33+
- PumpBiomeModifier - change priority of tags by @zetrock1 in [#4369](https://github.com/GregTechCEu/GregTech-Modern/pull/4369)
34+
- Make fuel jetpacks work on servers by @Mqrius in [#4341](https://github.com/GregTechCEu/GregTech-Modern/pull/4341)
35+
- Fix facade cover json by @jurrejelle in [#4418](https://github.com/GregTechCEu/GregTech-Modern/pull/4418)
36+
- Correct Data Stick interaction handling by @remakefactory in [#4409](https://github.com/GregTechCEu/GregTech-Modern/pull/4409)
37+
- Fixes to overlay textures on some machines. by @Conity723 in [#4403](https://github.com/GregTechCEu/GregTech-Modern/pull/4403)
38+
- Fix {fromAscii} placeholder by @TarLaboratories in [#4392](https://github.com/GregTechCEu/GregTech-Modern/pull/4392)
39+
- Fix rotor holder Z-fighting by @zetrock1 in [#4335](https://github.com/GregTechCEu/GregTech-Modern/pull/4335)
40+
- Refactor naquadah reactor overlays to a workableMultiblockMachineCasing compatible format by @jonasGajdosikas in [#4353](https://github.com/GregTechCEu/GregTech-Modern/pull/4353)
41+
- Fix ranged output items voiding if there wasn't enough output space by @DilithiumThoride in [#4290](https://github.com/GregTechCEu/GregTech-Modern/pull/4290)
42+
- Add recipe for Copper Ingot disassembling by @esmenard in [#4399](https://github.com/GregTechCEu/GregTech-Modern/pull/4399)
43+
- Fix multiblock controller rotation overlay logic by @jkieberking in [#4199](https://github.com/GregTechCEu/GregTech-Modern/pull/4199)
44+
- Add missing rock types to initializeCobbleReplacements() by @Pyritie in [#4329](https://github.com/GregTechCEu/GregTech-Modern/pull/4329)
45+
46+
### Changed
47+
48+
- Large Boiler throttle modifies burn time of current fuel by @DilithiumThoride in [#4258](https://github.com/GregTechCEu/GregTech-Modern/pull/4258)
49+
- ja_jp fix by @code-onigiri in [#4319](https://github.com/GregTechCEu/GregTech-Modern/pull/4319)
50+
- Change out LDLib client side check to GTCEu one by @jurrejelle in [#4365](https://github.com/GregTechCEu/GregTech-Modern/pull/4365)
51+
- Update uk_ua.json by @StarmanMine142 in [#4411](https://github.com/GregTechCEu/GregTech-Modern/pull/4411)
52+
- Port existing keybinds to new system by @TechLord22 in [#4069](https://github.com/GregTechCEu/GregTech-Modern/pull/4069)
53+
54+
355
## Version [v7.4.0](https://github.com/GregTechCEu/GregTech-Modern/compare/v7.3.0-1.20.1...v7.4.0-1.20.1)
456
### Added
557

dependencies.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ dependencies {
2626
modCompileOnly(forge.bundles.rei)
2727
modCompileOnly(forge.emi)
2828

29-
// WAILA-likes
30-
modCompileOnly(forge.theoneprobe)
29+
// Jade (WAILA)
3130
modCompileOnly(forge.jade)
3231

3332
// Curios

docs/content/Development/Data-Sync-System/Annotations.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,4 @@ public boolean isWorkingEnabled = true;
5858
public void isWorkingChanged() {
5959
setRenderState(getRenderState().setValue(GTMachineModelProperties.IS_WORKING_ENABLED, isWorkingEnabled));
6060
}
61-
```
62-
63-
### `@FieldDataModifier` and `@CustomDataField`
64-
65-
66-
67-
The `@FieldDataModifier`annotation defines custom processing to be performed on the NBT for a field, e.g. for compatibility reasons.
68-
69-
The `@CustomDataField`annotation defines a field with a type too complex to be serialised using the normal system. Custom data fields must have exactly one load modifier and one data modifier.
70-
71-
Field data modifiers on non-custom fields will be applied *after* standard serialisation/deserialisation, and will be called with an argument containing the current tag.
72-
73-
```java
74-
@CustomDataField
75-
@SaveField
76-
public VeryComplexType myVeryComplexValue = new VeryComplexType();
77-
78-
@FieldDataModifier(fieldName="myVeryComplexValue", target=FieldDataModifier.MODIFY_TARGET.LOAD_NBT)
79-
public void loadVeryComplexValue(CompoundTag tag) {
80-
// Process tag here.
81-
myVeryComplexValue = new VeryComplexType();
82-
}
83-
84-
@FieldDataModifier(fieldName="myVeryComplexValue", target=FieldDataModifier.MODIFY_TARGET.SAVE_NBT)
85-
public CompoundTag saveVeryComplexValue(CompoundTag tag, boolean isSendingToClient) {
86-
// Save data here.
87-
return tag;
88-
}
8961
```

docs/content/Development/Data-Sync-System/Migrating-From-LDLib-SyncData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Client sync fields **do not** automatically detect changes. When changing a clie
2424

2525
### Other changes
2626

27-
- `saveCustomPersistedData` & `loadCustomPersistedData` methods: Use `@CustomDataModifier` & `@FieldDataModifier`
27+
- `saveCustomPersistedData` & `loadCustomPersistedData` methods, and serialization of custom data types - See `ValueTransformer<T>` and `ValueTransformers` classes.

docs/content/Development/Data-Sync-System/Usage.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -58,41 +58,46 @@ The following field types are supported by default:
5858

5959
### Adding support for additional types
6060

61-
To add support for an additional type, call `ValueTransformers.registerClassTransformer(Class<?> cls, IValueTransformer<?> transformer)` or `ValueTransformers.registerInterfaceTransformer(Class<?> cls, IValueTransformer<?> transformer)`
61+
The `ValueTransformer<T>` abstract class defines how a value of type `T` should be serialized.
6262

63-
The `IValueTransformer<T>` interface defines how a value of type `T` should be serialised.
63+
To add support for an additional type, call `ValueTransformers.registerTransformer(Class<T> cls, ValueTransformer<T> transformer)` or `ValueTransformers.registerTransformerSupplier(Class<T> cls, Supplier<ValueTransformer<T>> func)`
6464

65+
Additionally, fields can be explicitly directed to use a specific value transformer:
6566
```java
66-
public interface IValueTransformer<T> {
67-
68-
// If this type cannot be instanced purely from a serialised tag.
69-
// All complex type typically have mustProvideObject true
70-
default boolean mustProvideObject() {
71-
return false;
72-
}
73-
74-
// A method for serialising a value into a tag
75-
// Called when serialising a value to be sent to the client
76-
default Tag serializeClientSyncNBT(@Nullable T value, ISyncManaged holder) {
77-
return serializeNBT(value, holder);
67+
/**
68+
* Example from HullMachine.java. This example shows serialization of an AE2 class which may or may not be loaded at runtime.
69+
*/
70+
71+
@SaveField(nbtKey = "grid_node")
72+
private final Object gridNodeHost;
73+
74+
private static class GridNodeHostTransformer implements ValueTransformer<Object> {
75+
76+
@Override
77+
public Tag serializeNBT(Object value, TransformerContext<Object> context) {
78+
if (GTCEu.Mods.isAE2Loaded() &&
79+
(context.currentValue()) instanceof IGridConnectedBlockEntity connectedBlockEntity) {
80+
var compound = new CompoundTag();
81+
connectedBlockEntity.getMainNode().saveToNBT(compound);
82+
return compound;
7883
}
79-
80-
// A method for deserialising a value from a tag
81-
// Called when deserialising a value on the client.
82-
// If mustProvideObject == true, currentVal is the currently saved value.
83-
default T deserializeClientNBT(Tag tag, ISyncManaged holder, @Nullable T currentVal) {
84-
return deserializeNBT(tag, holder, currentVal);
84+
return new CompoundTag();
85+
}
86+
87+
@Override
88+
public @Nullable Object deserializeNBT(Tag tag, TransformerContext<Object> context) {
89+
if (GTCEu.Mods.isAE2Loaded() &&
90+
context.currentValue() instanceof IGridConnectedBlockEntity connectedBlockEntity &&
91+
tag instanceof CompoundTag c) {
92+
connectedBlockEntity.getMainNode().loadFromNBT(c);
8593
}
94+
return null;
95+
}
96+
}
8697

87-
88-
// A method for serialising a value into a tag.
89-
// The holder param is the object this sync value is attached to
90-
Tag serializeNBT(T value, ISyncManaged holder);
91-
92-
// A method for deserialising a value from a tag
93-
// If mustProvideObject == true, currentVal is the currently saved value.
94-
T deserializeNBT(Tag tag, ISyncManaged holder, @Nullable T currentVal);
98+
static {
99+
ClassSyncData.getClassData(HullMachine.class).setCustomTransformerForField("gridNodeHost",
100+
new GridNodeHostTransformer());
95101
}
96-
```
97102

98-
Some types may be too complex to be processed using this system. For more complex NBT interactions, use the `@FieldDataModifier` and `@CustomDataField` annotations.
103+
```
4.71 KB
Loading

0 commit comments

Comments
 (0)