mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-28 19:38:35 +01:00
[BLIND] Implement MC 1.5 snow levels with an extra block-flag.
This commit is contained in:
parent
a2b1412ab1
commit
a9564ea8fd
@ -28,6 +28,10 @@ public class BlocksMC1_5 implements BlockPropertiesSetup {
|
|||||||
|
|
||||||
// TODO: This is guessing !
|
// TODO: This is guessing !
|
||||||
|
|
||||||
|
/////////////////////
|
||||||
|
// New blocks
|
||||||
|
////////////////////
|
||||||
|
|
||||||
// 146 Trapped Chest
|
// 146 Trapped Chest
|
||||||
setFlagsAs(146, Material.CHEST);
|
setFlagsAs(146, Material.CHEST);
|
||||||
BlockProperties.setBlockProps(146, BlockProperties.getBlockProps(Material.CHEST.getId()));
|
BlockProperties.setBlockProps(146, BlockProperties.getBlockProps(Material.CHEST.getId()));
|
||||||
@ -61,6 +65,13 @@ public class BlocksMC1_5 implements BlockPropertiesSetup {
|
|||||||
// 157 Activator Rail
|
// 157 Activator Rail
|
||||||
setFlagsAs(157, Material.DETECTOR_RAIL);
|
setFlagsAs(157, Material.DETECTOR_RAIL);
|
||||||
|
|
||||||
|
/////////////////////
|
||||||
|
// Changed blocks
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
// 78 Snow
|
||||||
|
addFlags(78, BlockProperties.F_HEIGHT_8_INC);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1428,6 +1428,10 @@ public class BlockProperties {
|
|||||||
if (data < 3) return 0;
|
if (data < 3) return 0;
|
||||||
else return 0.5;
|
else return 0.5;
|
||||||
}
|
}
|
||||||
|
else if ((flags & F_HEIGHT_8_INC) != 0){
|
||||||
|
final int data = (access.getData(x, y, z) & 0xF) % 8;
|
||||||
|
return 0.125 * (double) data;
|
||||||
|
}
|
||||||
// Height 100 is ignored (!).
|
// Height 100 is ignored (!).
|
||||||
else if ((flags & F_HEIGHT150) != 0){
|
else if ((flags & F_HEIGHT150) != 0){
|
||||||
return 1.5;
|
return 1.5;
|
||||||
@ -1781,6 +1785,11 @@ public class BlockProperties {
|
|||||||
// bmaxY = (double) (1 + data) / 8.0;
|
// bmaxY = (double) (1 + data) / 8.0;
|
||||||
bmaxY = data < 3 ? 0 : 0.5;
|
bmaxY = data < 3 ? 0 : 0.5;
|
||||||
}
|
}
|
||||||
|
else if ((flags & F_HEIGHT_8_INC) != 0){
|
||||||
|
bminY = 0;
|
||||||
|
final int data = (access.getData(x, y, z) & 0xF) % 8;
|
||||||
|
bmaxY = 0.125 * data;
|
||||||
|
}
|
||||||
else if ((flags & F_HEIGHT150) != 0){
|
else if ((flags & F_HEIGHT150) != 0){
|
||||||
bminY = 0;
|
bminY = 0;
|
||||||
bmaxY = 1.5;
|
bmaxY = 1.5;
|
||||||
|
Loading…
Reference in New Issue
Block a user