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

歡迎光臨散文網(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–釣魚竿抓鉤的評論 (共 條)

分享到微博請遵守國家法律
抚顺县| 江津市| 仁化县| 阜康市| 宜春市| 黑龙江省| 合江县| 凉城县| 洪江市| 尤溪县| 拉孜县| 大宁县| 南召县| 临洮县| 高阳县| 如东县| 涟源市| 施秉县| 肥乡县| 余姚市| 孟津县| 双流县| 天柱县| 芷江| 兴隆县| 宁晋县| 鹿泉市| 五台县| 乌拉特中旗| 汝南县| 阳信县| 泰安市| 高唐县| 漳平市| 山东省| 中牟县| 许昌市| 勃利县| 屯门区| 肇庆市| 张家港市|