mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Fix doing /env horizon/border with block ID over 255 not working properly until /reload
This commit is contained in:
parent
d63231311d
commit
6de0dd0d2a
@ -136,14 +136,17 @@ namespace MCGalaxy {
|
||||
}
|
||||
}
|
||||
|
||||
internal static void UpdateAppearance(Predicate<Player> selector, EnvProp prop, int value) {
|
||||
internal static void UpdateAppearance(Predicate<Player> selector, EnvProp prop, int origValue) {
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
if (prop == EnvProp.SidesBlock || prop == EnvProp.EdgeBlock) {
|
||||
value = (byte)value;
|
||||
}
|
||||
|
||||
foreach (Player pl in players) {
|
||||
if (!selector(pl)) continue;
|
||||
int value = origValue;
|
||||
|
||||
if (prop == EnvProp.SidesBlock || prop == EnvProp.EdgeBlock) {
|
||||
BlockID raw = Block.ToRaw((BlockID)value);
|
||||
if (raw > pl.MaxRawBlock) raw = pl.level.RawFallback((BlockID)value);
|
||||
value = raw;
|
||||
}
|
||||
|
||||
if (pl.Supports(CpeExt.EnvMapAspect)) {
|
||||
pl.Send(Packet.EnvMapProperty(prop, value));
|
||||
|
Loading…
x
Reference in New Issue
Block a user