feat: netherPortalSize

This commit is contained in:
zly2006 committed 2024-08-06 15:51:55 +08:00
1 parent 75594d970e
commit d79d2d864c
5 files changed
+25

No files matched your search

@@ -59,4 +59,7 @@ public class SLSCarpetSettings {
@Rule(categories = {SLSA, RuleCategory.FEATURE})
public static boolean armadilloImmediateDespawns = false;
@Rule(categories = {SLSA, RuleCategory.FEATURE})
public static int netherPortalSize = 21;
}
@@ -0,0 +1,19 @@
package com.github.zly2006.carpetslsaddition.mixin.block;
import com.github.zly2006.carpetslsaddition.SLSCarpetSettings;
import net.minecraft.world.dimension.NetherPortal;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(NetherPortal.class)
public class MixinNetherPortal {
@ModifyConstant(
method = "*",
constant = @Constant(intValue = 21),
require = 0
)
private int portalSize(int original) {
return SLSCarpetSettings.netherPortalSize;
}
}
@@ -58,6 +58,7 @@
"carpet.rule.emptyShulkerBoxStack.extra.0": "Empty shulker boxes can stack in a player's inventory or hand",
"carpet.rule.emptyShulkerBoxStack.extra.1": "Empty shulker boxes will not stack in other inventories, such as chests or hoppers",
"carpet.rule.botMaxOnlineTime.extra.0": "The value in seconds. Set to -1 to disable this limit",
"carpet.rule.netherPortalSize.desc": "Max size of nether portal",
"carpet.slsa.bot.bot_timeout": "The bot %s has exceeded the maximum online time of %s, and has been disconnected now.",
"carpet.slsa.bot.respawned": "The bot %s's online time has been reset.",
@@ -58,6 +58,7 @@
"carpet.rule.emptyShulkerBoxStack.extra.0": "空潜影盒可以在玩家的背包进行自动堆叠,同时玩家可以手动堆叠空潜影盒",
"carpet.rule.emptyShulkerBoxStack.extra.1": "但是空潜影盒无法在容器中自动堆叠,比如箱子,漏斗",
"carpet.rule.botMaxOnlineTime.extra.0": "单位为秒,设置为-1则不启用限制",
"carpet.rule.netherPortalSize.desc": "地狱传送门的最大尺寸",
"carpet.slsa.bot.bot_timeout": "假人%s在线时间已超出服务器设定的最大在线时长%s,已被自动踢出",
"carpet.slsa.bot.respawned": "假人%s的在线时长已重置!",
@@ -7,6 +7,7 @@
],
"mixins": [
"block.BlockPatternTestTransformInvoker",
"block.MixinNetherPortal",
"block.MixinRedstoneWireBlock",
"carpet.MixinEntityPlayerMPFake",
"datapack.MixinVanillaResourcePackProvider",