Repository: PaperMC/Paper
File: paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java (Java)

Code before:
        Map<Side, Material> sherds = new EnumMap<>(Side.class);
        sherds.put(Side.BACK, CraftItemType.minecraftToBukkit(decorations.back().orElse(Items.BRICK)));
        sherds.put(Side.LEFT, CraftItemType.minecraftToBukkit(decorations.left().orElse(Items.BRICK)));
        sherds.put(Side.RIGHT, CraftItemType.minecraftToBukkit(decorations.right().orElse(Items.BRICK)));
        sherds.put(Side.FRONT, CraftItemType.minecraftToBukkit(decorations.front().orElse(Items.BRICK)));
        return sherds;
    }

    @Override
    public List<Material> getShards() {
        return this.getSnapshot().getDecorations().ordered().stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toUnmodifiableList());
    }

    @Override
    public CraftDecoratedPot copy() {
        return new CraftDecoratedPot(this, null);
    }

    @Override
    public CraftDecoratedPot copy(Location location) {
        return new CraftDecoratedPot(this, location);
    }

    // Paper start - expose wobble animation
    @Override
    public void startWobble(@NotNull final Wobble style) {
        Preconditions.checkArgument(style != null, "style must not be null");

        DecoratedPotBlockEntity.WobbleStyle originalStyle = switch (style) {
            case POSITIVE -> DecoratedPotBlockEntity.WobbleStyle.POSITIVE;
            case NEGATIVE -> DecoratedPotBlockEntity.WobbleStyle.NEGATIVE;
            default -> throw new IllegalArgumentException("Unexpected value: " + style);
        };
        this.getBlockEntity().wobble(originalStyle);
    }
    // Paper end - expose wobble animation
}


Review comment (suggestion):
You do not really need the @NotNull annotation here. And if you are importing a new nullability annotation, use the jspecify ones.

Code after:
        Map<Side, Material> sherds = new EnumMap<>(Side.class);
        sherds.put(Side.BACK, CraftItemType.minecraftToBukkit(decorations.back().orElse(Items.BRICK)));
        sherds.put(Side.LEFT, CraftItemType.minecraftToBukkit(decorations.left().orElse(Items.BRICK)));
        sherds.put(Side.RIGHT, CraftItemType.minecraftToBukkit(decorations.right().orElse(Items.BRICK)));
        sherds.put(Side.FRONT, CraftItemType.minecraftToBukkit(decorations.front().orElse(Items.BRICK)));
        return sherds;
    }

    @Override
    public List<Material> getShards() {
        return this.getSnapshot().getDecorations().ordered().stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toUnmodifiableList());
    }

    @Override
    public CraftDecoratedPot copy() {
        return new CraftDecoratedPot(this, null);
    }

    @Override
    public CraftDecoratedPot copy(Location location) {
        return new CraftDecoratedPot(this, location);
    }

    @Override
    public void startWobble(@NotNull final WobbleStyle style) {
        Preconditions.checkArgument(style != null, "style must not be null");
        this.requirePlaced();

        DecoratedPotBlockEntity.WobbleStyle originalStyle = switch (style) {
            case POSITIVE -> DecoratedPotBlockEntity.WobbleStyle.POSITIVE;
            case NEGATIVE -> DecoratedPotBlockEntity.WobbleStyle.NEGATIVE;
        };
        this.getBlockEntity().wobble(originalStyle);
    }
}