mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 21:51:19 -04:00
Now /map edge floods in actual edge block, instead of being hardcoded to water, fixes #434
This commit is contained in:
parent
3d9f40d94e
commit
4cd5069a77
@ -31,8 +31,12 @@ namespace MCGalaxy.Blocks.Physics {
|
||||
|
||||
//Edge of map water
|
||||
if (lvl.edgeWater && (y < lvl.EdgeLevel && y >= (lvl.EdgeLevel + lvl.SidesOffset))) {
|
||||
if (x == 0 || x == lvl.Width - 1 || z == 0 || z == lvl.Length - 1)
|
||||
lvl.AddUpdate(C.b, Block.water);
|
||||
if (x == 0 || x == lvl.Width - 1 || z == 0 || z == lvl.Length - 1) {
|
||||
ExtBlock block = ExtBlock.FromRaw((byte)lvl.HorizonBlock);
|
||||
PhysicsArgs args = default(PhysicsArgs);
|
||||
args.ExtBlock = block.BlockID == Block.custom_block;
|
||||
lvl.AddUpdate(C.b, block.BlockID, false, args);
|
||||
}
|
||||
}
|
||||
if (!C.data.HasWait) C.data.Data = PhysicsArgs.RemoveFromChecks;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ namespace MCGalaxy.Blocks.Physics {
|
||||
lvl.AddUpdate(C.b, next);
|
||||
}
|
||||
} else {
|
||||
lvl.AddUpdate(C.b, rand.Next(Block.red, Block.darkpink + 1));
|
||||
lvl.AddUpdate(C.b, (byte)rand.Next(Block.red, Block.darkpink + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,11 +231,11 @@ namespace MCGalaxy {
|
||||
}
|
||||
}
|
||||
|
||||
internal bool AddUpdate(int b, int type, bool overRide = false) {
|
||||
internal bool AddUpdate(int b, byte type, bool overRide = false) {
|
||||
return AddUpdate(b, type, overRide, default(PhysicsArgs));
|
||||
}
|
||||
|
||||
internal bool AddUpdate(int b, int type, bool overRide, PhysicsArgs data) {
|
||||
internal bool AddUpdate(int b, byte type, bool overRide, PhysicsArgs data) {
|
||||
try {
|
||||
int x = b % Width;
|
||||
int y = (b / Width) / Length;
|
||||
@ -244,7 +244,7 @@ namespace MCGalaxy {
|
||||
|
||||
if (overRide) {
|
||||
ExtBlock block;
|
||||
block.BlockID = (byte)type;
|
||||
block.BlockID = type;
|
||||
block.ExtID = 0;
|
||||
|
||||
// Is the Ext flag just an indicator for the block update?
|
||||
|
Loading…
x
Reference in New Issue
Block a user