Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
PumpkinBlock.cs
浏览该文件的文档.
1namespace Game {
3 public static int Index = 131;
4
5 public PumpkinBlock() : base(false) { }
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 base.GetDropValues(subsystemTerrain, oldValue, newValue, toolLevel, dropValues, out showDebris);
14 int data = Terrain.ExtractData(oldValue);
15 if (GetSize(data) == 7
16 && !GetIsDead(data)
17 && Random.Bool(0.5f)) {
18 dropValues.Add(new BlockDropValue { Value = 248, Count = 1 });
19 }
20 }
21
22 public override bool IsMovableByPiston(int value, int pistonFace, int y, out bool isEnd) {
23 isEnd = false;
24 return false;
25 }
26 }
27}
static int GetSize(int data)
static bool GetIsDead(int data)
override void GetDropValues(SubsystemTerrain subsystemTerrain, int oldValue, int newValue, int toolLevel, List< BlockDropValue > dropValues, out bool showDebris)
override bool IsMovableByPiston(int value, int pistonFace, int y, out bool isEnd)
static int ExtractData(int value)