#Any idea why this says my worlds are corrupted

4 messages · Page 1 of 1 (latest)

hushed cobalt
#
package hero.bane.mixin;

import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.commands.data.EntityDataAccessor;
import net.minecraft.world.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;

import java.util.UUID;

@Mixin(EntityDataAccessor.class)
public class EntityDataAccessorMixin {
    /**
     * Removes player check in this method
     * @author HerobaneNair
     * @reason So you can edit player data
     */
    @Overwrite
    public void setData(CompoundTag compoundTag) {
        Entity entity = ((EntityDataAccessorer) this).getEntity();

        UUID uUID = entity.getUUID();
        entity.load(compoundTag);
        entity.setUUID(uUID);
    }
}

Trying to override it so I can /data merge entity player

hushed cobalt
#

its for mojang mappings

pallid sentinel
#

you are attempting to rewrite the entire setData method?

hushed cobalt
#

yes