-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockLog.java
More file actions
79 lines (68 loc) · 1.93 KB
/
BlockLog.java
File metadata and controls
79 lines (68 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.Random;
public class BlockLog extends Block
{
protected BlockLog(int i)
{
super(i, Material.wood);
blockIndexInTexture = 20;
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random)
{
return Block.wood.blockID;
}
public void onBlockRemoval(World world, int i, int j, int k)
{
byte byte0 = 4;
int l = byte0 + 1;
if(world.checkChunksExist(i - l, j - l, k - l, i + l, j + l, k + l))
{
for(int i1 = -byte0; i1 <= byte0; i1++)
{
for(int j1 = -byte0; j1 <= byte0; j1++)
{
for(int k1 = -byte0; k1 <= byte0; k1++)
{
int l1 = world.getBlockId(i + i1, j + j1, k + k1);
if(l1 != Block.leaves.blockID)
{
continue;
}
int i2 = world.getBlockMetadata(i + i1, j + j1, k + k1);
if((i2 & 4) == 0)
{
world.setBlockMetadata(i + i1, j + j1, k + k1, i2 | 4);
}
}
}
}
}
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
if(i == 1)
{
return 21;
}
if(i == 0)
{
return 21;
}
if(j == 1)
{
return 116;
}
return j != 2 ? 20 : 117;
}
protected int damageDropped(int i)
{
return i;
}
}