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

Backport fixes to 1.19.x #1916

Merged
merged 31 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c7ef6a8
fix: auto crafter not accepting piped in items
MrTJP Jul 11, 2024
678f3b0
fix: multipart light breaking effects
MrTJP Jul 11, 2024
675ebc7
fix: power wires not connecting on placement
MrTJP Jul 17, 2024
26897f5
fix: wrong item tag on raw tin storage block
MrTJP Jul 17, 2024
fdafe28
fix: prevent missing texture warnings for tubes
MrTJP Jul 17, 2024
ae9cb64
fix: incorrect part support shapes causing invalid connections
MrTJP Jul 19, 2024
047547f
perf: optimize MovingBlockSuppressorRenderer for common case of no st…
embeddedt Jul 31, 2024
459a6a5
ci: prevent workflow failure for failed badge update
MrTJP Jul 26, 2024
bb8eaa5
fix: incorrect input ordering in multiplexer ic gate
MrTJP Jul 28, 2024
22c42c9
fix: marble caves generating in sky
MrTJP Aug 5, 2024
5930cda
fix: missing landing particles for frame and motor
MrTJP Aug 5, 2024
6c399fb
fix: segment display z-fighting when using Embeddium
MrTJP Aug 10, 2024
fb24d33
feat: add redstone IO type for fabricated gates
MrTJP Aug 4, 2024
4134869
feat: add bundled bus io gates
MrTJP Aug 10, 2024
9f6fadf
feat: add analog IO type for fabricated gates
MrTJP Aug 15, 2024
ab2d4d1
fix: swapped textures for tin and raw silver blocks
MrTJP Sep 4, 2024
268f96a
fix: inconsistent bundled cable connections to smart lamps
MrTJP Sep 11, 2024
88ee0e8
fix: movement registry ignoring MovementController capabilities
MrTJP Nov 18, 2024
e34e211
fix: fabrication machines loading inventory out of order
MrTJP Nov 20, 2024
b2a38b7
internal: clean up fabrication container callbacks
MrTJP Nov 23, 2024
acdbcd2
chore: ignore all .gradle dirs
MrTJP Nov 23, 2024
4ca2887
ci: drop cursegradle plugin and use curseuploadpy
MrTJP Dec 8, 2024
9813566
ci: publish to modrinth
MrTJP Dec 24, 2024
46c6669
fix: photomask set creative-only shortcut working in survival
MrTJP Dec 24, 2024
ed75770
fix: silver and tin ores not respecting silk touch
MrTJP Dec 25, 2024
a097a7d
fix: framed power wires not connecting on placement
MrTJP Dec 27, 2024
10a8641
fix: frame motors starting moves while already in motion
MrTJP Dec 27, 2024
c593c58
chore: update readme links
MrTJP Dec 28, 2024
2b53d8f
internal: clean up redui container screen rendering
MrTJP Jan 2, 2025
3a5f495
refactor: rename classes to match official mappings
MrTJP Jan 3, 2025
6007037
ci: run pull request check on older branches
MrTJP Jan 26, 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
4 changes: 3 additions & 1 deletion .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
fire==0.4.0
fire==0.4.0
curseuploadpy @ git+https://github.com/MrTJP/curseuploadpy.git@dev
modrinthpy @ git+https://github.com/MrTJP/modrinthpy.git@dev
102 changes: 90 additions & 12 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ jobs:
case $release_type in
"release")
publish_maven=true
publish_curse=true
publish_launchers=true
publish_gh_release=true
version_format="{major}.{minor}.{patch}"
;;
"beta")
publish_maven=true
publish_curse=true
publish_launchers=true
publish_gh_release=false
version_format="{major}.{minor}.{patch}-beta+{increment}"
;;
"alpha")
publish_maven=true
publish_curse=false
publish_launchers=false
publish_gh_release=false
version_format="{major}.{minor}.{patch}-alpha+{increment}"
;;
*)
echo "::warning::Unknown release type: $release_type"
publish_maven=false
publish_curse=false
publish_launchers=false
publish_gh_release=false
version_format="{major}.{minor}.{patch}-$release_type+{increment}"
esac
Expand All @@ -61,7 +61,7 @@ jobs:
echo "release_channel=$release_channel" >> $GITHUB_OUTPUT
echo "release_type=$release_type" >> $GITHUB_OUTPUT
echo "publish_maven=$publish_maven" >> $GITHUB_OUTPUT
echo "publish_curse=$publish_curse" >> $GITHUB_OUTPUT
echo "publish_launchers=$publish_launchers" >> $GITHUB_OUTPUT
echo "publish_gh_release=$publish_gh_release" >> $GITHUB_OUTPUT
echo "version_format=$version_format" >> $GITHUB_OUTPUT
echo "tag_format=$tag_format" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -127,13 +127,90 @@ jobs:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}

- name: Curse publish
if: ${{ steps.release_type.outputs.publish_curse == 'true' }}
run: ./gradlew curseforge
- name: Publish to Curse
if: ${{ steps.release_type.outputs.publish_launchers == 'true' }}
run: |
# Base args for all modules
COMMON_ARGS=( \
-k $API_TOKEN \
-rt $RELEASE_TYPE \
-v 'Java 17' \
-v 1.20.1 \
-v Forge \
-v NeoForge \
-c ./CHANGELOG.md \
--required-dep codechicken-lib-1-8 \
--required-dep cb-multipart \
)

# All submodules need PR Core
MODULE_ARGS=( \
"${COMMON_ARGS[@]}" \
--required-dep project-red-core \
)

# Fabrication is special and also needs Integration and Transmission
FAB_ARGS=( \
"${MODULE_ARGS[@]}" \
--required-dep project-red-integration \
--required-dep project-red-transmission \
)

python -m curseuploadpy "${COMMON_ARGS[@]}" -p 228702 -f core/build/libs/*-core.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229048 -f expansion/build/libs/*-expansion.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229049 -f exploration/build/libs/*-exploration.jar
python -m curseuploadpy "${FAB_ARGS[@]}" -p 230111 -f fabrication/build/libs/*-fabrication.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229046 -f illumination/build/libs/*-illumination.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 229045 -f integration/build/libs/*-integration.jar
python -m curseuploadpy "${MODULE_ARGS[@]}" -p 478939 -f transmission/build/libs/*-transmission.jar

env:
AUTO_GENERATED_VERSION: ${{ steps.versioning.outputs.version }}
CURSE_RELEASE_TYPE: ${{ steps.release_type.outputs.release_type }}
CURSE_TOKEN: ${{ secrets.CURSE_TOKEN }}
RELEASE_TYPE: ${{ steps.release_type.outputs.release_type }}
API_TOKEN: ${{ secrets.CURSE_TOKEN }}


- name: Publish to Modrinth
if: ${{ steps.release_type.outputs.publish_launchers == 'true' }}
run: |
# Base args for all modules
COMMON_ARGS=( \
-k $API_TOKEN \
create-version \
-v "$MOD_VERSION" \
-c ./CHANGELOG.md \
-gv 1.20.1 \
-vt $RELEASE_TYPE \
-l forge \
-l neoforge \
--required-dep codechicken-lib \
--required-dep cb-multipart \
)

# All submodules need PR Core
MODULE_ARGS=( \
"${COMMON_ARGS[@]}" \
--required-dep project-red-core \
)

# Fabrication is special and also needs Integration and Transmission
FAB_ARGS=( \
"${MODULE_ARGS[@]}" \
--required-dep project-red-integration \
--required-dep project-red-transmission \
)

python -m modrinthpy "${COMMON_ARGS[@]}" -p project-red-core -n "Project Red Core v$MOD_VERSION" -f core/build/libs/*-core.jar
python -m modrinthpy "${MODULE_ARGS[@]}" -p project-red-expansion -n "Project Red Expansion v$MOD_VERSION" -f expansion/build/libs/*-expansion.jar
python -m modrinthpy "${MODULE_ARGS[@]}" -p project-red-exploration -n "Project Red Exploration v$MOD_VERSION" -f exploration/build/libs/*-exploration.jar
python -m modrinthpy "${FAB_ARGS[@]}" -p project-red-fabrication -n "Project Red Fabrication v$MOD_VERSION" -f fabrication/build/libs/*-fabrication.jar
python -m modrinthpy "${MODULE_ARGS[@]}" -p project-red-illumination -n "Project Red Illumination v$MOD_VERSION" -f illumination/build/libs/*-illumination.jar
python -m modrinthpy "${MODULE_ARGS[@]}" -p project-red-integration -n "Project Red Integration v$MOD_VERSION" -f integration/build/libs/*-integration.jar
python -m modrinthpy "${MODULE_ARGS[@]}" -p project-red-transmission -n "Project Red Transmission v$MOD_VERSION" -f transmission/build/libs/*-transmission.jar

env:
RELEASE_TYPE: ${{ steps.release_type.outputs.release_type }}
API_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
MOD_VERSION: ${{ steps.versioning.outputs.version }}

- name: Tag and Release
if: ${{ steps.release_type.outputs.publish_gh_release == 'true' }}
Expand All @@ -147,7 +224,8 @@ jobs:
CHANGELOG.txt

- name: Update badge
uses: schneegans/[email protected]
continue-on-error: true
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 3ef501bc64c896a86fd706dfea8ba367
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/verify-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ on:
pull_request:
branches:
- main
- main/**
- feature/**
- 1.20.1
- 1.19.x
- 1.18.x

jobs:
style_check:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Icon?
ehthumbs.db
Thumbs.db
#gradle stuff
/.gradle
**/.gradle
/build/
/*/build/
/run/
Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,26 @@

A Minecraft Forge mod all about Redstone circuity.

| MC Version | Branch | Latest Release | Latest Beta | Status |
|:----------:|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| 1.19.2 | `main` | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.19-release.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.19-beta.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | Active |
| 1.18.2 | `main/1.18` | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.18-release.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.18-beta.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | Maintenance |
| 1.16.5 | `main/1.16` | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.16-release.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.16-beta.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | End-of-Life |
| 1.15.2 | `main/1.15` | N/A | [![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.15-beta.json)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) | End-of-Life |

## Latest Versions
| MC Version | Branch | Latest Release | Latest Beta | Status |
|:----------:|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| 1.20.1 | `1.20.1` | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.20.1-release.json) | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.20.1-beta.json) | Active |
| 1.19.2 | `1.19.x` | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.19-release.json) | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.19-beta.json) | Maintenance |
| 1.18.2 | `1.18.x` | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.18-release.json) | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.18-beta.json) | Maintenance |
| 1.16.5 | `1.16.x` | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.16-release.json) | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.16-beta.json) | End-of-Life |
| 1.15.2 | `1.15.x` | N/A | ![badge](https://img.shields.io/endpoint?logo=.&url=https://gist.githubusercontent.com/MrTJP/3ef501bc64c896a86fd706dfea8ba367/raw/projectred-badge-1.15-beta.json) | End-of-Life |

## Links
| Module | Modrinth | CurseForge |
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Core | [![Static Badge](https://img.shields.io/badge/Project_Red-Core-green?logo=modrinth)](https://modrinth.com/mod/project-red-core) | [![Static Badge](https://img.shields.io/badge/Project_Red-Core-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-core) |
| Expansion | [![Static Badge](https://img.shields.io/badge/Project_Red-Expansion-green?logo=modrinth)](https://modrinth.com/mod/project-red-expansion) | [![Static Badge](https://img.shields.io/badge/Project_Red-Expansion-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-expansion) |
| Exploration | [![Static Badge](https://img.shields.io/badge/Project_Red-Exploration-green?logo=modrinth)](https://modrinth.com/mod/project-red-exploration) | [![Static Badge](https://img.shields.io/badge/Project_Red-Exploration-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-exploration) |
| Fabrication | [![Static Badge](https://img.shields.io/badge/Project_Red-Fabrication-green?logo=modrinth)](https://modrinth.com/mod/project-red-fabrication) | [![Static Badge](https://img.shields.io/badge/Project_Red-Fabrication-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-fabrication) |
| Illumination | [![Static Badge](https://img.shields.io/badge/Project_Red-Illumination-green?logo=modrinth)](https://modrinth.com/mod/project-red-illumination) | [![Static Badge](https://img.shields.io/badge/Project_Red-Illumination-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-illumination) |
| Integration | [![Static Badge](https://img.shields.io/badge/Project_Red-Integration-green?logo=modrinth)](https://modrinth.com/mod/project-red-integration) | [![Static Badge](https://img.shields.io/badge/Project_Red-Integration-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-integration) |
| Transmission | [![Static Badge](https://img.shields.io/badge/Project_Red-Transmission-green?logo=modrinth)](https://modrinth.com/mod/project-red-transmission) | [![Static Badge](https://img.shields.io/badge/Project_Red-Transmission-orange?logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/project-red-transmission) |

## Development Environment Setup

Expand Down
21 changes: 0 additions & 21 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'net.minecraftforge.gradle'
id 'com.matthewprenger.cursegradle'
}

String mod_id = 'projectred_core'
Expand Down Expand Up @@ -45,23 +44,3 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}

curseforge {
apiKey = System.getenv('CURSE_TOKEN') ?: 'XXX'

// Core
project {
id = '228702'
releaseType = System.getenv('CURSE_RELEASE_TYPE') ?: 'alpha'
changelogType = 'markdown'
changelog = rootProject.file('CHANGELOG.md')
relations {
requiredDependency 'codechicken-lib-1-8' // CCL is required for everything
requiredDependency 'cb-multipart' // CBMultipart is required for everything
}

// Java/ForgeGradle integrations don't work after 1.18.2 port
addGameVersion "${mc_version}"
addGameVersion "Java ${java_lang_version}"
}
}
14 changes: 7 additions & 7 deletions core/src/main/java/mrtjp/projectred/core/CoreNetwork.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import codechicken.lib.packet.ICustomPacketHandler;
import codechicken.lib.packet.PacketCustom;
import codechicken.lib.packet.PacketCustomChannelBuilder;
import mrtjp.projectred.core.tile.IPacketReceiverTile;
import mrtjp.projectred.core.tile.IPacketReceiverBlockEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -34,14 +34,14 @@ public static void init() {
.build();
}

public static PacketCustom createTileClientPacket(IPacketReceiverTile tile, byte key) {
public static PacketCustom createTileClientPacket(IPacketReceiverBlockEntity tile, byte key) {
PacketCustom packet = new PacketCustom(NET_CHANNEL, NET_TILE_PACKET_TO_CLIENT);
packet.writePos(tile.getBlockPosition());
packet.writeByte(key);
return packet;
}

public static PacketCustom createTileServerPacket(IPacketReceiverTile tile, byte key) {
public static PacketCustom createTileServerPacket(IPacketReceiverBlockEntity tile, byte key) {
PacketCustom packet = new PacketCustom(NET_CHANNEL, NET_TILE_PACKET_TO_SERVER);
packet.writePos(tile.getBlockPosition());
packet.writeByte(key);
Expand All @@ -65,8 +65,8 @@ public void handlePacket(PacketCustom packet, Minecraft mc, ClientPacketListener
private void handleTilePacket(Level world, MCDataInput data) {
BlockEntity tile = world.getBlockEntity(data.readPos());
int key = data.readUByte();
if (tile instanceof IPacketReceiverTile)
((IPacketReceiverTile) tile).receiveUpdateFromServer(key, data);
if (tile instanceof IPacketReceiverBlockEntity)
((IPacketReceiverBlockEntity) tile).receiveUpdateFromServer(key, data);
}
}

Expand All @@ -87,8 +87,8 @@ public void handlePacket(PacketCustom packet, ServerPlayer sender, ServerGamePac
private void handleTilePacket(Level world, MCDataInput data, ServerPlayer sender) {
BlockEntity tile = world.getBlockEntity(data.readPos());
int key = data.readUByte();
if (tile instanceof IPacketReceiverTile)
((IPacketReceiverTile) tile).receiveUpdateFromClient(key, data, sender);
if (tile instanceof IPacketReceiverBlockEntity)
((IPacketReceiverBlockEntity) tile).receiveUpdateFromClient(key, data, sender);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import codechicken.lib.vec.Rotation;
import mrtjp.projectred.core.init.CoreBlocks;
import mrtjp.projectred.core.tile.ElectrotineGeneratorTile;
import mrtjp.projectred.core.tile.ElectrotineGeneratorBlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.Block;
Expand All @@ -22,12 +22,12 @@ public ElectrotineGeneratorBlock() {
@Nullable
@Override
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return new ElectrotineGeneratorTile(pos, state);
return new ElectrotineGeneratorBlockEntity(pos, state);
}

@Override
protected BlockEntityType<?> getBlockEntityType() {
return CoreBlocks.ELECTROTINE_GENERATOR_TILE.get();
return CoreBlocks.ELECTROTINE_GENERATOR_BLOCK_ENTITY.get();
}

@Nullable
Expand Down
Loading
Loading