From f9e0661b551d9ff4f5a4f59e84f2bd1516c113c0 Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Thu, 29 Jun 2023 13:10:49 -0400 Subject: [PATCH] Update minigame to Minecraft 1.20.1 (#15) --- gradle.properties | 10 +++++----- .../xyz/nucleoid/farmyfeud/entity/FarmSheepEntity.java | 8 ++++---- .../nucleoid/farmyfeud/game/active/EntityRayTrace.java | 2 +- .../nucleoid/farmyfeud/game/active/FfCaptureLogic.java | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gradle.properties b/gradle.properties index aacfe21..7d509c1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties -minecraft_version=1.19.4 -yarn_mappings=1.19.4+build.1 -loader_version=0.14.18 +minecraft_version=1.20.1 +yarn_mappings=1.20.1+build.1 +loader_version=0.14.21 # Dependencies -fabric_version=0.76.0+1.19.4 -plasmid_version=0.5+1.19.4-SNAPSHOT +fabric_version=0.83.1+1.20.1 +plasmid_version=0.5+1.20.1-SNAPSHOT # Mod Properties mod_version=1.1.3 diff --git a/src/main/java/xyz/nucleoid/farmyfeud/entity/FarmSheepEntity.java b/src/main/java/xyz/nucleoid/farmyfeud/entity/FarmSheepEntity.java index e7a05e5..5b5e8e1 100644 --- a/src/main/java/xyz/nucleoid/farmyfeud/entity/FarmSheepEntity.java +++ b/src/main/java/xyz/nucleoid/farmyfeud/entity/FarmSheepEntity.java @@ -48,7 +48,7 @@ public void setOwnerTeam(@Nullable GameTeamKey team, BlockBounds home) { this.ownerTeam = team; this.home = home; this.lastDropPos = null; - this.lastValidTime = this.world.getTime(); + this.lastValidTime = this.getWorld().getTime(); this.getNavigation().stop(); @@ -64,7 +64,7 @@ public void setOwnerTeam(@Nullable GameTeamKey team, BlockBounds home) { public void drop() { this.lastDropPos = this.getPos(); - this.lastPickUpTime = this.world.getTime(); + this.lastPickUpTime = this.getWorld().getTime(); } public boolean tryPickUp(long time, GameTeamKey team) { @@ -104,7 +104,7 @@ protected void mobTick() { this.game.tickSheep(this); if (this.home != null) { - long time = this.world.getTime(); + long time = this.getWorld().getTime(); if (this.hasVehicle() || this.home.contains(this.getBlockPos())) { this.lastValidTime = time; } @@ -182,7 +182,7 @@ private Vec3d getWanderTarget() { targetZ = MathHelper.floor(z + deltaZ); } - int topY = FarmSheepEntity.this.world.getTopY(Heightmap.Type.MOTION_BLOCKING, targetX, targetZ); + int topY = FarmSheepEntity.this.getWorld().getTopY(Heightmap.Type.MOTION_BLOCKING, targetX, targetZ); return new Vec3d(targetX + 0.5, topY, targetZ + 0.5); } diff --git a/src/main/java/xyz/nucleoid/farmyfeud/game/active/EntityRayTrace.java b/src/main/java/xyz/nucleoid/farmyfeud/game/active/EntityRayTrace.java index 2ad27cc..5b89993 100644 --- a/src/main/java/xyz/nucleoid/farmyfeud/game/active/EntityRayTrace.java +++ b/src/main/java/xyz/nucleoid/farmyfeud/game/active/EntityRayTrace.java @@ -13,7 +13,7 @@ public final class EntityRayTrace { @Nullable public static EntityHitResult rayTrace(Entity sourceEntity, double range, double margin, Predicate predicate) { - World world = sourceEntity.world; + World world = sourceEntity.getWorld(); Vec3d origin = sourceEntity.getCameraPosVec(1.0F); Vec3d delta = sourceEntity.getRotationVec(1.0F).multiply(range); diff --git a/src/main/java/xyz/nucleoid/farmyfeud/game/active/FfCaptureLogic.java b/src/main/java/xyz/nucleoid/farmyfeud/game/active/FfCaptureLogic.java index a767dbd..a792c74 100644 --- a/src/main/java/xyz/nucleoid/farmyfeud/game/active/FfCaptureLogic.java +++ b/src/main/java/xyz/nucleoid/farmyfeud/game/active/FfCaptureLogic.java @@ -53,7 +53,7 @@ public void captureSheep(FarmSheepEntity sheep, GameTeamKey team) { } private void spawnFireworkAt(Entity entity, GameTeamKey team) { - World world = entity.world; + World world = entity.getWorld(); int flight = world.random.nextInt(3); @@ -66,7 +66,7 @@ private void spawnFireworkAt(Entity entity, GameTeamKey team) { ItemStackBuilder.firework(this.game.teamManager.getTeamConfig(team).dyeColor().getRgb(), flight, type).build() ); - entity.world.spawnEntity(firework); + world.spawnEntity(firework); } private boolean isCapturedBy(Vec3d pos, GameTeamKey team) {