mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 08:23:20 +02:00
Merge branch '1.20.4' into 1.20.1
# Conflicts: # gradle.properties
This commit is contained in:
commit
6c3607f515
6 changed files with 95 additions and 3 deletions
|
@ -11,6 +11,7 @@ import net.minecraft.block.enums.SlabType;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.decoration.DisplayEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
|
@ -210,6 +211,8 @@ public class Events {
|
|||
Sit.commandManager = s.getCommandManager();
|
||||
UseBlockCallback.EVENT.register((pl, world, hand, hitResult) -> {
|
||||
if (!Config.handSitting) return ActionResult.PASS;
|
||||
// make sure its a server player
|
||||
if (pl.getClass() != ServerPlayerEntity.class) return ActionResult.PASS;
|
||||
ServerPlayerEntity player = Sit.server.getPlayerManager().getPlayer(pl.getUuid());
|
||||
if (player == null) return ActionResult.PASS;
|
||||
if (hand == net.minecraft.util.Hand.MAIN_HAND && hitResult.getType() == HitResult.Type.BLOCK) {
|
||||
|
|
|
@ -177,7 +177,7 @@ public class Config {
|
|||
Gson gson = new GsonBuilder().disableHtmlEscaping().create();
|
||||
file.write("# Sit! Config\n");
|
||||
file.write("\nversion="+defaults.version);
|
||||
file.write("\n# all available languages: en_us, ru_ru, es_es");
|
||||
file.write("\n# all available languages: en_us, ru_ru, es_es, zh_tw");
|
||||
file.write("\nlang=" + lang);
|
||||
file.write("\n\n# "+lang("general.keep_active.description"));
|
||||
file.write("\nkeep-active=" + keepActive);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue