Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
GravelBlock.cs
浏览该文件的文档.
1namespace Game {
2 public class GravelBlock : CubeBlock {
3 public static int Index = 6;
4
5 public GravelBlock() => IsCollapsable = true;
6
7 public override void GetDropValues(SubsystemTerrain subsystemTerrain,
8 int oldValue,
9 int newValue,
10 int toolLevel,
11 List<BlockDropValue> dropValues,
12 out bool showDebris) {
13 showDebris = true;
14 if (toolLevel < RequiredToolLevel) {
15 return;
16 }
17 if (Random.Float(0f, 1f) < 0.33f) {
18 base.GetDropValues(subsystemTerrain, oldValue, newValue, toolLevel, dropValues, out showDebris);
19 return;
20 }
21 int num = Random.Int(1, 3);
22 for (int i = 0; i < num; i++) {
23 dropValues.Add(new BlockDropValue { Value = Terrain.MakeBlockValue(79), Count = 1 });
24 }
25 }
26 }
27}
bool IsCollapsable
int RequiredToolLevel
override void GetDropValues(SubsystemTerrain subsystemTerrain, int oldValue, int newValue, int toolLevel, List< BlockDropValue > dropValues, out bool showDebris)
float Float()
static int MakeBlockValue(int contents)