use of arekkuusu.solar.common.block.tile.TileQuantumMirror in project Solar by ArekkuusuJerii.
the class BlockQuantumMirror method getItem.
@Override
public ItemStack getItem(World world, BlockPos pos, IBlockState state) {
Optional<TileQuantumMirror> optional = getTile(TileQuantumMirror.class, world, pos);
if (optional.isPresent()) {
TileQuantumMirror mirror = optional.get();
ItemStack stack = new ItemStack(Item.getItemFromBlock(this));
mirror.getKey().ifPresent(uuid -> {
((IEntangledStack) stack.getItem()).setKey(stack, uuid);
});
return stack;
}
return super.getItem(world, pos, state);
}
Aggregations