Added some other classes/methods to the wrappers
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.Block;
|
||||
|
||||
import com.seibel.lod.util.ColorUtil;
|
||||
import net.minecraft.block.*;
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.Block;
|
||||
|
||||
import com.seibel.lod.util.ColorUtil;
|
||||
import com.seibel.lod.wrappers.MinecraftWrapper;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.Chunk;
|
||||
|
||||
|
||||
//This class will contain all methods usefull to generate the fake ChunkWrapper
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.seibel.lod.wrappers.Chunk;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
//This class wraps the minecraft ChunkPos class
|
||||
public class ChunkPosWrapper
|
||||
{
|
||||
private ChunkPos chunkPos;
|
||||
|
||||
public ChunkPosWrapper(ChunkPos chunkPos)
|
||||
{
|
||||
this.chunkPos = chunkPos;
|
||||
}
|
||||
|
||||
public int getX()
|
||||
{
|
||||
return chunkPos.getX();
|
||||
}
|
||||
|
||||
public int getZ()
|
||||
{
|
||||
return chunkPos.getZ();
|
||||
}
|
||||
|
||||
public ChunkPos getChunkPos()
|
||||
{
|
||||
return chunkPos;
|
||||
}
|
||||
|
||||
@Override public boolean equals(Object o)
|
||||
{
|
||||
return chunkPos.equals(o);
|
||||
}
|
||||
|
||||
@Override public int hashCode()
|
||||
{
|
||||
return Objects.hash(chunkPos);
|
||||
}
|
||||
|
||||
}
|
||||
+8
-4
@@ -1,18 +1,19 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.Chunk;
|
||||
|
||||
import jdk.nashorn.internal.ir.Block;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import com.seibel.lod.wrappers.Block.BlockWrapper;
|
||||
import com.seibel.lod.wrappers.Block.BlockPosWrapper;
|
||||
import net.minecraft.world.chunk.IChunk;
|
||||
|
||||
public class ChunkWrapper
|
||||
{
|
||||
|
||||
private IChunk chunk;
|
||||
|
||||
private ChunkPosWrapper chunkPos;
|
||||
|
||||
public ChunkWrapper(IChunk chunk)
|
||||
{
|
||||
this.chunk = chunk;
|
||||
this.chunkPos = new ChunkPosWrapper(chunk.getPos());
|
||||
}
|
||||
|
||||
public BlockWrapper getBlock(BlockPosWrapper blockPos)
|
||||
@@ -20,6 +21,9 @@ public class ChunkWrapper
|
||||
return BlockWrapper.getBlockWrapper(chunk.getBlockState(blockPos.getBlockPos()).getBlock());
|
||||
}
|
||||
|
||||
public ChunkPosWrapper getChunkPos(){
|
||||
return chunkPos;
|
||||
}
|
||||
public int getEmittedBrightness(BlockPosWrapper blockPos)
|
||||
{
|
||||
return chunk.getLightEmission(blockPos.getBlockPos());
|
||||
@@ -1,5 +1,19 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
|
||||
import net.minecraft.client.renderer.texture.NativeImage;
|
||||
|
||||
|
||||
public class LigthMapWrapper
|
||||
{
|
||||
static NativeImage lightMap = null;
|
||||
|
||||
public static void setLightMap(NativeImage lightMap)
|
||||
{
|
||||
lightMap = null;
|
||||
}
|
||||
|
||||
public static int getLightValue(int skyLight, int blockLight)
|
||||
{
|
||||
return lightMap.getPixelRGBA(skyLight, blockLight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
|
||||
public class MutableBlockPosWrapper
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.seibel.lod.wrappers.Vertex;
|
||||
|
||||
public class BufferBuilderWrapper
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.seibel.lod.wrappers.Vertex;
|
||||
|
||||
public class VertexBufferWrapper
|
||||
{
|
||||
}
|
||||
+2
-5
@@ -1,13 +1,10 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.World;
|
||||
|
||||
import com.seibel.lod.util.ColorUtil;
|
||||
import com.seibel.lod.util.LodUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import com.seibel.lod.wrappers.Block.BlockWrapper;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.material.MaterialColor;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.World;
|
||||
|
||||
import net.minecraft.world.DimensionType;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.seibel.lod.wrappers;
|
||||
package com.seibel.lod.wrappers.World;
|
||||
|
||||
import com.seibel.lod.wrappers.Block.BlockPosWrapper;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
Reference in New Issue
Block a user