Return InteractionResultHolder.sidedSuccess(itemStack, world. Player.awardStat(Stats.ITEM_USED.get(this), itemsToThrow) Int itemsToThrow = Math.min(itemStack.getCount(), BURST_COUNT) įor(int i = 0 i throwItem(world, player, itemStack, randomsource), 200 * i, TimeUnit.MILLISECONDS) Navigate to Options, then Video settings, then 'Shader Packs' and click the 'Open Shader Pack. ItemStack itemStack = player.getItemInHand(hand) Open the Minecraft launcher and select the newly created profile. Public InteractionResultHolder use(Level world, Player player, InteractionHand hand) Implementing the e method to throw multiple projectiles over time If that's relevant, here's a more comprehensive example: My specific use case was to throw a burst of projectiles in sequence after right-clicking only once. ScheduledExecutorService executor = Executors.newScheduledThreadPool(1) Įxecutor.schedule(() -> doSomething(), time, TimeUnit.MILLISECONDS) ĭisclaimer: While I've confirmed that this works, I don't know if there exist strong conventions against using custom thread code, although this is a simple use. It’s not often that a shader can be designed to significantly improve visuals without negatively impacting performance, but this shader does so admirably. Many consider these shaders to be low-end, but they do not skimp on features One of the best low-end shaders for Minecraft 1.20 is Sildur’s Vibrant Lite. The quickest "two-liner" seems to be possible with a ScheduledExecutorService: Sildur’s Vibrant Lite is packed with features. I just came across the same topic myself and wanted to leave my solution for anyone in need in the future.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |