public static EntityTextureFX addTextureEffects(World world, int x, int y, int z, AbstractTexture texture, int side,float u,float v) {
Block block = world.getBlock(x, y, z);
if(block==null) return null;
double w = block.getBlockBoundsMaxX() - block.getBlockBoundsMinX();
double h = block.getBlockBoundsMaxY() - block.getBlockBoundsMinY();
double l = block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ();
double px = rand.nextDouble() * w;
double py = rand.nextDouble() * h;
double pz = rand.nextDouble() * l;
float f = 0.25F;
double d0 = x + block.getBlockBoundsMinX() + px;
double d1 = y + block.getBlockBoundsMinY() + py;
double d2 = z + block.getBlockBoundsMinZ() + pz;
switch (side) {
case 0:
d1 = y + block.getBlockBoundsMinY() - f;
break;
case 1:
d1 = y + block.getBlockBoundsMaxY() + f;
break;
case 2:
d2 = z + block.getBlockBoundsMinZ() - f;
break;
case 3:
d2 = z + block.getBlockBoundsMaxZ() + f;
break;
case 4:
d0 = x + block.getBlockBoundsMinX() - f;
break;
case 5:
d0 = x + block.getBlockBoundsMaxX() + f;
break;
}
double motion=0.5;
EntityTextureFX res = new EntityTextureFX(world, d0, d1, d2, motion*(px/w-0.5), motion*(py/h-0.5), motion*(pz/l-0.5), texture, u, v);
return res;
}
GeneralStatueClient.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:Statues
作者:
评论列表
文章目录