mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-19 15:09:15 +00:00
改成silent
This commit is contained in:
@@ -1281,7 +1281,7 @@ public class BukkitServerPlayer extends Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendTotemAnimation(Item<?> totem, @Nullable SoundData sound, boolean removeSound) {
|
public void sendTotemAnimation(Item<?> totem, @Nullable SoundData sound, boolean silent) {
|
||||||
PlayerUtils.sendTotemAnimation(this, totem, sound, removeSound);
|
PlayerUtils.sendTotemAnimation(this, totem, sound, silent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public final class PlayerUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendTotemAnimation(Player player, Item<?> totem, @Nullable SoundData sound, boolean removeSound) {
|
public static void sendTotemAnimation(Player player, Item<?> totem, @Nullable SoundData sound, boolean silent) {
|
||||||
List<Object> packets = new ArrayList<>();
|
List<Object> packets = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
Object totemItem = totem.getLiteralObject();
|
Object totemItem = totem.getLiteralObject();
|
||||||
@@ -86,7 +86,7 @@ public final class PlayerUtils {
|
|||||||
packets.add(NetworkReflections.constructor$ClientboundSetEquipmentPacket.newInstance(
|
packets.add(NetworkReflections.constructor$ClientboundSetEquipmentPacket.newInstance(
|
||||||
player.entityID(), List.of(Pair.of(CoreReflections.instance$EquipmentSlot$OFFHAND, previousOffHandItem))
|
player.entityID(), List.of(Pair.of(CoreReflections.instance$EquipmentSlot$OFFHAND, previousOffHandItem))
|
||||||
));
|
));
|
||||||
if (sound != null || removeSound) {
|
if (sound != null || silent) {
|
||||||
packets.add(NetworkReflections.constructor$ClientboundStopSoundPacket.newInstance(
|
packets.add(NetworkReflections.constructor$ClientboundStopSoundPacket.newInstance(
|
||||||
FastNMS.INSTANCE.method$ResourceLocation$fromNamespaceAndPath("minecraft", "item.totem.use"),
|
FastNMS.INSTANCE.method$ResourceLocation$fromNamespaceAndPath("minecraft", "item.totem.use"),
|
||||||
CoreReflections.instance$SoundSource$PLAYERS
|
CoreReflections.instance$SoundSource$PLAYERS
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public abstract class Player extends AbstractEntity implements NetWorkUser {
|
|||||||
|
|
||||||
public abstract void setExperienceLevels(int level);
|
public abstract void setExperienceLevels(int level);
|
||||||
|
|
||||||
public abstract void sendTotemAnimation(Item<?> totem, @Nullable SoundData sound, boolean removeSound);
|
public abstract void sendTotemAnimation(Item<?> totem, @Nullable SoundData sound, boolean silent);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove() {
|
public void remove() {
|
||||||
|
|||||||
Reference in New Issue
Block a user