Skip to content

Commit

Permalink
fix: #43
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Jul 12, 2024
1 parent e8501af commit bd8c224
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx5G
org.gradle.parallel=true
# Mod Properties
mod_version=0.4.3
mod_version=0.4.4
archices_preview_version=

maven_group=com.github.zly2006
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

@Mixin(FarmlandBlock.class)
public class MixinFarmlandBlock {
@Inject(method = "onLandedUpon", at = @At("HEAD"), cancellable = true)
private void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance, CallbackInfo ci) {
@Inject(method = "setToDirt", at = @At("HEAD"), cancellable = true)
private static void onLandedUpon(Entity entity, BlockState state, World world, BlockPos pos, CallbackInfo ci) {
if (entity instanceof PlayerEntity player) {
if (!ServerMain.INSTANCE.checkPermission(world, pos, player, Permission.FARMLAND_DESTROY)) {
entity.sendMessage(Permission.FARMLAND_DESTROY.getNoPermissionMsg(player));
Expand Down

0 comments on commit bd8c224

Please sign in to comment.