3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-18 14:00:05 +01:00
Paper/src/main/java/net/minecraft/server/BlockStairs.java

152 Zeilen
4.1 KiB
Java

2011-09-21 07:40:18 +02:00
package net.minecraft.server;
import java.util.ArrayList;
import java.util.Random;
public class BlockStairs extends Block {
private Block a;
protected BlockStairs(int i, Block block) {
super(i, block.textureId, block.material);
this.a = block;
this.c(block.strength);
this.b(block.durability / 3.0F);
this.a(block.stepSound);
2011-11-20 09:01:14 +01:00
this.g(255);
2011-09-21 07:40:18 +02:00
}
public void a(IBlockAccess iblockaccess, int i, int j, int k) {
this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public AxisAlignedBB e(World world, int i, int j, int k) {
return super.e(world, i, j, k);
}
public boolean a() {
return false;
}
public boolean b() {
return false;
}
2011-11-20 09:01:14 +01:00
public int c() {
return 10;
}
2011-09-21 07:40:18 +02:00
public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist) {
int l = world.getData(i, j, k);
if (l == 0) {
this.a(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
super.a(world, i, j, k, axisalignedbb, arraylist);
this.a(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.a(world, i, j, k, axisalignedbb, arraylist);
} else if (l == 1) {
this.a(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
super.a(world, i, j, k, axisalignedbb, arraylist);
this.a(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.a(world, i, j, k, axisalignedbb, arraylist);
} else if (l == 2) {
this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
super.a(world, i, j, k, axisalignedbb, arraylist);
this.a(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
super.a(world, i, j, k, axisalignedbb, arraylist);
} else if (l == 3) {
this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
super.a(world, i, j, k, axisalignedbb, arraylist);
this.a(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
super.a(world, i, j, k, axisalignedbb, arraylist);
}
this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void b(World world, int i, int j, int k, EntityHuman entityhuman) {
this.a.b(world, i, j, k, entityhuman);
}
public void postBreak(World world, int i, int j, int k, int l) {
this.a.postBreak(world, i, j, k, l);
}
public float a(Entity entity) {
return this.a.a(entity);
}
public int a(int i, int j) {
return this.a.a(i, 0);
}
public int a(int i) {
return this.a.a(i, 0);
}
2011-11-20 09:01:14 +01:00
public int d() {
return this.a.d();
2011-09-21 07:40:18 +02:00
}
public void a(World world, int i, int j, int k, Entity entity, Vec3D vec3d) {
this.a.a(world, i, j, k, entity, vec3d);
}
2011-11-20 09:01:14 +01:00
public boolean v_() {
return this.a.v_();
2011-09-21 07:40:18 +02:00
}
public boolean a(int i, boolean flag) {
return this.a.a(i, flag);
}
public boolean canPlace(World world, int i, int j, int k) {
return this.a.canPlace(world, i, j, k);
}
public void a(World world, int i, int j, int k) {
this.doPhysics(world, i, j, k, 0);
this.a.a(world, i, j, k);
}
public void remove(World world, int i, int j, int k) {
this.a.remove(world, i, j, k);
}
public void b(World world, int i, int j, int k, Entity entity) {
this.a.b(world, i, j, k, entity);
}
public void a(World world, int i, int j, int k, Random random) {
this.a.a(world, i, j, k, random);
}
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) {
return this.a.interact(world, i, j, k, entityhuman);
}
public void a_(World world, int i, int j, int k) {
this.a.a_(world, i, j, k);
}
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) {
int l = MathHelper.floor((double) (entityliving.yaw * 4.0F / 360.0F) + 0.5D) & 3;
if (l == 0) {
world.setData(i, j, k, 2);
}
if (l == 1) {
world.setData(i, j, k, 1);
}
if (l == 2) {
world.setData(i, j, k, 3);
}
if (l == 3) {
world.setData(i, j, k, 0);
}
}
}