Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package net.minecraft.server;
2
3import java.util.ArrayList;
4import java.util.Random;
5
6import uk.betacraft.uberbukkit.Uberbukkit;
7
8public class BlockStairs extends Block {
9
10 private Block a;
11
12 protected BlockStairs(int i, Block block) {
13 super(i, block.textureId, block.material);
14 this.a = block;
15 this.c(block.strength);
16 this.b(block.durability / 3.0F);
17 this.a(block.stepSound);
18 if (Uberbukkit.getTargetPVN() >= 11) {
19 this.f(255);
20 }
21 }
22
23 public void a(IBlockAccess iblockaccess, int i, int j, int k) {
24 this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
25 }
26
27 public AxisAlignedBB e(World world, int i, int j, int k) {
28 return super.e(world, i, j, k);
29 }
30
31 public boolean a() {
32 return false;
33 }
34
35 public boolean b() {
36 return false;
37 }
38
39 public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist) {
40 int l = world.getData(i, j, k);
41
42 if (l == 0) {
43 this.a(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
44 super.a(world, i, j, k, axisalignedbb, arraylist);
45 this.a(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
46 super.a(world, i, j, k, axisalignedbb, arraylist);
47 } else if (l == 1) {
48 this.a(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
49 super.a(world, i, j, k, axisalignedbb, arraylist);
50 this.a(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
51 super.a(world, i, j, k, axisalignedbb, arraylist);
52 } else if (l == 2) {
53 this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
54 super.a(world, i, j, k, axisalignedbb, arraylist);
55 this.a(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
56 super.a(world, i, j, k, axisalignedbb, arraylist);
57 } else if (l == 3) {
58 this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
59 super.a(world, i, j, k, axisalignedbb, arraylist);
60 this.a(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
61 super.a(world, i, j, k, axisalignedbb, arraylist);
62 }
63
64 this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
65 }
66
67 public void b(World world, int i, int j, int k, EntityHuman entityhuman) {
68 this.a.b(world, i, j, k, entityhuman);
69 }
70
71 public void postBreak(World world, int i, int j, int k, int l) {
72 this.a.postBreak(world, i, j, k, l);
73 }
74
75 public float a(Entity entity) {
76 return this.a.a(entity);
77 }
78
79 public int a(int i, Random random) {
80 return this.a.a(i, random);
81 }
82
83 public int a(Random random) {
84 return this.a.a(random);
85 }
86
87 public int a(int i, int j) {
88 return this.a.a(i, j);
89 }
90
91 public int a(int i) {
92 return this.a.a(i);
93 }
94
95 public int c() {
96 return this.a.c();
97 }
98
99 public void a(World world, int i, int j, int k, Entity entity, Vec3D vec3d) {
100 this.a.a(world, i, j, k, entity, vec3d);
101 }
102
103 public boolean k_() {
104 return this.a.k_();
105 }
106
107 public boolean a(int i, boolean flag) {
108 return this.a.a(i, flag);
109 }
110
111 public boolean canPlace(World world, int i, int j, int k) {
112 return this.a.canPlace(world, i, j, k);
113 }
114
115 public void c(World world, int i, int j, int k) {
116 this.doPhysics(world, i, j, k, 0);
117 this.a.c(world, i, j, k);
118 }
119
120 public void remove(World world, int i, int j, int k) {
121 this.a.remove(world, i, j, k);
122 }
123
124 public void dropNaturally(World world, int i, int j, int k, int l, float f) {
125 this.a.dropNaturally(world, i, j, k, l, f);
126 }
127
128 public void b(World world, int i, int j, int k, Entity entity) {
129 this.a.b(world, i, j, k, entity);
130 }
131
132 public void a(World world, int i, int j, int k, Random random) {
133 this.a.a(world, i, j, k, random);
134 }
135
136 public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) {
137 return this.a.interact(world, i, j, k, entityhuman);
138 }
139
140 public void d(World world, int i, int j, int k) {
141 this.a.d(world, i, j, k);
142 }
143
144 public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) {
145 int l = MathHelper.floor((double) (entityliving.yaw * 4.0F / 360.0F) + 0.5D) & 3;
146
147 if (l == 0) {
148 world.setData(i, j, k, 2);
149 }
150
151 if (l == 1) {
152 world.setData(i, j, k, 1);
153 }
154
155 if (l == 2) {
156 world.setData(i, j, k, 3);
157 }
158
159 if (l == 3) {
160 world.setData(i, j, k, 0);
161 }
162 }
163}