use of hellfirepvp.astralsorcery.common.item.block.ItemBlockCollectorCrystal in project AstralSorcery by HellFirePvP.
the class BlockCollectorCrystal method onBlockPlacedBy.
@Override
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {
TileCollectorCrystal tcc = MiscUtils.getTileAt(world, pos, TileCollectorCrystal.class, true);
Item i = stack.getItem();
if (tcc != null && i instanceof ItemBlockCollectorCrystal) {
ItemBlockCollectorCrystal ibcc = (ItemBlockCollectorCrystal) i;
UUID playerUUID = null;
if (entity instanceof PlayerEntity) {
playerUUID = entity.getUniqueID();
}
tcc.updateData(playerUUID, ibcc.getCollectorType());
}
super.onBlockPlacedBy(world, pos, state, entity, stack);
}
Aggregations