Productive Bees

Productive Bees

10M Downloads

Faulty deserialization in BeeHelper

HalcyonSuoh opened this issue ยท 1 comments

commented

ItemStack amberItem = feederBlockEntity.getSpecificItemFromInventory(ModBlocks.AMBER.get().asItem(), level.random);
var tag = amberItem.get(DataComponents.ENTITY_DATA);
if(tag != null && tag.contains("EntityData")) {
entity = AmberBlockEntity.createEntity(serverLevel, tag.copyTag().getCompound("EntityData"));
}

tag here already encapsulate the serialized entity data, causing tag.contains("EntityData") to always fail, and getCompound("EntityData") to return empty tag

commented

the jig is up! :D

I was kinds contempt with it not working but there's regularly people asking about it so I guess it's best to fix it.