/
Belyash5
/
Flu
Обзор
Документация
Войти
/
Belyash5
/
Flu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/main/java/com/hbm/items/tool/ItemChainsaw.java
35 строк
1 KB
BallOfEnergy
just in case I disappear, here's particle threading and crate backpacks, along with spider crates, though opening a spider crate in the inventory will not spawn spiders yet.
13 янв 2025, 04:21
13 янв 2025, 04:21
9fa148c
Код
Авторство
О чём код?
package com.hbm.items.tool; import com.hbm.handler.threading.PacketThreading; import com.hbm.inventory.fluid.FluidType; import com.hbm.items.IHeldSoundProvider; import com.hbm.packet.toclient.AuxParticlePacketNT; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; public class ItemChainsaw extends ItemToolAbilityFueled implements IHeldSoundProvider { public ItemChainsaw(float damage, double movement, ToolMaterial material, EnumToolType type, int maxFuel, int consumption, int fillRate, FluidType... acceptedFuels) { super(damage, movement, material, type, maxFuel, consumption, fillRate, acceptedFuels); } @Override public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack) { if(!(entityLiving instanceof EntityPlayerMP)) return false; if(stack.getItemDamage() >= stack.getMaxDamage()) return false; NBTTagCompound nbt = new NBTTagCompound(); nbt.setString("type", "anim"); nbt.setString("mode", "sSwing"); PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)entityLiving); return false; } }