类 ToolUtils
java.lang.Object
committee.nova.mods.avaritia.util.ToolUtils
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidaccelerateBlockEntity(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.entity.BlockEntity be, int times) 加速方块实体和更新static voidaoeAttack(net.minecraft.world.entity.player.Player player, float range, float damage, boolean hurtAnimal, boolean lightOn) 范围攻击static voidarrowBarrage(net.minecraft.world.entity.Entity shooter, net.minecraft.world.level.Level level, List<net.minecraft.world.entity.Entity> piercedAndKilledEntities, net.minecraft.world.entity.projectile.AbstractArrow.Pickup pickup, net.minecraft.util.RandomSource randy, net.minecraft.core.BlockPos pos) 召唤箭static booleancanHarvest(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world) Axestatic booleancanUseTool(net.minecraft.world.level.block.state.BlockState state, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> keySets) Commonstatic voiddestroy(net.minecraft.server.level.ServerLevel world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos) 破坏方块static voiddestroyMaterialBlocks(net.minecraft.server.level.ServerPlayer player, net.minecraft.core.BlockPos startPos, int range, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> materials) 无尽镐And无尽铲破坏static voiddestroyTree(net.minecraft.world.entity.player.Player player, net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) 连锁砍树static net.minecraft.world.damagesource.DamageSourcegetArrowDamageSource(net.minecraft.world.level.Level level, net.minecraft.world.entity.projectile.AbstractArrow arrow, net.minecraft.world.entity.Entity owner, net.minecraft.world.entity.Entity target) static net.minecraft.world.item.ItemStackgetMeltingItem(net.minecraft.world.level.Level world, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.item.ItemStack tool) 获取物品烧炼后产物static net.minecraft.world.item.ItemStackgetPlayerTotemItem(net.minecraft.world.entity.player.Player player) 获取玩家背包中的图腾static voidinfinityTraceArrowDamage(net.minecraft.world.level.Level level, @NotNull net.minecraft.world.phys.EntityHitResult result, TraceArrowEntity arrow) 追踪箭static booleanisInfinite(net.minecraft.world.entity.LivingEntity player) 身穿全套无尽装备static booleanisPlayerWearing(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.entity.EquipmentSlot slot, Predicate<net.minecraft.world.item.Item> predicate) 是否穿着static voidmelting(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack tool, net.minecraftforge.event.level.BlockEvent.BreakEvent event) 炽热 自动识别可进行的熔炉配方进行处理(如:原矿-矿物锭)static voidmeltingAchieve(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraftforge.event.level.BlockEvent.BreakEvent event) 熔炼附魔的伪实现 通过取消方块破坏事件,同时生成掉落物static voidpearlAttack(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) 终望珍珠攻击static voidrangeBonemealable(net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.core.BlockPos blockPos, int rang, int height, int cost) 范围催熟static voidrangeHarvest(net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.core.BlockPos blockPos, int rang, int height) 范围收获static voidremoveBlockWithDrops(net.minecraft.server.level.ServerLevel world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, Set<net.minecraft.world.item.ItemStack> drops, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> validMaterials) static voidshootBladeSlash(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) 发射剑气static voidspeedBlockTick(net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerLevel level, int speed, int randomTicks) 已过时。static voidsweepAttack(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity livingEntity, net.minecraft.world.entity.Entity victim) 横扫攻击static booleantrySummonLightning(net.minecraft.world.level.Level level, int bolts, net.minecraft.core.BlockPos hitPos, @Nullable net.minecraft.server.level.ServerPlayer thrower) 尝试在指定位置召唤闪电
-
字段详细资料
-
materialsPick
public static final Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> materialsPick -
materialsAxe
public static final Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> materialsAxe -
materialsShovel
public static final Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> materialsShovel
-
-
构造器详细资料
-
ToolUtils
public ToolUtils()
-
-
方法详细资料
-
canUseTool
public static boolean canUseTool(net.minecraft.world.level.block.state.BlockState state, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> keySets) Common -
destroy
public static void destroy(net.minecraft.server.level.ServerLevel world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos) 破坏方块- 参数:
world- 世界player- 玩家pos- 点击坐标
-
isPlayerWearing
public static boolean isPlayerWearing(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.entity.EquipmentSlot slot, Predicate<net.minecraft.world.item.Item> predicate) 是否穿着- 参数:
entity- 生物slot- 装备槽predicate- 过滤- 返回:
- 是否穿着
-
isInfinite
public static boolean isInfinite(net.minecraft.world.entity.LivingEntity player) 身穿全套无尽装备- 参数:
player- 玩家- 返回:
- 是否身穿全套无尽装备
-
destroyMaterialBlocks
public static void destroyMaterialBlocks(net.minecraft.server.level.ServerPlayer player, net.minecraft.core.BlockPos startPos, int range, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> materials) 无尽镐And无尽铲破坏- 参数:
player- 玩家startPos- 起始坐标range- 挖掘范围
-
removeBlockWithDrops
public static void removeBlockWithDrops(net.minecraft.server.level.ServerLevel world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack, Set<net.minecraft.world.item.ItemStack> drops, Set<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> validMaterials) -
arrowBarrage
public static void arrowBarrage(net.minecraft.world.entity.Entity shooter, net.minecraft.world.level.Level level, List<net.minecraft.world.entity.Entity> piercedAndKilledEntities, net.minecraft.world.entity.projectile.AbstractArrow.Pickup pickup, net.minecraft.util.RandomSource randy, net.minecraft.core.BlockPos pos) 召唤箭- 参数:
shooter- 攻击者level- 世界piercedAndKilledEntities- 无视护甲的实体pickup- 拾起箭randy- 随机pos- 击中坐标
-
getArrowDamageSource
public static net.minecraft.world.damagesource.DamageSource getArrowDamageSource(net.minecraft.world.level.Level level, net.minecraft.world.entity.projectile.AbstractArrow arrow, net.minecraft.world.entity.Entity owner, net.minecraft.world.entity.Entity target) -
infinityTraceArrowDamage
public static void infinityTraceArrowDamage(net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.phys.EntityHitResult result, TraceArrowEntity arrow) 追踪箭- 参数:
result- 命中结果arrow- 弓箭
-
sweepAttack
public static void sweepAttack(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity livingEntity, net.minecraft.world.entity.Entity victim) 横扫攻击- 参数:
level- 世界livingEntity- 玩家victim- 被攻击者
-
pearlAttack
public static void pearlAttack(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) 终望珍珠攻击- 参数:
player- 玩家stack- Pearlworld- 世界
-
aoeAttack
public static void aoeAttack(net.minecraft.world.entity.player.Player player, float range, float damage, boolean hurtAnimal, boolean lightOn) 范围攻击- 参数:
player- 玩家range- 范围damage- 伤害hurtAnimal- 是否攻击动物lightOn- 使用闪电
-
trySummonLightning
public static boolean trySummonLightning(net.minecraft.world.level.Level level, int bolts, net.minecraft.core.BlockPos hitPos, @Nullable @Nullable net.minecraft.server.level.ServerPlayer thrower) 尝试在指定位置召唤闪电- 参数:
level- 世界对象,用于创建和添加实体bolts- 生成的闪电数量hitPos- 闪电生成的位置thrower- 可为空的服务器玩家对象,作为闪电的施放者- 返回:
- 如果成功生成至少一个闪电则返回true,否则返回false
-
rangeHarvest
public static void rangeHarvest(net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.core.BlockPos blockPos, int rang, int height) 范围收获- 参数:
serverLevel- 世界player- 玩家stack- 使用工具blockPos- 点击位置rang- 范围height- 高度
-
rangeBonemealable
public static void rangeBonemealable(net.minecraft.server.level.ServerLevel serverLevel, net.minecraft.core.BlockPos blockPos, int rang, int height, int cost) 范围催熟- 参数:
serverLevel- 世界blockPos- 点击位置rang- 范围height- 高度cost- 次数
-
canHarvest
public static boolean canHarvest(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world) Axe -
destroyTree
public static void destroyTree(net.minecraft.world.entity.player.Player player, net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) 连锁砍树- 参数:
player- 玩家world- 世界pos- 点击坐标state- 方块状态
-
getPlayerTotemItem
public static net.minecraft.world.item.ItemStack getPlayerTotemItem(net.minecraft.world.entity.player.Player player) 获取玩家背包中的图腾- 参数:
player- 玩家- 返回:
- 图腾
-
melting
public static void melting(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack tool, net.minecraftforge.event.level.BlockEvent.BreakEvent event) 炽热 自动识别可进行的熔炉配方进行处理(如:原矿-矿物锭)- 参数:
block- 原矿方块state- 原矿状态world- 世界pos- 点击坐标player- 玩家tool- 使用的工具event- 破坏事件
-
getMeltingItem
public static net.minecraft.world.item.ItemStack getMeltingItem(net.minecraft.world.level.Level world, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.item.ItemStack tool) 获取物品烧炼后产物- 参数:
world- worlditemStack- 烧炼前物品tool- 使用工具- 返回:
- 烧炼产物
-
meltingAchieve
public static void meltingAchieve(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraftforge.event.level.BlockEvent.BreakEvent event) 熔炼附魔的伪实现 通过取消方块破坏事件,同时生成掉落物- 参数:
world- 世界player- 玩家pos- 坐标event- 事件 from ...
-
shootBladeSlash
public static void shootBladeSlash(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) 发射剑气- 参数:
stack- 工具player- 玩家
-
speedBlockTick
@Deprecated public static void speedBlockTick(net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerLevel level, int speed, int randomTicks) 已过时。加速方块实体和更新- 参数:
pos- 被加速方块位置level- 世界speed- 速度randomTicks- 随机刻 from Torcherino 已弃用
-
accelerateBlockEntity
public static void accelerateBlockEntity(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.entity.BlockEntity be, int times) 加速方块实体和更新- 参数:
level- 世界pos- 被加速方块位置be- 被加速的实体times- 随机刻
-