From af9b6d2901086282753d783c9681f84c31218ecc Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 21 Nov 2023 13:08:20 +0800 Subject: [PATCH] Update to 1.20.3-pre1 --- .../main/java/dev/architectury/mixin/fabric/MixinLevel.java | 6 ++++-- .../architectury/mixin/fabric/client/MixinGameRenderer.java | 4 ++-- gradle.properties | 6 +++--- .../java/dev/architectury/test/registry/TestRegistries.java | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/fabric/src/main/java/dev/architectury/mixin/fabric/MixinLevel.java b/fabric/src/main/java/dev/architectury/mixin/fabric/MixinLevel.java index 0e395d16..c6472b88 100644 --- a/fabric/src/main/java/dev/architectury/mixin/fabric/MixinLevel.java +++ b/fabric/src/main/java/dev/architectury/mixin/fabric/MixinLevel.java @@ -20,6 +20,8 @@ package dev.architectury.mixin.fabric; import dev.architectury.event.events.common.ExplosionEvent; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.sounds.SoundEvent; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Explosion; @@ -33,9 +35,9 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture; @Mixin(Level.class) public class MixinLevel { - @Inject(method = "explode(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/damagesource/DamageSource;Lnet/minecraft/world/level/ExplosionDamageCalculator;DDDFZLnet/minecraft/world/level/Level$ExplosionInteraction;Z)Lnet/minecraft/world/level/Explosion;", + @Inject(method = "explode(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/damagesource/DamageSource;Lnet/minecraft/world/level/ExplosionDamageCalculator;DDDFZLnet/minecraft/world/level/Level$ExplosionInteraction;ZLnet/minecraft/core/particles/ParticleOptions;Lnet/minecraft/core/particles/ParticleOptions;Lnet/minecraft/sounds/SoundEvent;)Lnet/minecraft/world/level/Explosion;", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Explosion;explode()V"), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD) - private void explodePre(Entity entity, DamageSource damageSource, ExplosionDamageCalculator explosionDamageCalculator, double d, double e, double f, float g, boolean bl, Level.ExplosionInteraction explosionInteraction, boolean bl2, CallbackInfoReturnable cir, Explosion.BlockInteraction blockInteraction, Explosion explosion) { + private void explodePre(Entity entity, DamageSource damageSource, ExplosionDamageCalculator explosionDamageCalculator, double d, double e, double f, float g, boolean bl, Level.ExplosionInteraction explosionInteraction, boolean bl2, ParticleOptions particleOptions, ParticleOptions particleOptions2, SoundEvent soundEvent, CallbackInfoReturnable cir, Explosion.BlockInteraction blockInteraction, Explosion explosion) { if (ExplosionEvent.PRE.invoker().explode((Level) (Object) this, explosion).isFalse()) { cir.setReturnValue(explosion); } diff --git a/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinGameRenderer.java b/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinGameRenderer.java index 2f899d17..2d0b4405 100644 --- a/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinGameRenderer.java +++ b/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinGameRenderer.java @@ -51,7 +51,7 @@ public abstract class MixinGameRenderer { @Inject(method = "render(FJZ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;renderWithTooltip(Lnet/minecraft/client/gui/GuiGraphics;IIF)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILEXCEPTION, cancellable = true) - public void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, boolean isGameLoadFinished, int mouseX, int mouseY, Window window, Matrix4f matrix, PoseStack matrices, GuiGraphics graphics) { + public void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, float speedAppliedTickDelta, boolean isGameLoadFinished, int mouseX, int mouseY, Window window, Matrix4f matrix, PoseStack matrices, GuiGraphics graphics) { if (ClientGuiEvent.RENDER_PRE.invoker().render(minecraft.screen, graphics, mouseX, mouseY, minecraft.getDeltaFrameTime()).isFalse()) { ci.cancel(); } @@ -60,7 +60,7 @@ public abstract class MixinGameRenderer { @Inject(method = "render(FJZ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;renderWithTooltip(Lnet/minecraft/client/gui/GuiGraphics;IIF)V", shift = At.Shift.AFTER, ordinal = 0), locals = LocalCapture.CAPTURE_FAILEXCEPTION) - public void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, boolean isGameLoadFinished, int mouseX, int mouseY, Window window, Matrix4f matrix, PoseStack matrices, GuiGraphics graphics) { + public void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, float speedAppliedTickDelta, boolean isGameLoadFinished, int mouseX, int mouseY, Window window, Matrix4f matrix, PoseStack matrices, GuiGraphics graphics) { ClientGuiEvent.RENDER_POST.invoker().render(minecraft.screen, graphics, mouseX, mouseY, minecraft.getDeltaFrameTime()); } diff --git a/gradle.properties b/gradle.properties index 9196dffd..0070f213 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.daemon=false platforms=fabric -minecraft_version=23w42a -supported_version=23w42a +minecraft_version=1.20.3-pre1 +supported_version=1.20.3-pre1 artifact_type=beta @@ -14,7 +14,7 @@ base_version=11.0 maven_group=dev.architectury fabric_loader_version=0.14.23 -fabric_api_version=0.90.3+1.20.3 +fabric_api_version=0.90.11+1.20.3 mod_menu_version=7.0.0 forge_version=48.0.38 diff --git a/testmod-common/src/main/java/dev/architectury/test/registry/TestRegistries.java b/testmod-common/src/main/java/dev/architectury/test/registry/TestRegistries.java index 1700f630..2aec687f 100644 --- a/testmod-common/src/main/java/dev/architectury/test/registry/TestRegistries.java +++ b/testmod-common/src/main/java/dev/architectury/test/registry/TestRegistries.java @@ -136,9 +136,9 @@ public class TestRegistries { }); public static final RegistrySupplier TEST_BLOCK = BLOCKS.register("test_block", () -> - new Block(BlockBehaviour.Properties.copy(Blocks.STONE))); + new Block(BlockBehaviour.Properties.ofLegacyCopy(Blocks.STONE))); public static final RegistrySupplier COLLISION_BLOCK = BLOCKS.register("collision_block", () -> - new Block(BlockBehaviour.Properties.copy(Blocks.STONE)) { + new Block(BlockBehaviour.Properties.ofLegacyCopy(Blocks.STONE)) { @Override public VoxelShape getCollisionShape(BlockState state, BlockGetter bg, BlockPos pos, CollisionContext ctx) { SINK.accept(EntityHooks.fromCollision(ctx) + " is colliding with " + state); @@ -151,7 +151,7 @@ public class TestRegistries { // In example mod the forge class isn't being replaced, this is not required in mods depending on architectury return (LiquidBlock) Class.forName(!Platform.isForge() ? "dev.architectury.core.block.ArchitecturyLiquidBlock" : "dev.architectury.core.block.forge.imitator.ArchitecturyLiquidBlock") .getDeclaredConstructor(Supplier.class, BlockBehaviour.Properties.class) - .newInstance(TestRegistries.TEST_FLUID, BlockBehaviour.Properties.copy(Blocks.WATER).noCollission().strength(100.0F).noLootTable()); + .newInstance(TestRegistries.TEST_FLUID, BlockBehaviour.Properties.ofLegacyCopy(Blocks.WATER).noCollission().strength(100.0F).noLootTable()); } catch (InstantiationException | ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { throw new RuntimeException(e);