-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockSponge.java
More file actions
51 lines (40 loc) · 1.27 KB
/
BlockSponge.java
File metadata and controls
51 lines (40 loc) · 1.27 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
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
public class BlockSponge extends Block
{
protected BlockSponge(int i)
{
super(i, Material.sponge);
blockIndexInTexture = 48;
}
public void onBlockAdded(World world, int i, int j, int k)
{
byte byte0 = 2;
for(int l = i - byte0; l <= i + byte0; l++)
{
for(int i1 = j - byte0; i1 <= j + byte0; i1++)
{
for(int j1 = k - byte0; j1 <= k + byte0; j1++)
{
if(world.getBlockMaterial(l, i1, j1) != Material.water);
}
}
}
}
public void onBlockRemoval(World world, int i, int j, int k)
{
byte byte0 = 2;
for(int l = i - byte0; l <= i + byte0; l++)
{
for(int i1 = j - byte0; i1 <= j + byte0; i1++)
{
for(int j1 = k - byte0; j1 <= k + byte0; j1++)
{
world.notifyBlocksOfNeighborChange(l, i1, j1, world.getBlockId(l, i1, j1));
}
}
}
}
}