Created
September 10, 2014 08:12
-
-
Save thomas15v/d33c8f265a84da2f198b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.spongepowered.mod.world; | |
import net.minecraft.world.WorldServer; | |
import org.spongepowered.api.block.Block; | |
import org.spongepowered.api.world.Chunk; | |
import org.spongepowered.api.world.World; | |
import org.spongepowered.mod.block.SpongeBlock; | |
import java.util.UUID; | |
/** | |
* Created by thomas on 9/10/2014. | |
*/ | |
public class SpongeWorld implements World { | |
private WorldServer nmsworld; | |
public SpongeWorld(WorldServer nmsworld){ | |
this.nmsworld = nmsworld; | |
} | |
@Override | |
public UUID getUniqueID() { | |
return null; | |
} | |
@Override | |
public String getName() { | |
return nmsworld.getWorldInfo().getWorldName(); | |
} | |
@Override | |
public Chunk getChunk(int x, int z) { | |
return new SpongeChunk(nmsworld.getChunkFromBlockCoords(x,z)); | |
} | |
@Override | |
public Block getBlock(int x, int y, int z) { | |
return new SpongeBlock(nmsworld.getBlock(x, y, z)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment