mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
34 lines
843 B
Java
34 lines
843 B
Java
package com.hbm.items.special;
|
|
|
|
import com.hbm.entity.item.EntitytemWaste;
|
|
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
public class ItemNuclearWaste extends Item {
|
|
|
|
@Override
|
|
public boolean hasCustomEntity(ItemStack stack) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public int getEntityLifespan(ItemStack itemStack, World world) {
|
|
return Integer.MAX_VALUE;
|
|
}
|
|
|
|
@Override
|
|
public Entity createEntity(World world, Entity entityItem, ItemStack itemstack) {
|
|
|
|
EntitytemWaste entity = new EntitytemWaste(world, entityItem.posX, entityItem.posY, entityItem.posZ, itemstack);
|
|
entity.motionX = entityItem.motionX;
|
|
entity.motionY = entityItem.motionY;
|
|
entity.motionZ = entityItem.motionZ;
|
|
entity.delayBeforeCanPickup = 10;
|
|
|
|
return entity;
|
|
}
|
|
}
|