Fixed ghost custom item duplication

This commit is contained in:
luisc committed 2024-03-26 14:39:43 -05:00
1 parent de909472b3
commit e32802dcc1
2 files changed
-44

No files matched your search

@@ -21,7 +21,6 @@ import noppes.npcs.EventHooks;
import noppes.npcs.api.item.IItemStack;
import noppes.npcs.config.ConfigScript;
import noppes.npcs.constants.EnumGuiType;
import noppes.npcs.entity.EntityItemScripted;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.event.ItemEvent;
import noppes.npcs.scripted.item.ScriptCustomItem;
@@ -160,21 +159,6 @@ public class ItemScripted extends Item implements ItemRenderInterface {
@Override
public void renderSpecial() {}
public boolean hasCustomEntity(ItemStack stack)
{
return true;
}
public EntityItemScripted createEntity(World world, Entity location, ItemStack itemstack)
{
EntityItemScripted entityScriptedItem = new EntityItemScripted(world,location.posX,location.posY,location.posZ, itemstack);
entityScriptedItem.motionX = location.motionX;
entityScriptedItem.motionY = location.motionY;
entityScriptedItem.motionZ = location.motionZ;
return entityScriptedItem;
}
public void renderOffset(ScriptCustomItem scriptCustomItem) {
GL11.glTranslatef(0.135F * scriptCustomItem.scaleX, 0.2F * scriptCustomItem.scaleY, 0.07F * scriptCustomItem.scaleZ);
}