Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fence gates were not included in the door permission #7

Open
wants to merge 1 commit into
base: 1.20
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions platform/fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ loom {
sourceSet(sourceSets.getByName("client"))
}
}

runs {
named("client") {
runDir = "run/client"
}

named("server") {
runDir = "run/server"
}
}
}

val persistenceProject = project(":persistence")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import br.com.gamemods.minecity.fabric.service.claim.FabricClaimService.Companio
import net.fabricmc.fabric.api.event.player.UseBlockCallback
import net.kyori.adventure.text.Component
import net.minecraft.block.DoorBlock
import net.minecraft.block.FenceGateBlock
import net.minecraft.block.TrapdoorBlock
import net.minecraft.entity.player.PlayerEntity
import net.minecraft.util.ActionResult
Expand Down Expand Up @@ -40,7 +41,7 @@ class FabricDoorClaimPermission: ClaimPermission(
val blockState = world.getBlockState(clickPos)
val block = blockState.block

if (block !is DoorBlock && block !is TrapdoorBlock) {
if (block !is DoorBlock && block !is TrapdoorBlock && block !is FenceGateBlock) {
return ActionResult.PASS
}

Expand Down
8 changes: 3 additions & 5 deletions platform/fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"id": "minecity",
"version": "${version}",
"name": "MineCity",
"description": "",
"description": "The new version of the powerful city manager MineCity, inspired by MyTowns 2.",
"authors": [
"Polyana Fontes <[email protected]>"
"Polyana Fontes <[email protected]>",
"Hugo Heger <[email protected]>"
],
"contact": {
"homepage": "https://polyclub.games/",
Expand Down Expand Up @@ -41,8 +42,5 @@
"java": ">=17",
"fabric-api": "*",
"fabric-language-kotlin": ">=1.9.21"
},
"suggests": {
"another-mod": "*"
}
}
Loading