@Override @SafeVarargs public final Block setBlockRetainComponent( Vector3i pos, Block type, Class<? extends Component>... components) { if (GameThread.isCurrentThread()) { EntityRef blockEntity = getBlockEntityAt(pos); Block oldType = super.setBlock(pos, type); if (oldType != null) { updateBlockEntity(blockEntity, pos, oldType, type, false, Sets.newHashSet(components)); } return oldType; } return null; }
@Override public Block setBlockForceUpdateEntity(Vector3i pos, Block type) { if (GameThread.isCurrentThread()) { EntityRef blockEntity = getBlockEntityAt(pos); Block oldType = super.setBlock(pos, type); if (oldType != null) { updateBlockEntity( blockEntity, pos, oldType, type, true, Collections.<Class<? extends Component>>emptySet()); } return oldType; } return null; }