Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
PumpkinBlock.cs
浏览该文件的文档.
1
namespace
Game
{
2
public
class
PumpkinBlock
:
BasePumpkinBlock
{
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
}
Game.BasePumpkinBlock.GetSize
static int GetSize(int data)
定义
BasePumpkinBlock.cs:201
Game.BasePumpkinBlock.BasePumpkinBlock
BasePumpkinBlock(bool isRotten)
定义
BasePumpkinBlock.cs:14
Game.BasePumpkinBlock.GetIsDead
static bool GetIsDead(int data)
定义
BasePumpkinBlock.cs:205
Game.PumpkinBlock.PumpkinBlock
PumpkinBlock()
定义
PumpkinBlock.cs:5
Game.PumpkinBlock.GetDropValues
override void GetDropValues(SubsystemTerrain subsystemTerrain, int oldValue, int newValue, int toolLevel, List< BlockDropValue > dropValues, out bool showDebris)
定义
PumpkinBlock.cs:7
Game.PumpkinBlock.IsMovableByPiston
override bool IsMovableByPiston(int value, int pistonFace, int y, out bool isEnd)
定义
PumpkinBlock.cs:22
Game.PumpkinBlock.Index
static int Index
定义
PumpkinBlock.cs:3
Game.Random
定义
Random.cs:5
Game.Random.Bool
bool Bool()
定义
Random.cs:39
Game.SubsystemTerrain
定义
SubsystemTerrain.cs:6
Game.Terrain
定义
Terrain.cs:5
Game.Terrain.ExtractData
static int ExtractData(int value)
定义
Terrain.cs:307
Game
定义
ContentFileBridge.cs:4
Game.BlockDropValue
定义
BlockDropValue.cs:4
SurvivalcraftApi 1.8.2.3
Survivalcraft.Windows
Block
PumpkinBlock.cs
制作者
1.16.1