- /hat /sit:规则判断从 requires 移到 executes,命令总是显示(避免客户端读不到服务端规则值导致红字) & - MixinTrialSpawnerState:覆盖 tickAndGetNext 里全部 3 处 getTargetCooldownLength 调用(去掉 ordinal 限制)
This commit is contained in:
1 parent
bc472026f9
commit
d6eb433f65
3 files changed
+16
-8
No files matched your search
+4
-2
@@ -10,15 +10,17 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
|
||||
@Mixin(TrialSpawnerState.class)
|
||||
public class MixinTrialSpawnerState {
|
||||
// trialSpawnerCD:覆盖试炼刷怪笼的冷却长度。
|
||||
// 新版 TrialSpawnerState.tickAndGetNext 里调用 TrialSpawner.getTargetCooldownLength() 三次,
|
||||
// 不指定 ordinal 以覆盖全部调用。
|
||||
@WrapOperation(
|
||||
method = "tickAndGetNext",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
ordinal = 0,
|
||||
target = "Lnet/minecraft/world/level/block/entity/trialspawner/TrialSpawner;getTargetCooldownLength()I"
|
||||
)
|
||||
)
|
||||
private int tick(TrialSpawner instance, Operation<Integer> original) {
|
||||
private int tick(TrialSpawner instance, Operation<Integer> original) {
|
||||
if (SLSCarpetSettings.trialSpawnerCD < 0) {
|
||||
return original.call(instance);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user