Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
SubsystemInWaterBlockBehavior.cs
浏览该文件的文档.
1namespace Game {
3 public override int[] HandledBlocks => [];
4
5 public override void OnItemHarvested(int x, int y, int z, int blockValue, ref BlockDropValue dropValue, ref int newBlockValue) {
6 int level = FluidBlock.GetLevel(Terrain.ExtractData(blockValue));
7 newBlockValue = Terrain.MakeBlockValue(18, 0, FluidBlock.SetLevel(0, level));
8 dropValue.Value = Terrain.MakeBlockValue(Terrain.ExtractContents(blockValue));
9 dropValue.Count = 1;
10 }
11 }
12}
static int GetLevel(int data)
static int SetLevel(int data, int level)
override void OnItemHarvested(int x, int y, int z, int blockValue, ref BlockDropValue dropValue, ref int newBlockValue)
static int ExtractContents(int value)
static int MakeBlockValue(int contents)
static int ExtractData(int value)