接口 AbstractCommonScriptingExtension
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明default voidgunsmith_asyncRunCycled(org.luaj.vm2.LuaValue value, int period, int count) 以指定的游戏刻间隔循环执行 lua 函数。default voidgunsmith_asyncRunDelayed(org.luaj.vm2.LuaValue value, int delayTicks) 在给定的游戏刻延迟后执行 lua 函数。default double获取武器蓄力时间,单位为秒。default double获取这把武器预估的射程。default doublegunsmith_getEstimatedRange(int pierce) 获取这把武器在指定穿透数量下预估的射程。default Stringnet.minecraft.world.item.ItemStackcom.tacz.guns.api.item.IGunOptional<net.minecraft.world.entity.LivingEntity> net.neoforged.fml.LogicalSide从接口继承的方法 mod.chloeprime.gunsmithlib.api.common.CommonScriptingExtension
gunsmith_getGunId从接口继承的方法 mod.chloeprime.gunsmithlib.api.common.VanillaCooldownAPI
gunsmith_getCooldownPercent, gunsmith_getCooldownSeconds
-
方法详细资料
-
gunsmithlib$getCurrentItem
net.minecraft.world.item.ItemStack gunsmithlib$getCurrentItem() -
gunsmithlib$getGunItemInterface
com.tacz.guns.api.item.IGun gunsmithlib$getGunItemInterface() -
gunsmithlib$getShooter
Optional<net.minecraft.world.entity.LivingEntity> gunsmithlib$getShooter() -
gunsmithlib$getSide
net.neoforged.fml.LogicalSide gunsmithlib$getSide() -
gunsmith$getGunIdHelper
-
gunsmith_getEstimatedRange
default double gunsmith_getEstimatedRange()从接口复制的说明:RangefinderAPI获取这把武器预估的射程。 可用于在状态机中控制激光武器的激光块的长度。- 指定者:
gunsmith_getEstimatedRange在接口中RangefinderAPI- 返回:
- 这把武器预估的射程
-
gunsmith_getEstimatedRange
default double gunsmith_getEstimatedRange(int pierce) 从接口复制的说明:RangefinderAPI获取这把武器在指定穿透数量下预估的射程。 可用于在状态机中控制激光武器的激光块的长度。- 指定者:
gunsmith_getEstimatedRange在接口中RangefinderAPI- 参数:
pierce- 能穿透多少个敌人,1 = 能穿透一个或击中两个敌人- 返回:
- 这把武器在指定穿透数量下预估的射程
-
gunsmith_getChargingTime
default double gunsmith_getChargingTime()从接口复制的说明:CommonScriptingExtension获取武器蓄力时间,单位为秒。 -
gunsmith_asyncRunDelayed
default void gunsmith_asyncRunDelayed(org.luaj.vm2.LuaValue value, int delayTicks) 从接口复制的说明:BetterAsyncAPI在给定的游戏刻延迟后执行 lua 函数。 倒计时结束后如果用户切换别的 id 的武器或者没有持枪时会自动停止执行。- 指定者:
gunsmith_asyncRunDelayed在接口中BetterAsyncAPI- 参数:
value- lua 函数delayTicks- 延迟
-
gunsmith_asyncRunCycled
default void gunsmith_asyncRunCycled(org.luaj.vm2.LuaValue value, int period, int count) 从接口复制的说明:BetterAsyncAPI以指定的游戏刻间隔循环执行 lua 函数。 执行前如果用户切换别的 id 的武器或者没有持枪时会自动终止循环。传入的 lua 函数需要返回一个 bool 值。 如果返回 false 则终止循环。
- 指定者:
gunsmith_asyncRunCycled在接口中BetterAsyncAPI- 参数:
value- lua 函数period- 循环周期count- 循环次数
-