2024/11/01
Up
This commit is contained in:
parent
b4f592be46
commit
6fcdbefe61
|
|
@ -1,4 +1,4 @@
|
|||
# 版本 0.0.3.9.5 提前介绍c[最终版本对于0.0.4] 【注意:本解釋簡繁混寫,因爲趕時間,所以並不怎麽規範,請諒解】
|
||||
# 版本 0.0.3.9.6 提前介绍c[最终版本对于0.0.4] 【注意:本解釋簡繁混寫,因爲趕時間,所以並不怎麽規範,請諒解】
|
||||
## 简介
|
||||
现在开始你可以用拴绳拴住玩家,也可以拴住自己了,不如尝试拴住彼此来通关我的世界吧(
|
||||
|
||||
|
|
@ -18,6 +18,8 @@
|
|||
### 拴绳箭 [有普通和荧光两种箭矢]
|
||||
获得飞一样的感觉(操作不当可能会摔死
|
||||
+ 拴绳箭可以拴其它可拴LivingEntity了(
|
||||
### 紫水晶剪刀
|
||||
剪断拴绳链接,在发射器里可使用
|
||||
#### 射中实体时,会将射击者拴绳绑定在改实体上(该实体父类必须是有LivingEntity类型),同时拴绳箭会以普通的箭矢掉落
|
||||
#### 射中栅栏时,会自动将玩家拴在上面 ,同时拴绳箭会以普通的箭矢掉落
|
||||
#### 在地面上的箭可以通过按Shift靠近来捡起,如果捡起实体为发射箭矢玩家,则直接获取拴绳箭矢,如果捡起者为非发射者则成为发送者的拴绳持有者,并获得普通箭矢
|
||||
|
|
@ -50,6 +52,4 @@
|
|||
|
||||
* `LP.CreateLeashFenceKnotEntityIfAbsent` - 此規則啓用后, 在設置 leashData 時,如果對應方塊坐標上的柵欄沒有拴繩結則會自動創建這個實體並綁定 [默认值: True]
|
||||
|
||||
* `LP.KeepLeashNotDropTime` - 此规则决定,当拴绳关系创建时一段时间里,即是距离已经达到了断裂距离,也保持其不断裂 [默认值: 240ticks ,可设置范围[80, 1200]ticks]
|
||||
|
||||
* `LP.DisableMoveCheck` - 此规则启用将会禁止服务器对玩家进行速度过快修正 [默认值: True]
|
||||
* `LP.KeepLeashNotDropTime` - 此规则决定,当拴绳关系创建时一段时间里,即是距离已经达到了断裂距离,也保持其不断裂 [默认值: 240ticks ,可设置范围[80, 1200]ticks]
|
||||
|
|
@ -32,7 +32,7 @@ mod_name=Leashed Player
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=MIT
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=0.0.3.9.5
|
||||
mod_version=0.0.3.9.6
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// 1.21 2024-11-01T00:08:54.8337656 Languages: en_us for mod: leashedplayer
|
||||
05969780f698fcb4d6b63800dcdb76e4b0cad090 assets/leashedplayer/lang/en_us.json
|
||||
// 1.21 2024-11-01T07:39:29.8201048 Languages: en_us for mod: leashedplayer
|
||||
fbdc31c7f0d55b42c8791317b00f5b1f274a485d assets/leashedplayer/lang/en_us.json
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// 1.21 2024-11-01T00:08:54.8287566 Languages: zh_cn for mod: leashedplayer
|
||||
98ca8da6ea1688abc5d4beda986cfe0406255f1c assets/leashedplayer/lang/zh_cn.json
|
||||
// 1.21 2024-11-01T07:39:29.8201048 Languages: zh_cn for mod: leashedplayer
|
||||
d924feb216747a1becae38425bebef06c530d688 assets/leashedplayer/lang/zh_cn.json
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// 1.21 2024-11-01T00:08:54.8266358 Languages: zh_tw for mod: leashedplayer
|
||||
be94545852f60710429320d1e25f77d633940f36 assets/leashedplayer/lang/zh_tw.json
|
||||
// 1.21 2024-11-01T07:39:29.8181255 Languages: zh_tw for mod: leashedplayer
|
||||
0bf655237967960872a2b0c2397f692c59324717 assets/leashedplayer/lang/zh_tw.json
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
"entity.leashedplayer.spectral_leash_rope_arrow": "Spectral Leash Rope Arrow",
|
||||
"gamerule.LP.CreateLeashFenceKnotEntityIfAbsent": "Create Leash Fence Knot Entity if absent",
|
||||
"gamerule.LP.CreateLeashFenceKnotEntityIfAbsent.description": "Create LeashKnot Entity if it's absent on fence",
|
||||
"gamerule.LP.DisablePlayerMoveCheck": "Disable Player Move Check",
|
||||
"gamerule.LP.DisablePlayerMoveCheck.description": "Disable the player's movement Check And Correct it.",
|
||||
"gamerule.LP.KeepLeashNotDropTime": "Keep leash alive Time",
|
||||
"gamerule.LP.KeepLeashNotDropTime.description": "The time of Keep new leash which has far distance alive (Tick)",
|
||||
"gamerule.LP.TeleportWithLeashedPlayers": "Teleport leashed player with player holder",
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
"entity.leashedplayer.spectral_leash_rope_arrow": "拴绳光灵箭",
|
||||
"gamerule.LP.CreateLeashFenceKnotEntityIfAbsent": "如果缺失则创建拴绳结",
|
||||
"gamerule.LP.CreateLeashFenceKnotEntityIfAbsent.description": "如果在栅栏处缺失拴绳结,则创建它",
|
||||
"gamerule.LP.DisablePlayerMoveCheck": "禁止检查玩家移动",
|
||||
"gamerule.LP.DisablePlayerMoveCheck.description": "禁止检查玩家移动并且纠正它",
|
||||
"gamerule.LP.KeepLeashNotDropTime": "保持拴绳不掉落的时间",
|
||||
"gamerule.LP.KeepLeashNotDropTime.description": "当距离过远时,保持新建拴绳不掉落的时间 (刻)",
|
||||
"gamerule.LP.TeleportWithLeashedPlayers": "被拴玩家随玩家持有者传送",
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
"entity.leashedplayer.spectral_leash_rope_arrow": "拴繩光靈箭",
|
||||
"gamerule.LP.CreateLeashFenceKnotEntityIfAbsent": "如果缺失則創建拴繩結",
|
||||
"gamerule.LP.CreateLeashFenceKnotEntityIfAbsent.description": "如果在柵欄処缺失拴繩結,則創建它",
|
||||
"gamerule.LP.DisablePlayerMoveCheck": "禁止檢查玩家移動",
|
||||
"gamerule.LP.DisablePlayerMoveCheck.description": "禁止檢查玩家移動並糾正他它",
|
||||
"gamerule.LP.KeepLeashNotDropTime": "保持其不掉落的時間",
|
||||
"gamerule.LP.KeepLeashNotDropTime.description": "儅距離過遠時,保持其不掉落的時間(刻)",
|
||||
"gamerule.LP.TeleportWithLeashedPlayers": "被拴玩家随玩家持有者傳送",
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
package com.r3944realms.leashedplayer.content.gamerules.Server;
|
||||
|
||||
import com.r3944realms.leashedplayer.LeashedPlayer;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Gamerules;
|
||||
import com.r3944realms.leashedplayer.utils.Util;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
|
||||
import static com.r3944realms.leashedplayer.content.gamerules.Gamerules.GAMERULE_REGISTRY;
|
||||
|
||||
@EventBusSubscriber(modid = LeashedPlayer.MOD_ID, bus = EventBusSubscriber.Bus.MOD)
|
||||
public class DisablePlayerMoveCheck {
|
||||
public static final boolean DEFAULT_VALUE = false;
|
||||
public static final String ID = Util.getGameruleName(DisablePlayerMoveCheck.class);
|
||||
public static final String DESCRIPTION_KEY = Gamerules.getDescriptionKey(DisablePlayerMoveCheck.class);
|
||||
public static final String NAME_KEY = Gamerules.getNameKey(DisablePlayerMoveCheck.class);
|
||||
public static final GameRules.Category CATEGORY = GameRules.Category.PLAYER;
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onCommonSetup(final FMLCommonSetupEvent event) {
|
||||
GAMERULE_REGISTRY.registerGamerule(ID, CATEGORY, DEFAULT_VALUE);
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,6 @@ import com.r3944realms.leashedplayer.content.effects.ModEffectRegister;
|
|||
import com.r3944realms.leashedplayer.content.effects.ModPotionRegister;
|
||||
import com.r3944realms.leashedplayer.content.entities.ModEntityRegister;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Server.CreateLeashFenceKnotEntityIfAbsent;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Server.DisablePlayerMoveCheck;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Server.KeepLeashNotDropTime;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Server.TeleportWithLeashedPlayers;
|
||||
import com.r3944realms.leashedplayer.content.items.ModCreativeTab;
|
||||
|
|
@ -61,14 +60,14 @@ public enum ModLangKeyValue {
|
|||
TELEPORT_WITH_LEASHED_PLAYERS(TeleportWithLeashedPlayers.NAME_KEY, ModPartEnum.NAME, "Teleport leashed player with player holder", "被拴玩家随玩家持有者传送", "被拴玩家随玩家持有者傳送" ,false),
|
||||
CREATE_LEASH_FENCE_KNOT_ENTITY_IF_ABSENT(CreateLeashFenceKnotEntityIfAbsent.NAME_KEY, ModPartEnum.NAME, "Create Leash Fence Knot Entity if absent", "如果缺失则创建拴绳结", "如果缺失則創建拴繩結", false),
|
||||
KEEP_LEASH_NOT_DROP_TIME(KeepLeashNotDropTime.NAME_KEY, ModPartEnum.NAME, "Keep leash alive Time", "保持拴绳不掉落的时间", "保持其不掉落的時間", false),
|
||||
DISABLE_MOVE_CHECK(DisablePlayerMoveCheck.NAME_KEY, ModPartEnum.NAME, "Disable Player Move Check", "禁止检查玩家移动", "禁止檢查玩家移動", false),
|
||||
// DISABLE_MOVE_CHECK(DisablePlayerMoveCheck.NAME_KEY, ModPartEnum.NAME, "Disable Player Move Check", "禁止检查玩家移动", "禁止檢查玩家移動", false),
|
||||
TERMINATOR(ModAdvancementKey.LEASH_TERMINATOR.getNameKey(), ModPartEnum.NAME, "The Lead Terminator", "拴绳终结者","拴繩終結者", false),
|
||||
|
||||
//GAME_RULE_DESCRIPTION
|
||||
TELEPORT_WITH_LEASHED_DESCRIPTION(TeleportWithLeashedPlayers.DESCRIPTION_KEY, ModPartEnum.DESCRIPTION, "Holder will teleport with their leashed players ", "传送时将被拴玩家与持有者一起传送", "將被拴玩家將隨持有者一起傳送" ,false),
|
||||
CREATE_LEASH_FENCE_KNOT_ENTITY_IF_ABSENT_DESCRIPTION(CreateLeashFenceKnotEntityIfAbsent.DESCRIPTION_KEY, ModPartEnum.DESCRIPTION, "Create LeashKnot Entity if it's absent on fence", "如果在栅栏处缺失拴绳结,则创建它", "如果在柵欄処缺失拴繩結,則創建它", false),
|
||||
KEEP_LEASH_NOT_DROP_TIME_DESCRIPTION(KeepLeashNotDropTime.DESCRIPTION_KEY, ModPartEnum.DESCRIPTION,"The time of Keep new leash which has far distance alive (Tick)", "当距离过远时,保持新建拴绳不掉落的时间 (刻)", "儅距離過遠時,保持其不掉落的時間(刻)", false),
|
||||
DISABLE_MOVE_CHECK_DESCRIPTION(DisablePlayerMoveCheck.DESCRIPTION_KEY, ModPartEnum.DESCRIPTION, "Disable the player's movement Check And Correct it.", "禁止检查玩家移动并且纠正它","禁止檢查玩家移動並糾正他它", false),
|
||||
// DISABLE_MOVE_CHECK_DESCRIPTION(DisablePlayerMoveCheck.DESCRIPTION_KEY, ModPartEnum.DESCRIPTION, "Disable the player's movement Check And Correct it.", "禁止检查玩家移动并且纠正它","禁止檢查玩家移動並糾正他它", false),
|
||||
TERMINATOR_DESC(ModAdvancementKey.LEASH_TERMINATOR.getDescKey(), ModPartEnum.DESCRIPTION, "I am Lead Terminator!", "我來终结拴绳者!", "吾將終結拴繩!", false),
|
||||
|
||||
//ADV_NAME
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
package com.r3944realms.leashedplayer.mixin.server;
|
||||
|
||||
import com.r3944realms.leashedplayer.content.gamerules.GameruleRegistry;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Server.DisablePlayerMoveCheck;
|
||||
import com.r3944realms.leashedplayer.content.gamerules.Server.TeleportWithLeashedPlayers;
|
||||
import com.r3944realms.leashedplayer.modInterface.PlayerLeashable;
|
||||
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.network.ServerGamePacketListenerImpl;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
|
@ -55,10 +53,4 @@ public class MixinServerGamePacketListenerImpl {
|
|||
}
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("DiscouragedShift")
|
||||
@Inject(method = {"handleMovePlayer"}, at = @At(value = "INVOKE",target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;[Ljava/lang/Object;)V", ordinal = 0, shift = At.Shift.BEFORE), cancellable = true)
|
||||
private void handleMovePlayer(ServerboundMovePlayerPacket pPacket, CallbackInfo ci) {
|
||||
if(GameruleRegistry.getGameruleBoolValue(this.player.serverLevel(), DisablePlayerMoveCheck.ID))
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user