Files
MinecraftForge/patches/minecraft/net/minecraft/client/particle/FireworkParticles.java.patch
T

32 lines
1.7 KiB
Diff

--- a/net/minecraft/client/particle/FireworkParticles.java
+++ b/net/minecraft/client/particle/FireworkParticles.java
@@ -172,7 +_,7 @@
} else {
for(int i = 0; i < this.f_106752_.size(); ++i) {
CompoundTag compoundtag = this.f_106752_.m_128728_(i);
- if (FireworkRocketItem.Shape.m_41237_(compoundtag.m_128445_("Type")) == FireworkRocketItem.Shape.LARGE_BALL) {
+ if (FireworkRocketItem.Shape.getShape(compoundtag) == FireworkRocketItem.Shape.LARGE_BALL) {
flag1 = true;
break;
}
@@ -192,7 +_,7 @@
if (this.f_106754_ % 2 == 0 && this.f_106752_ != null && this.f_106754_ / 2 < this.f_106752_.size()) {
int k = this.f_106754_ / 2;
CompoundTag compoundtag1 = this.f_106752_.m_128728_(k);
- FireworkRocketItem.Shape fireworkrocketitem$shape = FireworkRocketItem.Shape.m_41237_(compoundtag1.m_128445_("Type"));
+ FireworkRocketItem.Shape fireworkrocketitem$shape = FireworkRocketItem.Shape.getShape(compoundtag1);
boolean flag4 = compoundtag1.m_128471_("Trail");
boolean flag2 = compoundtag1.m_128471_("Flicker");
int[] aint = compoundtag1.m_128465_("Colors");
@@ -201,6 +_,10 @@
aint = new int[]{DyeColor.BLACK.m_41070_()};
}
+ var factory = net.minecraftforge.client.FireworkShapeFactoryRegistry.get(fireworkrocketitem$shape);
+ if (factory != null)
+ factory.build(this, flag4, flag2, aint, aint1);
+ else
switch (fireworkrocketitem$shape) {
case SMALL_BALL:
default: