From 298e67b1fc57ab3c70b05f57a152c86d8525ce8d Mon Sep 17 00:00:00 2001 From: glisco Date: Thu, 8 Jun 2023 02:50:39 +0200 Subject: [PATCH] update to 1.20, make froges fertile again --- gradle.properties | 10 +++++----- .../delightfulfroge/mixin/FrogEntityMixin.java | 8 ++++---- src/main/resources/fabric.mod.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index f961f39..8b200c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_base_version=1.19.3 -minecraft_version=1.19.3 -yarn_mappings=1.19.3+build.4 -loader_version=0.14.11 +minecraft_base_version=1.20 +minecraft_version=1.20 +yarn_mappings=1.20+build.1 +loader_version=0.14.21 # Mod Properties mod_version=0.1.0 maven_group=io.wispforest archives_base_name=delightful-froge # Dependencies # check this on https://fabricmc.net/develop -fabric_version=0.69.1+1.19.3 +fabric_version=0.83.0+1.20 diff --git a/src/main/java/io/wispforest/delightfulfroge/mixin/FrogEntityMixin.java b/src/main/java/io/wispforest/delightfulfroge/mixin/FrogEntityMixin.java index 3e0fa56..04c4bfe 100644 --- a/src/main/java/io/wispforest/delightfulfroge/mixin/FrogEntityMixin.java +++ b/src/main/java/io/wispforest/delightfulfroge/mixin/FrogEntityMixin.java @@ -43,15 +43,15 @@ protected FrogEntityMixin(EntityType entityType, World worl @Override protected ActionResult interactMob(PlayerEntity player, Hand hand) { - if (player.isSneaking() || this.getVariant() != DelightfulFroge.FROGE) return ActionResult.PASS; - if (this.world.isClient) { + if (player.isSneaking() || !player.getStackInHand(hand).isEmpty() || this.getVariant() != DelightfulFroge.FROGE) return super.interactMob(player, hand); + if (this.getWorld().isClient) { for (int i = 0; i < 5; i++) { double x = this.getX() + (this.random.nextDouble() - .5); double y = this.getY() + (this.random.nextDouble() - .5) + .25; double z = this.getZ() + (this.random.nextDouble() - .5); - this.world.addParticle(ParticleTypes.HEART, x, y, z, 0, 0, 0); - this.world.addParticle(ParticleTypes.WAX_ON, x, y + .4, z, this.random.nextDouble() * 2.5, this.random.nextDouble() * 2.5, this.random.nextDouble() * 2.5); + this.getWorld().addParticle(ParticleTypes.HEART, x, y, z, 0, 0, 0); + this.getWorld().addParticle(ParticleTypes.WAX_ON, x, y + .4, z, this.random.nextDouble() * 2.5, this.random.nextDouble() * 2.5, this.random.nextDouble() * 2.5); } this.usingTongueAnimationState.start(this.age); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 0569eff..9a3f33d 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ "depends": { "fabricloader": "*", "fabric": "*", - "minecraft": "1.19.x" + "minecraft": "1.20.x" }, "custom": {