private static void draw(World world, double dx, double dy, double dz, Entity entity, ScarfNode prime, ArrayList<ScarfNode> nodes) {
TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/wool_colored_white");
//TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
ScarfNode lastNode = prime;
for(ScarfNode node : nodes) {
//TODO: Swap out sprites each segment?
float x1 = (float)(node.x-dx);
float x2 = (float)(lastNode.x-dx);
float y1 = (float)(node.y-dy);
float y2 = (float)(lastNode.y-dy);
float z1 = (float)(node.z-dz);
float z2 = (float)(lastNode.z-dz);
float light1 = world.getLight(new BlockPos((int)node.x, (int)node.y, (int)node.z)) / 15f;
float light2 = world.getLight(new BlockPos((int)lastNode.x, (int)lastNode.y, (int)lastNode.z)) / 15f;
ribbon(x1, y1, z1, x2, y2, z2, 0.25f, sprite, node.r, node.g, node.b, light1, light2);
ribbon(x2, y2, z2, x1, y1, z1, 0.25f, sprite, node.r, node.g, node.b, light2, light1);
lastNode = node;
}
}
LayerScarf.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:Thermionics
作者:
评论列表
文章目录