Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c2c7f10
Fix additionalDisplay (#5222)
jurrejelle Aug 1, 2026
a342ee5
Initialize Embeddium bloom chunk layer & material lazily (#5077)
screret Aug 1, 2026
38410b2
Remove MachineTraitType in favour of using class values instead (#5223)
gustovafing Aug 1, 2026
da4f359
remove MultiblockDisplayText (#5007)
jurrejelle Aug 1, 2026
6a025c0
tiny bit of mui migration docs (#5224)
jurrejelle Aug 2, 2026
4c5d4a9
Add instance field for machine builder back (#5225)
jurrejelle Aug 2, 2026
7b8bfad
Add override for pattern builder (#5228)
jurrejelle Aug 3, 2026
d8d650d
Slightly change how the early config is written (#5079)
screret Aug 3, 2026
f336744
Fix `MachineDefinition.getBlockEntityType()`'s generic being too broa…
screret Aug 3, 2026
e506a3d
Make ScopedValue use thread local fields internally (#5118)
screret Aug 3, 2026
1e3c8f6
Add slot group to solid boilers (#5234)
jurrejelle Aug 3, 2026
46a0359
Remove marker materials (#5237)
gustovafing Aug 4, 2026
f4fc473
Fix weird texture rotation on cables' and pipes' connection elements …
screret Aug 4, 2026
140a5ea
fix pipenet not always refreshing when it needs to (#5242)
GilbertzRivi Aug 5, 2026
3bf1571
Update to the uk_ua translation (#5044)
MetenBouldry Aug 5, 2026
dd2857d
fix lenses tag using incorrect name (#5252)
gustovafing Aug 6, 2026
5357364
Make GTUtil.canSeeSunClearly work for all dimensions even if they hav…
screret Aug 6, 2026
11f6bd0
Prevent inputting fluid from bottom valves on multiblock tanks (#4900)
TarLaboratories Aug 6, 2026
86e7806
Move runtime model generators to their own package and rename the cla…
screret Aug 6, 2026
fb2c28d
Add nullability checks with proper errors in TagPrefix BlockPropertie…
jurrejelle Aug 6, 2026
584cd5b
Enable bloom safe mode by default (#5078)
screret Aug 6, 2026
b7629c6
Change `Element#halfLifeSeconds` from long to double (#5122)
MCTian-mi Aug 6, 2026
62fa256
Make all 'open recipeviewer category' button branches display all of …
screret Aug 6, 2026
8568f6e
Derive tooltip rates from the cover scaling functions (single source …
Cyber1551 Aug 6, 2026
67b4524
Tar/ender link search (#5254)
TarLaboratories Aug 6, 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
21 changes: 5 additions & 16 deletions docs/content/Development/General-Topics/Machine-Trait-System.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ public class CustomMachine extends MetaMachine {
public void usingTraits() {
MetaMachine machine = getMachine();

// Most trait objects have a `TYPE` static field, it can be used to get traits with a specific type.
AutoOutputTrait autoOutputTrait = machine.getTrait(AutoOutputTrait.TYPE);
Optional<RecipeLogic> recipeLogicOptional = machine.getTrait(RecipeLogic.TYPE);
// Traits can be queried by class.
AutoOutputTrait autoOutputTrait = machine.getTrait(AutoOutputTrait.class);
Optional<RecipeLogic> recipeLogicOptional = machine.getTrait(RecipeLogic.class);

// Gets all traits with the specified type.
List<NotifiableItemStackHandler> allItemStackHandlers = machine.getTraits(NotifiableItemStackHandler.TYPE);
List<NotifiableItemStackHandler> allItemStackHandlers = machine.getTraits(NotifiableItemStackHandler.class);

List<MachineTrait> allTraits = machine.getAllTraits();
}
Expand All @@ -66,19 +66,8 @@ Machine traits have access to a number of machine events and callbacks, but some
```java
public class CustomMachineTrait extends MachineTrait implements IInteractionTrait {

// Machine traits should have a type object defined, unless a parent class of this machine trait already defines a type
public static final MachineTraitType<CustomMachineTrait> TYPE = new MachineTraitType<>(CustomMachineTrait.class);
public CustomMachineTrait() {}

public CustomMachineTrait() {

}

// Machine traits must also define a getter for the trait type
@Override
public MachineTraitType<CustomMachineTrait> getType() {
return TYPE;
}

// A list of classes or interfaces which a machine must be in order for this trait to be attached.
// A machine trait must be at least one of these interfaces/classes.
// By default, traits can be attached to any machine.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public class BonkRecipeCapability extends RecipeCapability<BonkIngredient> {

@Override
public List<NotifiableBonkHandler> getCapabilityHandlers(MetaMachine machine) {
return machine.getTraits(NotifiableBonkHandler.TYPE);
return machine.getTraits(NotifiableBonkHandler.class);
}

@SuppressWarnings("unchecked")
Expand All @@ -177,8 +177,6 @@ public class BonkRecipeCapability extends RecipeCapability<BonkIngredient> {
```java title="NotifiableBonkHandler"
public class NotifiableBonkHandler extends NotifiableRecipeHandlerTrait<BonkIngredient>
implements ICapabilityTrait {

public static final MachineTraitType<NotifiableBonkHandler> TYPE = new MachineTraitType<>(NotifiableBonkHandler.class);

@Getter
public final IO handlerIO;
Expand All @@ -198,11 +196,6 @@ public class NotifiableBonkHandler extends NotifiableRecipeHandlerTrait<BonkIngr
this.capabilityIO = capabilityIO;
}

@Override
public MachineTraitType<NotifiableBonkHandler> getTraitType() {
return TYPE;
}

public boolean addBonk(int bonkToAdd, boolean simulate){
if(bonkToAdd < 0) return false;
if((long) bonkToAdd + (long) this.bonk > Integer.MAX_VALUE) return false;
Expand Down
28 changes: 26 additions & 2 deletions docs/content/Modpacks/Changes/v8.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Version 8.0.0"
---


# Updating from `7.4.0` to `8.0.0`
# Updating from `7.5.3` to `8.0.0`

## New Data Save/Sync System

Expand Down Expand Up @@ -113,6 +113,18 @@ A large number of machine feature interfaces have been removed, and have had the
- `IFluidRendererMulti` - Use `MultiblockFluidRendererTrait`
- `IMaintenanceMachine` Use `MaintenanceHatchPartMachine`

# ModularUI changes

All your machines need to be migrated from LDLib's UI system to ModularUI's system. See [this category](../../Development/MUI2/index.md).

As part of this migration, your machine builder's
`.additionalDisplay((controller, components) -> { components.add(...)})`
is now
`.additionalDisplay((controller, syncManager) -> { return List.of(... your widgets here) })`.

!!! note
Do not forget that just like in your machine UI builders, you need to sync your data to the client. See [this page on syncing](../../Development/MUI2/Syncing/Sync-Basics.md).

## Connected texture reimplementation
The mod's connected texture logic has been reimplemented in GTM proper.
Texture packs, addons, and modpacks will have to change their texture metadata files for connected texures slightly.
Expand All @@ -131,6 +143,8 @@ Previously, `handleRecipeInner` should return `null` when there's nothing left t
## Empty content check for recipe capabilities
As a recipe-matching optimization, input handlers whose `getTotalContentAmount()` returns `0` are now skipped during recipe handling. If your `RecipeCapability` has handlers that legitimately report a total content amount of `0` but can still satisfy a recipe (e.g. rate-based capabilities like computation/CWU, where nothing is "stored" but the handler can still provide), you must now override `RecipeCapability#skipEmptyContentCheck()` to return `true`, otherwise these capabilities will break (their handlers will never be run).

## Removal of marker materials
Marker materials have been removed. This means that a few utils related to colored items have been moved. All GT color values are now located in `GTValues.COLORS`, and getting a colored lens should now be done using the `forge:lenses/<color>` tags.
## Other Changes

- `BlastingRecipeBuilder`, `CampfireRecipeBuilder`, `SmeltingRecipeBuilder` and `SmokingRecipeBuilder` have been merged into `SimpleCookingRecipeBuilder`
Expand All @@ -145,4 +159,14 @@ As a recipe-matching optimization, input handlers whose `getTotalContentAmount()
- `GTUtil.getMoltenFluid(Material)` has been moved to `Material.getHotFluid()`.
- `ICopyable::copyConfig`'s `CompoundTag` argument should now be mutated by reference instead of a new one returned (and thus, the return type has been changed to `void`).
- Tiered Chance Boosting has been formally removed from the API (as it was deprecated in v7.0.) `ChancedInput` and `ChancedOutput` kubeJS calls will throw errors if they still had chance boost values as arguments.
- Any custom `IDistinctPart`'s will have to implement `supportsDistinct` if they don't extend `ItemBusPartMachine`.
- Any custom `IDistinctPart`'s will have to implement `supportsDistinct` if they don't extend `ItemBusPartMachine`.
- Runtime model generators (previously named `ArmorItemRenderer`, `TagPrefixItemRenderer`, `ToolItemRenderer`, `MaterialBlockRenderer`, `OreBlockRenderer`, and `SurfaceRockRenderer`) have been renamed and moved from various packages under `client.renderer` to their own package, `client.model.runtimegen`.
The classes' names are now as follows (all start with `com.gregtechceu.gtceu.client.`):
- `renderer.item.ArmorItemRenderer` -> `model.runtimegen.ArmorItemModelGenerator`
- `renderer.item.TagPrefixItemRenderer` -> `model.runtimegen.TagPrefixItemModelGenerator`
- `renderer.item.ToolItemRenderer` -> `model.runtimegen.ToolItemModelGenerator`
- `renderer.block.MaterialBlockRenderer` -> `model.runtimegen.MaterialBlockModelGenerator`
- `renderer.block.OreBlockRenderer` -> `model.runtimegen.OreBlockModelGenerator`
- `renderer.block.SurfaceRockRenderer` -> `model.runtimegen.SurfaceRockModelGenerator`

The `#create` function common to all of them has also been renamed to `#add`. Simply changing the name is enough, as the functions' parameters weren't changed.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GTCEuStartupEvents.registry('gtceu:element', event => {
1. `.create(String name)` -> The element name.
2. `.protons(int protons)` -> Proton Count. Use `-1` if it is an element that will not get a material.
3. `.neutrons(int neutrons)` -> Neutron Count. Use `-1` if it is an element that will not get a material
4. `.halfLifeSeconds(int seconds)` -> Half Life Decay in Seconds. After N seconds, half of the material will have decayed. Use `-1` if your element doesn't decay.
4. `.halfLifeSeconds(double seconds)` -> Half Life Decay in Seconds. After N seconds, half of the material will have decayed. Use `-1` if your element doesn't decay.
5. `.decayTo(Material material)` -> Material to decay to. Use `null` if your element doesn't decay.
6. `.symbol(String symbol)` -> Atomic Symbol, which will be displayed as in chemical formulas.
7. `.isIsotope(boolean isotope)` -> Whether the element is an isotope, e.g. Uranium 235 and Uranium 238.
Expand Down
Loading
Loading