diff --git a/gradle.properties b/gradle.properties index 20f2f14..b782e8d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.16.2 yarn_mappings=1.16.2+build.6 loader_version=0.9.1+build.205 # Mod Properties -mod_version=1.1.8 +mod_version=1.1.9 maven_group=fr.catcore archives_base_name=deacoudre # Dependencies diff --git a/src/main/java/fr/catcore/deacoudre/game/DeACoudreActive.java b/src/main/java/fr/catcore/deacoudre/game/DeACoudreActive.java index bdd0698..0fe4daf 100644 --- a/src/main/java/fr/catcore/deacoudre/game/DeACoudreActive.java +++ b/src/main/java/fr/catcore/deacoudre/game/DeACoudreActive.java @@ -131,8 +131,10 @@ private void addPlayer(ServerPlayerEntity player) { private boolean onPlayerDamage(ServerPlayerEntity player, DamageSource source, float amount) { if (player == null) return true; - double playerY = player.getPos().y; - if (source == DamageSource.FALL && playerY < this.config.mapConfig.height + 1) { + Vec3d playerPos = player.getPos(); + BlockBounds poolBounds = this.gameMap.getTemplate().getFirstRegion("pool"); + boolean isInPool = poolBounds.contains((int)playerPos.x, (int)playerPos.y, (int)playerPos.z); + if (source == DamageSource.FALL && ((playerPos.y < 10 && playerPos.y > 6) || isInPool)) { if (this.lifeMap.get(PlayerRef.of(player)) < 2) this.eliminatePlayer(player); else { diff --git a/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMapGenerator.java b/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMapGenerator.java index d7705bc..68d4a29 100644 --- a/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMapGenerator.java +++ b/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMapGenerator.java @@ -68,8 +68,8 @@ private void buildPool(MapTemplate builder) { shape.generatePool(this.config, builder, mutablePosWater, mutablePosBorder); BlockBounds bounds = new BlockBounds( - new BlockPos(-config.radius, 2, -config.radius), - new BlockPos(config.radius, 2, config.radius) + new BlockPos(-config.radius - 1, 0, 4), + new BlockPos(config.radius + 1, 4, 6 + 2*config.radius) ); builder.addRegion("pool", bounds); }