本文整理汇总了Java中ethanjones.cubes.world.storage.Area.updateRender方法的典型用法代码示例。如果您正苦于以下问题:Java Area.updateRender方法的具体用法?Java Area.updateRender怎么用?Java Area.updateRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ethanjones.cubes.world.storage.Area
的用法示例。
在下文中一共展示了Area.updateRender方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tryPropagateRemove
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateRemove(ArrayDeque<LightNode> removeQueue, ArrayDeque<LightNode> addQueue,
LightWorldSection w, int x, int y, int z, int l) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref]))
return;
int p = ((a.light[ref] >> 4) & 0xF);
if (p != 0 && p < l) {
a.light[ref] = (byte) (a.light[ref] & 0xF); // same as
// ((a.light[ref] &
// 0xF0) | (0 << 4))
a.updateRender(y / SIZE_BLOCKS);
a.modify();
removeQueue.add(new LightNode(x, y, z, p));
} else if (p >= l) {
addQueue.add(new LightNode(x, y, z, p));
}
}
示例2: tryPropagateAdd
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateAdd(ArrayDeque<LightNode> lightQueue, LightWorldSection w, int x, int y, int z,
int ln) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref]))
return;
int i = ((a.light[ref] >> 4) & 0xF);
if (i + 1 <= ln) { // DIFFERENT + 1 instead of + 2
a.light[ref] = (byte) ((a.light[ref] & 0xF) | (ln << 4));
a.updateRender(y / SIZE_BLOCKS);
a.modify();
lightQueue.add(new LightNode(x, y, z, ln));
}
}
示例3: tryPropagateRemove
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateRemove(ArrayDeque<LightNode> removeQueue, ArrayDeque<LightNode> addQueue,
LightWorldSection w, int x, int y, int z, int l) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref]))
return;
int p = a.light[ref] & 0xF;
if (p != 0 && p < l) {
a.light[ref] = (byte) (a.light[ref] & 0xF0); // same as
// ((a.light[ref] &
// 0xF0) | 0)
a.updateRender(y / SIZE_BLOCKS);
a.modify();
removeQueue.add(new LightNode(x, y, z, p));
} else if (p >= l) {
addQueue.add(new LightNode(x, y, z, p));
}
}
示例4: tryPropagateRemove
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateRemove(ArrayDeque<LightNode> removeQueue, ArrayDeque<LightNode> addQueue, LightWorldSection w, int x, int y, int z, int l) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref])) return;
int p = ((a.light[ref] >> 4) & 0xF);
if (p != 0 && p < l) {
a.light[ref] = (byte) (a.light[ref] & 0xF); // same as ((a.light[ref] & 0xF0) | (0 << 4))
a.updateRender(y / SIZE_BLOCKS);
a.modify();
removeQueue.add(new LightNode(x, y, z, p));
} else if (p >= l) {
addQueue.add(new LightNode(x, y, z, p));
}
}
示例5: tryPropagateRemove
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateRemove(ArrayDeque<LightNode> removeQueue, ArrayDeque<LightNode> addQueue, LightWorldSection w, int x, int y, int z, int l) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref])) return;
int p = a.light[ref] & 0xF;
if (p != 0 && p < l) {
a.light[ref] = (byte) (a.light[ref] & 0xF0); // same as ((a.light[ref] & 0xF0) | 0)
a.updateRender(y / SIZE_BLOCKS);
a.modify();
removeQueue.add(new LightNode(x, y, z, p));
} else if (p >= l) {
addQueue.add(new LightNode(x, y, z, p));
}
}
示例6: tryPropagateAdd
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateAdd(ArrayDeque<LightNode> lightQueue, LightWorldSection w, int x, int y, int z,
int l) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref]))
return;
if ((a.light[ref] & 0xF) + 2 <= l) {
a.light[ref] = (byte) ((a.light[ref] & 0xF0) | (l - 1));
a.updateRender(y / SIZE_BLOCKS);
a.modify();
lightQueue.add(new LightNode(x, y, z, l - 1));
}
}
示例7: tryPropagateAdd
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateAdd(ArrayDeque<LightNode> lightQueue, LightWorldSection w, int x, int y, int z, int ln) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref])) return;
int i = ((a.light[ref] >> 4) & 0xF);
if (i + 1 <= ln) { // DIFFERENT + 1 instead of + 2
a.light[ref] = (byte) ((a.light[ref] & 0xF) | (ln << 4));
a.updateRender(y / SIZE_BLOCKS);
a.modify();
lightQueue.add(new LightNode(x, y, z, ln));
}
}
示例8: tryPropagateAdd
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
private static void tryPropagateAdd(ArrayDeque<LightNode> lightQueue, LightWorldSection w, int x, int y, int z, int l) {
int dX = CoordinateConverter.area(x) - w.initialAreaX;
int dZ = CoordinateConverter.area(z) - w.initialAreaZ;
Area a = w.areas[dX + 1][dZ + 1];
int ref = getRef(x - a.minBlockX, y, z - a.minBlockZ);
if (!a.isReady() || y > a.maxY || !TransparencyManager.isTransparent(a.blocks[ref])) return;
if ((a.light[ref] & 0xF) + 2 <= l) {
a.light[ref] = (byte) ((a.light[ref] & 0xF0) | (l - 1));
a.updateRender(y / SIZE_BLOCKS);
a.modify();
lightQueue.add(new LightNode(x, y, z, l - 1));
}
}
示例9: handlePacket
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
@Override
public void handlePacket() {
Area area = Cubes.getClient().world.getArea(areaX, areaZ);
if (area != null)
area.updateRender(ySection);
}
示例10: handlePacket
import ethanjones.cubes.world.storage.Area; //导入方法依赖的package包/类
@Override
public void handlePacket() {
Area area = Cubes.getClient().world.getArea(areaX, areaZ);
if (area != null) area.updateRender(ySection);
}