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