Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4cb8cd2
Pipe model rework
screret Dec 6, 2025
9914f69
make lamps not use ldlib rendering for no reason
screret Dec 6, 2025
95deccc
spotless
screret Dec 6, 2025
7b62987
remove unused method
screret Dec 6, 2025
8230c2d
spot dn
screret Dec 6, 2025
8588cd3
Fix null check in getShapes
screret Dec 7, 2025
6805de7
Add migration docs
screret Dec 7, 2025
49bf090
add back the 7.4 migration docs (oops)
screret Dec 7, 2025
f663ea3
oops 2
screret Dec 7, 2025
9ce6f06
Add java event for registering dynamic resources at the correct time
screret Dec 7, 2025
e9af8f4
mfw doing this on mobile and got the event name wrong
screret Dec 7, 2025
bc05cd6
start on activable pipe models (for laser pipes etc.)
screret Dec 10, 2025
34ee116
make the active state of laser/optical pipes be handled via blockstat…
screret Dec 11, 2025
f6f269d
add a variant of GTBlockBuilder#exBlockstate with proper generics
screret Dec 11, 2025
7b04505
pass an ExistingFileHelper to pipe model generators
screret Dec 11, 2025
e944989
properly implement activable pipe models
screret Dec 11, 2025
1d9074a
add the remaining optical pipe textures modern didn't have
screret Dec 11, 2025
34dffb5
remove the ancient platform-deferrer "constructors" from pipe block e…
screret Dec 11, 2025
8d3de34
blockers -> restrictors
screret Dec 11, 2025
1be376a
add a constant for the GT directory in the instance
screret Dec 11, 2025
afb2bb4
pass around the blockstate provider instead of the ExistingFileHelper…
screret Dec 11, 2025
089ceed
move RuntimeBlockstateProvider constant from GregTechKubeJSPlugin to …
screret Dec 11, 2025
3271e4a
add specific 'memoized' function types that have a getter for the fun…
screret Dec 11, 2025
7e26ad8
datagen
screret Dec 11, 2025
41ac418
fix javadoc comment
screret Dec 11, 2025
0d083c6
fix pipe collisions extending out by 16 blocks on positive axes
screret Dec 11, 2025
4bcecf7
make event be processed on the mod bus so it actually runs
screret Dec 11, 2025
01f81c6
it works!!!!!!
screret Dec 11, 2025
f9eb85c
fix connector model rotation
screret Dec 11, 2025
6124b98
tweak docs
screret Dec 11, 2025
17c232e
Merge branch '1.20.1' into sc/pipe-model-rework
screret Jan 6, 2026
6809f77
spotless
screret Jan 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
26 changes: 26 additions & 0 deletions .github/workflows/apply-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Apply Spotless formatting

on:
workflow_dispatch:

jobs:
apply-spotless:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # do a full checkout instead of a shallow clone of HEAD so spotless's ratchetFrom works
- name: Setup Build
uses: ./.github/actions/build_setup
- run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'

./gradlew spotlessApply

git commit -am "Apply spotless formatting"
git push
1 change: 0 additions & 1 deletion docs/content/Modpacks/Changes/v7.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ to
`roll(RecipeCapability<?> cap, List<Content> chancedEntries, ChanceBoostFunction boostFunction, int recipeTier, int chanceTier, Object2IntMap<?> cache, int times)`

(The chance roll function now also requires the RecipeCapability that is currently being processed to be passed in.)

50 changes: 50 additions & 0 deletions docs/content/Modpacks/Changes/v7.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "Version 7.5.0"
---


# Updating from `7.4.0` to `7.5.0`

## Pipe rendering changes
_This is only relevant to add-on mods with custom pipe types._
Addons with custom pipe implementations will have to tweak their code slightly to function with the new rendering code (see example below).

```patch
-public final PipeModel model = new PipeModel(pipeType.getThickness(), () -> [side texture], () -> [end texture], null, null);
-@Getter
-private final PipeBlockRenderer renderer = new PipeBlockRenderer(model);

...

@Override
-public PipeModel getPipeModel() {
- return model;
+public PipeModel createPipeModel(GTBlockstateProvider provider) {
+ return new PipeModel(this, pipeType.getThickness(), [side texture], [end texture], provider);
}
```
If your pipe is generated from a material property (or equivalent), you should also call `PipeModel#dynamicModel()`
to have models be generated at runtime.
If so, must also add a **Mod bus** event listener for `RegisterDynamicResourcesEvent`, like so:
```java
@SubscribeEvent
public static void registerDynamicResources(RegisterDynamicResourcesEvent event) {
for (var block : MyBlocks.MY_PIPE_BLOCKS) block.get().createPipeModel(RuntimeExistingFileHelper.INSTANCE).dynamicModel();
}
```
Replace `MyBlocks.MY_PIPE_BLOCKS` with a reference to your pipe block array/map value collection.


Conversely, if the pipe is **not** generated, but has a constant set of variants (such as optical fiber cables or laser pipes),
you should **NOT** use `PipeModel#dynamicModel()` and instead set the model with `GTBlockBuilder#gtBlockstate` as such:
```java
// on your pipe block builder
... = REGISTRATE.block(...)
.properties(...)
.gtBlockstate(GTModels::createPipeBlockModel)
...more builder things...
.item(...)
.model(NonNullBiConsumer.noop())
...more builder things...
```
This makes the pipe model(s) be generated for you without having to process them at runtime.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "gtceu:block/huge_duct_pipe"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "gtceu:block/large_duct_pipe"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "gtceu:block/normal_duct_pipe"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"active=false": {
"model": "gtceu:block/normal_laser_pipe"
},
"active=true": {
"model": "gtceu:block/normal_laser_pipe_active"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"active=false": {
"model": "gtceu:block/normal_optical_pipe"
},
"active=true": {
"model": "gtceu:block/normal_optical_pipe_active"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "gtceu:block/small_duct_pipe"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parent": "gtceu:block/pipe/huge_duct_pipe/center",
"loader": "gtceu:pipe",
"parts": {
"center": {
"model": "gtceu:block/pipe/huge_duct_pipe/center"
},
"down": {
"model": "gtceu:block/pipe/huge_duct_pipe/connection"
},
"east": {
"model": "gtceu:block/pipe/huge_duct_pipe/connection",
"x": 90,
"y": 270
},
"north": {
"model": "gtceu:block/pipe/huge_duct_pipe/connection",
"x": 90,
"y": 180
},
"south": {
"model": "gtceu:block/pipe/huge_duct_pipe/connection",
"x": 90
},
"up": {
"model": "gtceu:block/pipe/huge_duct_pipe/connection",
"x": 180
},
"west": {
"model": "gtceu:block/pipe/huge_duct_pipe/connection",
"x": 90,
"y": 90
}
},
"restrictors": {
"down": {
"model": "gtceu:block/pipe/restrictor/down/thickness_14.0"
},
"east": {
"model": "gtceu:block/pipe/restrictor/east/thickness_14.0"
},
"north": {
"model": "gtceu:block/pipe/restrictor/north/thickness_14.0"
},
"south": {
"model": "gtceu:block/pipe/restrictor/south/thickness_14.0"
},
"up": {
"model": "gtceu:block/pipe/restrictor/up/thickness_14.0"
},
"west": {
"model": "gtceu:block/pipe/restrictor/west/thickness_14.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parent": "gtceu:block/pipe/large_duct_pipe/center",
"loader": "gtceu:pipe",
"parts": {
"center": {
"model": "gtceu:block/pipe/large_duct_pipe/center"
},
"down": {
"model": "gtceu:block/pipe/large_duct_pipe/connection"
},
"east": {
"model": "gtceu:block/pipe/large_duct_pipe/connection",
"x": 90,
"y": 270
},
"north": {
"model": "gtceu:block/pipe/large_duct_pipe/connection",
"x": 90,
"y": 180
},
"south": {
"model": "gtceu:block/pipe/large_duct_pipe/connection",
"x": 90
},
"up": {
"model": "gtceu:block/pipe/large_duct_pipe/connection",
"x": 180
},
"west": {
"model": "gtceu:block/pipe/large_duct_pipe/connection",
"x": 90,
"y": 90
}
},
"restrictors": {
"down": {
"model": "gtceu:block/pipe/restrictor/down/thickness_12.0"
},
"east": {
"model": "gtceu:block/pipe/restrictor/east/thickness_12.0"
},
"north": {
"model": "gtceu:block/pipe/restrictor/north/thickness_12.0"
},
"south": {
"model": "gtceu:block/pipe/restrictor/south/thickness_12.0"
},
"up": {
"model": "gtceu:block/pipe/restrictor/up/thickness_12.0"
},
"west": {
"model": "gtceu:block/pipe/restrictor/west/thickness_12.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parent": "gtceu:block/pipe/normal_duct_pipe/center",
"loader": "gtceu:pipe",
"parts": {
"center": {
"model": "gtceu:block/pipe/normal_duct_pipe/center"
},
"down": {
"model": "gtceu:block/pipe/normal_duct_pipe/connection"
},
"east": {
"model": "gtceu:block/pipe/normal_duct_pipe/connection",
"x": 90,
"y": 270
},
"north": {
"model": "gtceu:block/pipe/normal_duct_pipe/connection",
"x": 90,
"y": 180
},
"south": {
"model": "gtceu:block/pipe/normal_duct_pipe/connection",
"x": 90
},
"up": {
"model": "gtceu:block/pipe/normal_duct_pipe/connection",
"x": 180
},
"west": {
"model": "gtceu:block/pipe/normal_duct_pipe/connection",
"x": 90,
"y": 90
}
},
"restrictors": {
"down": {
"model": "gtceu:block/pipe/restrictor/down/thickness_8.0"
},
"east": {
"model": "gtceu:block/pipe/restrictor/east/thickness_8.0"
},
"north": {
"model": "gtceu:block/pipe/restrictor/north/thickness_8.0"
},
"south": {
"model": "gtceu:block/pipe/restrictor/south/thickness_8.0"
},
"up": {
"model": "gtceu:block/pipe/restrictor/up/thickness_8.0"
},
"west": {
"model": "gtceu:block/pipe/restrictor/west/thickness_8.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parent": "gtceu:block/pipe/normal_laser_pipe/center",
"loader": "gtceu:pipe",
"parts": {
"center": {
"model": "gtceu:block/pipe/normal_laser_pipe/center"
},
"down": {
"model": "gtceu:block/pipe/normal_laser_pipe/connection"
},
"east": {
"model": "gtceu:block/pipe/normal_laser_pipe/connection",
"x": 90,
"y": 270
},
"north": {
"model": "gtceu:block/pipe/normal_laser_pipe/connection",
"x": 90,
"y": 180
},
"south": {
"model": "gtceu:block/pipe/normal_laser_pipe/connection",
"x": 90
},
"up": {
"model": "gtceu:block/pipe/normal_laser_pipe/connection",
"x": 180
},
"west": {
"model": "gtceu:block/pipe/normal_laser_pipe/connection",
"x": 90,
"y": 90
}
},
"restrictors": {
"down": {
"model": "gtceu:block/pipe/restrictor/down/thickness_6.0"
},
"east": {
"model": "gtceu:block/pipe/restrictor/east/thickness_6.0"
},
"north": {
"model": "gtceu:block/pipe/restrictor/north/thickness_6.0"
},
"south": {
"model": "gtceu:block/pipe/restrictor/south/thickness_6.0"
},
"up": {
"model": "gtceu:block/pipe/restrictor/up/thickness_6.0"
},
"west": {
"model": "gtceu:block/pipe/restrictor/west/thickness_6.0"
}
}
}
Loading