diff --git a/CHANGELOG.md b/CHANGELOG.md index daa82267c..cf052cccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,3 @@ > The version number of fuji follows `semver` now: https://semver.org/ -- (core) feature: a new facility to allow suppress the sending of a message by its type. -- (teleport_warmup module) feature: a new meta `fuji.teleport_warmup.warmup` to specify the `warmup sec` based on luckperms. (Thanks to @FishyFinn) -- (teleport_warmup module) fix: should not corrupt the `relative teleport`. (Thanks to @FishyFinn) -- (warp module) feature: the feedback message for `/warp tp` command. -- (nametag module) fix: should hide the nametag if the player is `in-visbile`. -- (disabler.move_wrongly_disabler) fix: should also work for `entity moved wrongly`. +- (back module): add option `enable_back_on_death` and `enable_back_on_teleport`. \ No newline at end of file diff --git a/docs/release/fuji.pdf b/docs/release/fuji.pdf index 43c700e31..477022dd5 100644 Binary files a/docs/release/fuji.pdf and b/docs/release/fuji.pdf differ diff --git a/gradle.properties b/gradle.properties index 5d7458283..178bd4354 100755 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.parallel=true # project maven_group=io.github.sakurawald mod_id=fuji -mod_version=6.2.0 +mod_version=6.3.0 # loader minecraft_version=1.21.4 diff --git a/src/main/java/io/github/sakurawald/module/initializer/back/config/model/BackConfigModel.java b/src/main/java/io/github/sakurawald/module/initializer/back/config/model/BackConfigModel.java index bea9314ad..de5ca1e01 100644 --- a/src/main/java/io/github/sakurawald/module/initializer/back/config/model/BackConfigModel.java +++ b/src/main/java/io/github/sakurawald/module/initializer/back/config/model/BackConfigModel.java @@ -2,4 +2,6 @@ public class BackConfigModel { public double ignore_distance = 32d; + public boolean enable_back_on_death = true; + public boolean enable_back_on_teleport = true; } diff --git a/src/main/java/io/github/sakurawald/module/mixin/back/ServerPlayerEntityMixin.java b/src/main/java/io/github/sakurawald/module/mixin/back/ServerPlayerEntityMixin.java index 7af2a32a1..35630cb14 100644 --- a/src/main/java/io/github/sakurawald/module/mixin/back/ServerPlayerEntityMixin.java +++ b/src/main/java/io/github/sakurawald/module/mixin/back/ServerPlayerEntityMixin.java @@ -25,12 +25,16 @@ public abstract class ServerPlayerEntityMixin { @Inject(method = "onDeath", at = @At("HEAD")) public void saveCurPos(DamageSource damageSource, CallbackInfo ci) { - BackInitializer.saveCurrentPosition(player); + if (BackInitializer.config.model().enable_back_on_death) { + BackInitializer.saveCurrentPosition(player); + } } @Inject(method = "teleport", at = @At("HEAD")) public void saveCurPos(ServerWorld serverWorld, double d, double e, double f, Set set, float g, float h, boolean bl, CallbackInfoReturnable cir) { - BackInitializer.saveCurrentPosition(player); + if (BackInitializer.config.model().enable_back_on_teleport) { + BackInitializer.saveCurrentPosition(player); + } } }