Finish model loader debug mod

This commit is contained in:
tterrag 2019-04-13 21:30:42 -04:00
parent e482793f69
commit 01a0674490
11 changed files with 66 additions and 19 deletions

View file

@ -55,6 +55,8 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.ITickable;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
@ -187,6 +189,8 @@ public class ModelLoaderRegistryTest
}
}
static final VoxelShape SHAPE = VoxelShapes.create(1/16D, 1/16D, 1/16D, 15/16D, 15/16D, 15/16D); // We don't really care, just not solid
public static class CustomModelBlock extends Block
{
public static final DirectionProperty FACING = BlockStateProperties.FACING;
@ -200,6 +204,12 @@ public class ModelLoaderRegistryTest
setRegistryName(new ResourceLocation(MODID, name));
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{
@ -286,6 +296,12 @@ public class ModelLoaderRegistryTest
return new OBJTesseractTileEntity();
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{
@ -431,6 +447,12 @@ public class ModelLoaderRegistryTest
setRegistryName(new ResourceLocation(MODID, name));
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{
@ -476,6 +498,12 @@ public class ModelLoaderRegistryTest
builder.add(FACING);
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{
@ -615,6 +643,12 @@ public class ModelLoaderRegistryTest
setRegistryName(new ResourceLocation(MODID, name));
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{
@ -661,6 +695,12 @@ public class ModelLoaderRegistryTest
setRegistryName(new ResourceLocation(MODID, name));
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{
@ -708,6 +748,12 @@ public class ModelLoaderRegistryTest
return new OBJDynamicEyeTileEntity();
}
@Override
public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
{
return SHAPE;
}
@Override
public boolean isFullCube(IBlockState state)
{

View file

@ -2,13 +2,10 @@
"forge_marker": 1,
"defaults": {
"textures": {},
"model": "forgedebugmodelloaderregistry:direction_test.obj"
"model": "forgedebugmodelloaderregistry:direction_test.obj",
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{
"transform": "forge:default-block"
}],
"facing": {
"down": {"model": "forgedebugmodelloaderregistry:direction_test.obj", "x": 90},
"up": {"model": "forgedebugmodelloaderregistry:direction_test.obj", "x": 270},

View file

@ -5,8 +5,7 @@
"model": "forgedebugmodelloaderregistry:eye.obj"
},
"variants": {
"normal": [{}],
"inventory": [{
"": [{
"transform": {
"thirdperson": {
"translation": [0, 0.09375, -0.171875],

View file

@ -5,8 +5,7 @@
"model": "forgedebugmodelloaderregistry:eye.obj"
},
"variants": {
"normal": [{}],
"inventory": [{
"": [{
"transform": {
"thirdperson": {
"translation": [0, 0.09375, -0.171875],

View file

@ -7,8 +7,7 @@
"model": "forgedebugmodelloaderregistry:tesseract.obj"
},
"variants": {
"normal": [{}],
"inventory": [{
"": [{
"transform": "forge:default-block"
}]
}

View file

@ -5,8 +5,7 @@
"model": "forgedebugmodelloaderregistry:vertex_coloring.obj"
},
"variants": {
"normal": [{}],
"inventory": [{
"": [{
"transform": "forge:default-block"
}]
}

View file

@ -5,8 +5,7 @@
"model": "forgedebugmodelloaderregistry:vertex_coloring.obj"
},
"variants": {
"normal": [{}],
"inventory": [{
"": [{
"transform": "forge:default-block"
}]
}

View file

@ -1,2 +1,3 @@
newmtl fancy_fence:Default
Kd 1.00 1.00 1.00
map_Kd forgedebugmodelloaderregistry:white

View file

@ -1,4 +1,4 @@
newmtl lambert7SG
Kd 1.00 1.00 1.00
Ka 1.00 1.00 1.00
map_Kd minecraft:blocks/redstone_block
map_Kd minecraft:block/redstone_block

View file

@ -1,23 +1,31 @@
newmtl red
Kd 1 0 0
map_Kd forgedebugmodelloaderregistry:white
newmtl orange
Kd 1 0.5 0
map_Kd forgedebugmodelloaderregistry:white
newmtl yellow
Kd 1 1 0
map_Kd forgedebugmodelloaderregistry:white
newmtl yellow-green
Kd 0.5 1 0
map_Kd forgedebugmodelloaderregistry:white
newmtl green
Kd 0 1 0
map_Kd forgedebugmodelloaderregistry:white
newmtl green-blue
Kd 0 1 1
map_Kd forgedebugmodelloaderregistry:white
newmtl blue
Kd 0 0 1
map_Kd forgedebugmodelloaderregistry:white
newmtl purple
Kd 1 0 1
map_Kd forgedebugmodelloaderregistry:white

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B