Skip to content

Commit

Permalink
feat: initial support for 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Misat11 committed Dec 3, 2024
1 parent edaf13f commit 89e1273
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ public Object convertParticleData(@NotNull ParticleData data) {
);
} else if (data instanceof ParticleColor) {
return getBukkitColor(((ParticleColor) data).color());
} else if (data instanceof TargetColor) {
} else if (data instanceof Trail) {
// TODO: update to Trail when the paper-api 1.21.4 artifact is published and move this to support_1_21_3
return new Particle.TargetColor(
((TargetColor) data).location().as(Location.class),
getBukkitColor(((TargetColor) data).color())
((Trail) data).location().as(Location.class),
getBukkitColor(((Trail) data).color())
);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.screamingsandals.lib.particle.ParticleColor;
import org.screamingsandals.lib.particle.ParticleData;
import org.screamingsandals.lib.particle.ParticleType;
import org.screamingsandals.lib.particle.TargetColor;
import org.screamingsandals.lib.particle.Trail;
import org.screamingsandals.lib.particle.Vibration;
import org.screamingsandals.lib.utils.BasicWrapper;
import org.screamingsandals.lib.utils.ResourceLocation;
Expand Down Expand Up @@ -71,7 +71,8 @@ public BukkitParticleType1_9(@NotNull Particle wrappedObject) {
case "Color":
return ParticleColor.class;
case "TargetColor":
return TargetColor.class;
// case "Trail": // TODO: uncomment when the paper-api 1.21.4 artifact is published
return Trail.class;
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

@Data
@Accessors(fluent = true)
public class TargetColor implements ParticleData {
public class Trail implements ParticleData {
private final @NotNull Location location;
private final @NotNull Color color;
private final int duration;
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ junit-platform = "1.10.2"
# plugins
screaming-plugin-builder = "1.0.86"
takenaka = "1.2.0"
mappings = "1.8.8+1.21.3"
mappings = "1.8.8+1.21.4"

[libraries]
paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" }
Expand Down
2 changes: 1 addition & 1 deletion nms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SlibNamingStrategy extends ForwardingNamingStrategy {
accessors {
// uncomment this and remove the mappingBundle dependency,
// if you want to develop against custom versions
/*versionRange('1.8.8', '1.21.3') {
/*versionRange('1.8.8', '1.21.4') {
// exclude 1.20, 1.20.3, 1.20.5 and 1.21.2 - hotfixed versions
// exclude 1.16 and 1.10.1, they don't have most mappings and are basically not used at all
// exclude 1.8.9, client-only update - no Spigot mappings, no thank you
Expand Down

0 comments on commit 89e1273

Please sign in to comment.