Disable fireworks for consoles (Addresses #1083, #1164)

Not ideal, but there isn't a whole lot we can do as this is a game bug within console versions.
This commit is contained in:
RednedEpic 2020-08-17 20:04:12 -05:00
parent 8c514d9feb
commit 6db56fd68b

View file

@ -40,6 +40,7 @@ import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.utils.FireworkColor; import org.geysermc.connector.utils.FireworkColor;
import org.geysermc.connector.utils.MathUtils; import org.geysermc.connector.utils.MathUtils;
import org.geysermc.floodgate.util.DeviceOS;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -64,6 +65,12 @@ public class FireworkEntity extends Entity {
return; return;
} }
// TODO: Remove once Mojang fixes bugs with fireworks crashing clients on these specific devices.
// https://bugs.mojang.com/browse/MCPE-89115
if (session.getClientData().getDeviceOS() == DeviceOS.XBOX_ONE || session.getClientData().getDeviceOS() == DeviceOS.ORBIS) {
return;
}
CompoundTag fireworks = tag.get("Fireworks"); CompoundTag fireworks = tag.get("Fireworks");
NbtMapBuilder fireworksBuilder = NbtMap.builder(); NbtMapBuilder fireworksBuilder = NbtMap.builder();