Package org.terasology.world.propagation

Examples of org.terasology.world.propagation.SingleChunkView


    public SunlightPropagationRules(PropagatorWorldView regenWorldView) {
        this.regenWorldView = regenWorldView;
    }

    public SunlightPropagationRules(LitChunk chunk) {
        this.regenWorldView = new SingleChunkView(new SunlightRegenPropagationRules(), chunk);
    }
View Full Code Here


        populateSunlight(chunk);
        populateLight(chunk);
    }

    private static void populateLight(LitChunk chunk) {
        BatchPropagator lightPropagator = new StandardBatchPropagator(LIGHT_RULES, new SingleChunkView(LIGHT_RULES, chunk));
        for (int x = 0; x < ChunkConstants.SIZE_X; x++) {
            for (int z = 0; z < ChunkConstants.SIZE_Z; z++) {
                for (int y = 0; y < ChunkConstants.SIZE_Y; y++) {
                    Block block = chunk.getBlock(x, y, z);
                    if (block.getLuminance() > 0) {
View Full Code Here

        lightPropagator.process();
    }

    private static void populateSunlight(LitChunk chunk) {
        PropagationRules sunlightRules = new SunlightPropagationRules(chunk);
        BatchPropagator lightPropagator = new StandardBatchPropagator(sunlightRules, new SingleChunkView(sunlightRules, chunk));

        for (int x = 0; x < ChunkConstants.SIZE_X; x++) {
            for (int z = 0; z < ChunkConstants.SIZE_Z; z++) {
                for (int y = 0; y < ChunkConstants.MAX_SUNLIGHT; ++y) {
                    Vector3i pos = new Vector3i(x, y, z);
View Full Code Here

TOP

Related Classes of org.terasology.world.propagation.SingleChunkView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.