mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Update to 1.20.3-pre1
This commit is contained in:
@@ -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<Explosion> 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<Explosion> cir, Explosion.BlockInteraction blockInteraction, Explosion explosion) {
|
||||
if (ExplosionEvent.PRE.invoker().explode((Level) (Object) this, explosion).isFalse()) {
|
||||
cir.setReturnValue(explosion);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -136,9 +136,9 @@ public class TestRegistries {
|
||||
});
|
||||
|
||||
public static final RegistrySupplier<Block> TEST_BLOCK = BLOCKS.register("test_block", () ->
|
||||
new Block(BlockBehaviour.Properties.copy(Blocks.STONE)));
|
||||
new Block(BlockBehaviour.Properties.ofLegacyCopy(Blocks.STONE)));
|
||||
public static final RegistrySupplier<Block> 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);
|
||||
|
||||
Reference in New Issue
Block a user