mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 03:25:14 -04:00
Finish EnvMapAppearance v3 (now EnvMapAspect to avoid breaking backwards compatibility.)
This commit is contained in:
parent
5498c5e4fa
commit
05a8f5f598
@ -69,6 +69,7 @@ namespace ClassicalSharp.Network {
|
||||
"EnvColors", "SelectionCuboid", "BlockPermissions", "ChangeModel", "EnvMapAppearance",
|
||||
"EnvWeatherType", "HackControl", "MessageTypes", "PlayerClick", "FullCP437",
|
||||
"LongerMessages", "BlockDefinitions", "BlockDefinitionsExt", "BulkBlockUpdate", "TextColors",
|
||||
"EnvMapAspect",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ namespace ClassicalSharp.Network {
|
||||
}
|
||||
|
||||
internal void HandleEnvSetMapAppearance() {
|
||||
HandleSetEnvMapUrl();
|
||||
HandleSetMapEnvUrl();
|
||||
game.World.Env.SetSidesBlock( (Block)reader.ReadUInt8() );
|
||||
game.World.Env.SetEdgeBlock( (Block)reader.ReadUInt8() );
|
||||
game.World.Env.SetEdgeLevel( reader.ReadInt16() );
|
||||
@ -362,7 +362,7 @@ namespace ClassicalSharp.Network {
|
||||
game.Events.RaiseColourCodesChanged();
|
||||
}
|
||||
|
||||
internal void HandleSetEnvMapUrl() {
|
||||
internal void HandleSetMapEnvUrl() {
|
||||
string url = reader.ReadAsciiString();
|
||||
if( !game.AllowServerTextures ) return;
|
||||
|
||||
@ -374,7 +374,7 @@ namespace ClassicalSharp.Network {
|
||||
Utils.LogDebug( "Image url: " + url );
|
||||
}
|
||||
|
||||
internal void HandleSetEnvMapProperty() {
|
||||
internal void HandleSetMapEnvProperty() {
|
||||
byte type = reader.ReadUInt8();
|
||||
int value = reader.ReadInt32();
|
||||
WorldEnv env = game.World.Env;
|
||||
|
@ -202,6 +202,8 @@ namespace ClassicalSharp.Network {
|
||||
Set( Opcode.CpeDefineBlockExt, HandleDefineBlockExt, 85 );
|
||||
Set( Opcode.CpeBulkBlockUpdate, HandleBulkBlockUpdate, 1282 );
|
||||
Set( Opcode.CpeSetTextColor, HandleSetTextColor, 6 );
|
||||
Set( Opcode.CpeSetMapEnvUrl, HandleSetMapEnvUrl, 65 );
|
||||
Set( Opcode.CpeSetMapEnvProperty, HandleSetMapEnvProperty, 6 );
|
||||
}
|
||||
|
||||
void OnNewMap( object sender, EventArgs e ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user