From ca893bdb04b95c7aa2a2dbdca92ea6d016aee24a Mon Sep 17 00:00:00 2001 From: realguyman Date: Sun, 7 Apr 2024 13:02:41 -0800 Subject: [PATCH] Port to Minecraft 1.20.4 --- build.gradle | 6 +++--- gradle.properties | 14 +++++++------- .../totally_lit/block/LitTorchBlock.java | 6 +++--- .../totally_lit/block/LitWallTorchBlock.java | 6 +++--- .../totally_lit/block/NoParticleTorchBlock.java | 2 +- .../block/NoParticleWallTorchBlock.java | 2 +- .../realguyman/totally_lit/mixin/BlockMixin.java | 2 +- src/main/resources/fabric.mod.json | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index f082b01..1fccc73 100644 --- a/build.gradle +++ b/build.gradle @@ -23,12 +23,12 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api}" annotationProcessor modImplementation("io.wispforest:owo-lib:${project.owo_lib}") modLocalRuntime "com.terraformersmc:modmenu:${project.mod_menu}" - modLocalRuntime "maven.modrinth:c2me-fabric:${project.c2me}" - modLocalRuntime "maven.modrinth:starlight:${project.starlight}" +// modLocalRuntime "maven.modrinth:c2me-fabric:${project.c2me}" +// modLocalRuntime "maven.modrinth:starlight:${project.starlight}" // modLocalRuntime "vazkii.patchouli:Patchouli:${project.patchouli}" // Choose one recipe viewer: - modLocalRuntime "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei}" +// modLocalRuntime "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei}" // modLocalRuntime "dev.emi:emi:${project.emi}" } diff --git a/gradle.properties b/gradle.properties index af0d048..ae41864 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,17 @@ org.gradle.jvmargs=-Xmx1G -minecraft=1.20.2 -mappings=1.20.2+build.4 -fabric_loader=0.14.24 -fabric_api=0.90.7+1.20.2 -owo_lib=0.11.3+1.20.2 -mod_menu=8.0.0 +minecraft=1.20.4 +mappings=1.20.4+build.3 +fabric_loader=0.15.9 +fabric_api=0.96.11+1.20.4 +owo_lib=0.12.6+1.20.3 +mod_menu=9.0.0 starlight=1.1.3+1.20.2 c2me=0.2.0+alpha.10.126+1.20.2 patchouli=1.20.1-83-FABRIC rei=13.0.678 emi=1.0.24+1.20.2+fabric -version=0.13.3+1.20.2 +version=0.13.3+1.20.4 group=io.github.realguyman name=totally_lit diff --git a/src/main/java/io/github/realguyman/totally_lit/block/LitTorchBlock.java b/src/main/java/io/github/realguyman/totally_lit/block/LitTorchBlock.java index 889b325..fc7af73 100644 --- a/src/main/java/io/github/realguyman/totally_lit/block/LitTorchBlock.java +++ b/src/main/java/io/github/realguyman/totally_lit/block/LitTorchBlock.java @@ -2,13 +2,13 @@ import net.minecraft.block.Block; import net.minecraft.block.TorchBlock; -import net.minecraft.particle.ParticleEffect; +import net.minecraft.particle.DefaultParticleType; public class LitTorchBlock extends TorchBlock { private final Block unlitBlock; - public LitTorchBlock(Settings settings, ParticleEffect particle, Block unlitBlock) { - super(settings, particle); + public LitTorchBlock(Settings settings, DefaultParticleType particleType, Block unlitBlock) { + super(particleType, settings); this.unlitBlock = unlitBlock; } diff --git a/src/main/java/io/github/realguyman/totally_lit/block/LitWallTorchBlock.java b/src/main/java/io/github/realguyman/totally_lit/block/LitWallTorchBlock.java index 5cd63b4..7465eb3 100644 --- a/src/main/java/io/github/realguyman/totally_lit/block/LitWallTorchBlock.java +++ b/src/main/java/io/github/realguyman/totally_lit/block/LitWallTorchBlock.java @@ -2,13 +2,13 @@ import net.minecraft.block.Block; import net.minecraft.block.WallTorchBlock; -import net.minecraft.particle.ParticleEffect; +import net.minecraft.particle.DefaultParticleType; public class LitWallTorchBlock extends WallTorchBlock { private final Block unlitBlock; - public LitWallTorchBlock(Settings settings, ParticleEffect particleEffect, Block unlitBlock) { - super(settings, particleEffect); + public LitWallTorchBlock(Settings settings, DefaultParticleType particleType, Block unlitBlock) { + super(particleType, settings); this.unlitBlock = unlitBlock; } diff --git a/src/main/java/io/github/realguyman/totally_lit/block/NoParticleTorchBlock.java b/src/main/java/io/github/realguyman/totally_lit/block/NoParticleTorchBlock.java index fd1a81a..84f6643 100644 --- a/src/main/java/io/github/realguyman/totally_lit/block/NoParticleTorchBlock.java +++ b/src/main/java/io/github/realguyman/totally_lit/block/NoParticleTorchBlock.java @@ -8,7 +8,7 @@ public class NoParticleTorchBlock extends TorchBlock { public NoParticleTorchBlock(Settings settings) { - super(settings, null); + super(null, settings); } @Override diff --git a/src/main/java/io/github/realguyman/totally_lit/block/NoParticleWallTorchBlock.java b/src/main/java/io/github/realguyman/totally_lit/block/NoParticleWallTorchBlock.java index 95f2b28..77975e2 100644 --- a/src/main/java/io/github/realguyman/totally_lit/block/NoParticleWallTorchBlock.java +++ b/src/main/java/io/github/realguyman/totally_lit/block/NoParticleWallTorchBlock.java @@ -8,7 +8,7 @@ public class NoParticleWallTorchBlock extends WallTorchBlock { public NoParticleWallTorchBlock(Settings settings) { - super(settings, null); + super(null, settings); } @Override diff --git a/src/main/java/io/github/realguyman/totally_lit/mixin/BlockMixin.java b/src/main/java/io/github/realguyman/totally_lit/mixin/BlockMixin.java index 383738d..68907f4 100644 --- a/src/main/java/io/github/realguyman/totally_lit/mixin/BlockMixin.java +++ b/src/main/java/io/github/realguyman/totally_lit/mixin/BlockMixin.java @@ -48,7 +48,7 @@ private void onPlaced(World world, BlockPos pos, BlockState state, @Nullable Liv } @Inject(method = "onBreak", at = @At("HEAD")) - private void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player, CallbackInfo ci) { + private void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player, CallbackInfoReturnable cir) { if (!world.isClient() && (state.isIn(BlockTags.CANDLES) || state.isIn(BlockTags.CANDLE_CAKES) || state.isOf(Blocks.JACK_O_LANTERN) || state.isOf(Blocks.LANTERN) || state.isOf(Blocks.TORCH) || state.isOf(Blocks.WALL_TORCH) || state.getBlock() instanceof LitLanternBlock || state.getBlock() instanceof LitTorchBlock || state.getBlock() instanceof LitWallTorchBlock)) { ((ServerWorld) world).getBlockTickScheduler().clearNextTicks(new BlockBox(pos)); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 443286a..e5b9c64 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -21,10 +21,10 @@ }, "depends": { "java": ">=17", - "minecraft": "1.20.2", - "fabricloader": ">=0.14.24", + "minecraft": "1.20.4", + "fabricloader": ">=0.15.9", "fabric-api": "*", - "owo-lib": ">=0.11.3" + "owo-lib": ">=0.12.6" }, "conflicts": { "fading": "*",