Botania

Botania

133M Downloads

[237] Flare Chakram becomes Thorn on the other side when you throw it through a nether portal

Azutte opened this issue ยท 1 comments

commented

Entire issue described in title. Also it renders as flare as it goes into the distance past the portal, but it never comes back (and has transformed and is on the ground and has lost momentum in the nether)

commented

@Vazkii
Here is my diagnosis:

This is called when an entity goes to the nether. The new entity in the other dimension is a new entity made by new entity = EntityList.createEntityByName(EntityList.getEntityString(oldentity), worldserver1);, then the nbt is copied with newentity.copyDataFrom(oldentity, true);, and finally worldserver1.spawnEntityInWorld(newentity);' whereworldserver1` is the dimension the entity travels to. Afterwards the old entity is setDead.

I don't know how dataWatcher works, but if it doesn't use NBT thats your problem.

/**
     * Copies important data from another entity to this entity. Used when teleporting entities between worlds, as this
     * actually deletes the teleporting entity and re-creates it on the other side. Params: Entity to copy from, unused
     * (always true)
     */
    public void copyDataFrom(Entity p_82141_1_, boolean p_82141_2_)
    {
        NBTTagCompound nbttagcompound = new NBTTagCompound();
        p_82141_1_.writeToNBT(nbttagcompound);
        this.readFromNBT(nbttagcompound);
        this.timeUntilPortal = p_82141_1_.timeUntilPortal;
        this.teleportDirection = p_82141_1_.teleportDirection;
    }

Edit: on closer inspection, dataWatcher appears to work on instances, not on NBT. This means that relogging while a flame chakram is in the air will probably also make it drop as normal chakram