/** Creates a new pumpkin ItemStack with the info this object is tracking. */ public ItemStack getPumpkin() { // Note: I must trust that this object actually contain a pumpkin info. final int[] enchantIds = (int[]) this.getObject(); // Enchantment IDs ArrayList<GolemEnchantment> enchantedList = GolemEnchantment.convertToEnchantList(enchantIds); ItemStack pumpkin = MagicHelper.getEnchantedPumpkin(enchantedList); // Custom name if (this.getCustomName() != "") { pumpkin.setStackDisplayName(this.getCustomName()); } return pumpkin; }
public EventTracker(ItemStack pumpkin, Vec3i pos) { this(0, pos, pumpkin.getDisplayName(), MagicHelper.getEnchantmentIds(pumpkin)); }