最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

玩轉(zhuǎn)AI寫插件系列2–釣魚竿抓鉤

2023-08-24 22:37 作者:Ask林志QAQ  | 我要投稿

import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.item.Item.Settings; import net.minecraft.item.ItemGroup; import net.minecraft.network.chat.Component; public class FishingRodItem extends Item { ??public FishingRodItem(Settings settings) { ????super(settings); ??} ??@Override ??public ActionResult use(World world, PlayerEntity player, Hand hand) { ????// 獲取玩家手中的物品 ????ItemStack stack = player.getStackInHand(hand); ????// 生成抓鉤效果 ????generateHookEffect(world, player, stack); ????return ActionResult.resultConsume(stack); ??} ??private void generateHookEffect(World world, PlayerEntity player, ItemStack stack) { ????// 創(chuàng)建一個新的粒子效果實例,表示抓鉤 ????net.minecraft.client.particle.ParticleManager manager = world.getParticleManager(); ????net.minecraft.client.particle.ParticleData particleData = new net.minecraft.client.particle.ParticleData(net.minecraft.client.particle.ParticleType.SWEEP_ARROW, net.minecraft.client.particle.SWEEP_ARROW_PARTICLES); ????net.minecraft.client.particle.Particle swipeArrowParticle = new net.minecraft.client.particle.ParticleSweepArrow(world, player, 0, 0, 0, 0, 0, particleData); ????swipeArrowParticle.setBoundingBox(0, 0, 0); ????manager.addParticle(swipeArrowParticle); ??} }

玩轉(zhuǎn)AI寫插件系列2–釣魚竿抓鉤的評論 (共 條)

分享到微博請遵守國家法律
精河县| 黄山市| 陆丰市| 右玉县| 贵定县| 项城市| 沂水县| 铜陵市| 宜丰县| 方正县| 林西县| 札达县| 咸阳市| 岑溪市| 仁怀市| 理塘县| 晋宁县| 普安县| 兴业县| 凤凰县| 安乡县| 黄石市| 镇康县| 尼勒克县| 黑山县| 从江县| 南华县| 揭阳市| 漳平市| 闵行区| 稻城县| 汉源县| 宿州市| 大埔区| 法库县| 衡东县| 扎鲁特旗| 渑池县| 万载县| 苏尼特左旗| 禄丰县|