13
0
geforkt von Mirrors/Paper

SPIGOT-7974: Fix Crash for Creaking Heart Block particle

By: Doc <nachito94@msn.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2024-12-03 21:52:01 -03:00
Ursprung 5381ea78f7
Commit 6d16e47300

Datei anzeigen

@ -491,16 +491,19 @@
}
private Explosion.Effect getDestroyType(GameRules.GameRuleKey<GameRules.GameRuleBoolean> gamerules_gamerulekey) {
@@ -1226,15 +1422,18 @@
@@ -1226,15 +1422,22 @@
}
public <T extends ParticleParam> int sendParticles(T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
- return this.sendParticles(t0, false, false, d0, d1, d2, i, d3, d4, d5, d6);
+ // CraftBukkit - visibility api support
+ return this.sendParticlesSource(null, t0, false, false, d0, d1, d2, i, d3, d4, d5, d6);
+ return this.sendParticlesSource(null, t0, false, false, d0, d1, d2, i, d3, d4, d5, d6); // CraftBukkit - visibility api support
}
- public <T extends ParticleParam> int sendParticles(T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
public <T extends ParticleParam> int sendParticles(T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
+ return this.sendParticlesSource(null, t0, flag, flag1, d0, d1, d2, i, d3, d4, d5, d6); // CraftBukkit - visibility api support
+ }
+
+ // CraftBukkit start - visibility api support
+ public <T extends ParticleParam> int sendParticlesSource(EntityPlayer sender, T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
+ // CraftBukkit end
PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, flag, flag1, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
@ -512,7 +515,7 @@
if (this.sendParticles(entityplayer, flag, d0, d1, d2, packetplayoutworldparticles)) {
++j;
@@ -1292,7 +1491,7 @@
@@ -1292,7 +1495,7 @@
@Nullable
public BlockPosition findNearestMapStructure(TagKey<Structure> tagkey, BlockPosition blockposition, int i, boolean flag) {
@ -521,7 +524,7 @@
return null;
} else {
Optional<HolderSet.Named<Structure>> optional = this.registryAccess().lookupOrThrow(Registries.STRUCTURE).get(tagkey);
@@ -1334,11 +1533,22 @@
@@ -1334,11 +1537,22 @@
@Nullable
@Override
public WorldMap getMapData(MapId mapid) {
@ -545,7 +548,7 @@
this.getServer().overworld().getDataStorage().set(mapid.key(), worldmap);
}
@@ -1649,6 +1859,11 @@
@@ -1649,6 +1863,11 @@
@Override
public void blockUpdated(BlockPosition blockposition, Block block) {
if (!this.isDebug()) {
@ -557,7 +560,7 @@
this.updateNeighborsAt(blockposition, block);
}
@@ -1668,12 +1883,12 @@
@@ -1668,12 +1887,12 @@
}
public boolean isFlat() {
@ -572,7 +575,7 @@
}
@Nullable
@@ -1696,7 +1911,7 @@
@@ -1696,7 +1915,7 @@
private static <T> String getTypeCount(Iterable<T> iterable, Function<T, String> function) {
try {
Object2IntOpenHashMap<String> object2intopenhashmap = new Object2IntOpenHashMap();
@ -581,7 +584,7 @@
while (iterator.hasNext()) {
T t0 = iterator.next();
@@ -1705,7 +1920,7 @@
@@ -1705,7 +1924,7 @@
object2intopenhashmap.addTo(s, 1);
}
@ -590,7 +593,7 @@
String s1 = (String) entry.getKey();
return s1 + ":" + entry.getIntValue();
@@ -1864,6 +2079,8 @@
@@ -1864,6 +2083,8 @@
}
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
@ -599,7 +602,7 @@
}
public void onTrackingEnd(Entity entity) {
@@ -1895,6 +2112,14 @@
@@ -1895,6 +2116,14 @@
}
entity.updateDynamicGameEventListener(DynamicGameEventListener::remove);