Skip to content

Commit

Permalink
Fix BlockDustParticle running on later Forge versions
Browse files Browse the repository at this point in the history
Fixes #267
  • Loading branch information
Su5eD committed Sep 19, 2023
1 parent 65ee760 commit 0767707
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
],
"injectors": {
"defaultRequire": 1
}
},
"minVersion": "0.8.5"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ private BlockDustParticleMixin() {
argsOnly = true,
slice = @Slice(
from = @At(value = "FIELD", target = "Lnet/minecraft/client/particle/BlockDustParticle;blue:F", ordinal = 0),
to = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;isOf(Lnet/minecraft/block/Block;)Z")
to = @At(value = "INVOKE", target = "Lnet/minecraft/client/color/block/BlockColors;getColor(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/util/math/BlockPos;I)I")
),
allow = 1,
// Prevent crash on never Forge versions, allowing FML to show the mod error screen
require = 0
allow = 1
)
private BlockState removeUntintableParticles(BlockState state) {
if (!ParticleRenderEvents.ALLOW_BLOCK_DUST_TINT.invoker().allowBlockDustTint(state, world, blockPos)) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ fabric-client-tags-api-v1-version=1.1.1
loom.platform=forge
forge_version=1.20.1-47.1.3
pack_format=15
forgified_version=1.9.11
forgified_version=1.9.12
forge_fabric_loader_version=2.2.1+0.14.21+1.20.1
4 changes: 1 addition & 3 deletions gradle/ffapi-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,7 @@ abstract class GenerateForgeModMetadata extends DefaultTask {
{
modId "forge"
mandatory true
// TODO Remove in 1.20.2
// Cap forge on 47.1.3 to avoid issues that occur in later version
versionRange "[${forgeVersionString.get()}]"
versionRange "[${forgeVersionString.get()},)"
ordering "NONE"
side "BOTH"
},
Expand Down

0 comments on commit 0767707

Please sign in to comment.