fixed borken models

This commit is contained in:
Ellpeck 2020-01-22 21:21:23 +01:00
parent ea9a5d1305
commit 8d064816ef
41 changed files with 1035 additions and 353 deletions

View file

@ -4,6 +4,7 @@ import de.ellpeck.naturesaura.blocks.tiles.TileEntityGratedChute;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.state.DirectionProperty; import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer; import net.minecraft.state.StateContainer;
@ -16,12 +17,13 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import javax.annotation.Nullable;
public class BlockGratedChute extends BlockContainerImpl { public class BlockGratedChute extends BlockContainerImpl {
// TODO voxel shape stuff // TODO voxel shape stuff
@ -58,9 +60,10 @@ public class BlockGratedChute extends BlockContainerImpl {
return true; return true;
} }
@Nullable
@Override @Override
public BlockState getStateForPlacement(BlockState state, Direction facing, BlockState state2, IWorld world, BlockPos pos1, BlockPos pos2, Hand hand) { public BlockState getStateForPlacement(BlockItemUseContext context) {
Direction newFacing = facing.getOpposite(); Direction newFacing = context.getFace().getOpposite();
if (newFacing == Direction.UP) if (newFacing == Direction.UP)
newFacing = Direction.DOWN; newFacing = Direction.DOWN;
return this.getDefaultState().with(FACING, newFacing); return this.getDefaultState().with(FACING, newFacing);

View file

@ -9,7 +9,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"axis": { "axis": {
"y": {}, "y": {},
"z": { "z": {
@ -18,8 +17,7 @@
"x": { "x": {
"x": 90, "x": 90,
"y": 90 "y": 90
}, }
"none": {}
} }
} }
} }

View file

@ -8,7 +8,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"persistent": { "persistent": {
"true": {}, "true": {},
"false": {} "false": {}

View file

@ -9,7 +9,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"axis": { "axis": {
"y": {}, "y": {},
"z": { "z": {
@ -18,8 +17,7 @@
"x": { "x": {
"x": 90, "x": 90,
"y": 90 "y": 90
}, }
"none": {}
} }
} }
} }

View file

@ -8,16 +8,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"transform": "forge:default-item",
"textures": {
"layer0": "naturesaura:blocks/ancient_sapling"
}
}
],
"stage": { "stage": {
"0": {}, "0": {},
"1": {} "1": {}

View file

@ -1,7 +1,7 @@
{ {
"forge_marker": 1, "forge_marker": 1,
"defaults": { "defaults": {
"model": "minecraft:block/half_slab", "model": "minecraft:block/slab",
"textures": { "textures": {
"bottom": "naturesaura:blocks/ancient_planks", "bottom": "naturesaura:blocks/ancient_planks",
"top": "naturesaura:blocks/ancient_planks", "top": "naturesaura:blocks/ancient_planks",
@ -18,7 +18,10 @@
], ],
"type=bottom": [{}], "type=bottom": [{}],
"type=double": { "type=double": {
"model": "naturesaura:block/ancient_planks" "model": "minecraft:block/cube_all",
"textures": {
"all": "naturesaura:blocks/ancient_planks"
}
} }
} }
} }

View file

@ -8,12 +8,6 @@
} }
}, },
"variants": { "variants": {
"normal": {
"model": "minecraft:block/stairs"
},
"inventory": {
"model": "minecraft:block/stairs"
},
"facing=east,half=bottom,shape=straight": { "facing=east,half=bottom,shape=straight": {
"model": "minecraft:block/stairs" "model": "minecraft:block/stairs"
}, },

View file

@ -14,7 +14,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"facing": { "facing": {
"north": {}, "north": {},
"south": { "south": {

View file

@ -8,20 +8,28 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/dimension_rail_end"
},
"transform": "forge:default-item"
}
],
"shape": { "shape": {
"north_south": {}, "north_south": {},
"east_west": { "east_west": {
"y": 90 "y": 90
},
"ascending_east": {
"y": 90
},
"ascending_west": {
"y": 90
},
"ascending_south": {},
"ascending_north": {},
"south_east": {},
"south_west": {
"y": 90
},
"north_east": {
"y": 270
},
"north_west": {
"y": 180
} }
} }
} }

View file

@ -8,20 +8,28 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/dimension_rail_nether"
},
"transform": "forge:default-item"
}
],
"shape": { "shape": {
"north_south": {}, "north_south": {},
"east_west": { "east_west": {
"y": 90 "y": 90
},
"ascending_east": {
"y": 90
},
"ascending_west": {
"y": 90
},
"ascending_south": {},
"ascending_north": {},
"south_east": {},
"south_west": {
"y": 90
},
"north_east": {
"y": 270
},
"north_west": {
"y": 180
} }
} }
} }

View file

@ -8,20 +8,28 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/dimension_rail_overworld"
},
"transform": "forge:default-item"
}
],
"shape": { "shape": {
"north_south": {}, "north_south": {},
"east_west": { "east_west": {
"y": 90 "y": 90
},
"ascending_east": {
"y": 90
},
"ascending_west": {
"y": 90
},
"ascending_south": {},
"ascending_north": {},
"south_east": {},
"south_west": {
"y": 90
},
"north_east": {
"y": 270
},
"north_west": {
"y": 180
} }
} }
} }

View file

@ -8,15 +8,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}], "": [{}]
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/end_flower"
},
"transform": "forge:default-item"
}
]
} }
} }

View file

@ -9,7 +9,6 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"facing": { "facing": {
"down": { "down": {
"x": 180 "x": 180

View file

@ -28,7 +28,7 @@
] ]
}, },
"apply": { "apply": {
"model": "redstone_dust_dot" "model": "minecraft:block/redstone_dust_dot"
} }
}, },
{ {
@ -46,7 +46,7 @@
] ]
}, },
"apply": { "apply": {
"model": "redstone_dust_side0" "model": "minecraft:block/redstone_dust_side0"
} }
}, },
{ {
@ -64,7 +64,7 @@
] ]
}, },
"apply": { "apply": {
"model": "redstone_dust_side_alt0" "model": "minecraft:block/redstone_dust_side_alt0"
} }
}, },
{ {
@ -82,7 +82,7 @@
] ]
}, },
"apply": { "apply": {
"model": "redstone_dust_side_alt1", "model": "minecraft:block/redstone_dust_side_alt1",
"y": 270 "y": 270
} }
}, },
@ -101,7 +101,7 @@
] ]
}, },
"apply": { "apply": {
"model": "redstone_dust_side1", "model": "minecraft:block/redstone_dust_side1",
"y": 270 "y": 270
} }
}, },
@ -110,7 +110,7 @@
"north": "up" "north": "up"
}, },
"apply": { "apply": {
"model": "redstone_dust_up" "model": "minecraft:block/redstone_dust_up"
} }
}, },
{ {
@ -118,7 +118,7 @@
"east": "up" "east": "up"
}, },
"apply": { "apply": {
"model": "redstone_dust_up", "model": "minecraft:block/redstone_dust_up",
"y": 90 "y": 90
} }
}, },
@ -127,7 +127,7 @@
"south": "up" "south": "up"
}, },
"apply": { "apply": {
"model": "redstone_dust_up", "model": "minecraft:block/redstone_dust_up",
"y": 180 "y": 180
} }
}, },
@ -136,7 +136,7 @@
"west": "up" "west": "up"
}, },
"apply": { "apply": {
"model": "redstone_dust_up", "model": "minecraft:block/redstone_dust_up",
"y": 270 "y": 270
} }
} }

View file

@ -3,12 +3,11 @@
"defaults": { "defaults": {
"model": "minecraft:block/leaves", "model": "minecraft:block/leaves",
"textures": { "textures": {
"all": "minecraft:blocks/leaves_oak" "all": "minecraft:block/oak_leaves"
}, },
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}],
"persistent": { "persistent": {
"true": {}, "true": {},
"false": {} "false": {}

View file

@ -11,24 +11,25 @@
"transform": "forge:default-block" "transform": "forge:default-block"
}, },
"variants": { "variants": {
"": [{}], "facing": {
"facing=down": { "down": {
"model": "naturesaura:grated_chute_down" "model": "naturesaura:block/grated_chute_down"
}, },
"facing=north": { "north": {
"model": "naturesaura:grated_chute_side" "model": "naturesaura:block/grated_chute_side"
}, },
"facing=south": { "south": {
"model": "naturesaura:grated_chute_side", "model": "naturesaura:block/grated_chute_side",
"y": 180 "y": 180
}, },
"facing=west": { "west": {
"model": "naturesaura:grated_chute_side", "model": "naturesaura:block/grated_chute_side",
"y": 270 "y": 270
}, },
"facing=east": { "east": {
"model": "naturesaura:grated_chute_side", "model": "naturesaura:block/grated_chute_side",
"y": 90 "y": 90
}
} }
} }
} }

View file

@ -1,7 +1,7 @@
{ {
"forge_marker": 1, "forge_marker": 1,
"defaults": { "defaults": {
"model": "minecraft:block/half_slab", "model": "minecraft:block/slab",
"textures": { "textures": {
"bottom": "naturesaura:blocks/infused_brick", "bottom": "naturesaura:blocks/infused_brick",
"top": "naturesaura:blocks/infused_brick", "top": "naturesaura:blocks/infused_brick",
@ -18,7 +18,10 @@
], ],
"type=bottom": [{}], "type=bottom": [{}],
"type=double": { "type=double": {
"model": "naturesaura:block/infused_brick" "model": "minecraft:block/cube_all",
"textures": {
"all": "naturesaura:blocks/infused_brick"
}
} }
} }
} }

View file

@ -8,12 +8,6 @@
} }
}, },
"variants": { "variants": {
"normal": {
"model": "minecraft:block/stairs"
},
"inventory": {
"model": "minecraft:block/stairs"
},
"facing=east,half=bottom,shape=straight": { "facing=east,half=bottom,shape=straight": {
"model": "minecraft:block/stairs" "model": "minecraft:block/stairs"
}, },

View file

@ -1,7 +1,7 @@
{ {
"forge_marker": 1, "forge_marker": 1,
"defaults": { "defaults": {
"model": "minecraft:block/half_slab", "model": "minecraft:block/slab",
"textures": { "textures": {
"bottom": "naturesaura:blocks/infused_stone", "bottom": "naturesaura:blocks/infused_stone",
"top": "naturesaura:blocks/infused_stone", "top": "naturesaura:blocks/infused_stone",
@ -18,7 +18,10 @@
], ],
"type=bottom": [{}], "type=bottom": [{}],
"type=double": { "type=double": {
"model": "naturesaura:block/infused_stone" "model": "minecraft:block/cube_all",
"textures": {
"all": "naturesaura:blocks/infused_stone"
}
} }
} }
} }

View file

@ -8,12 +8,6 @@
} }
}, },
"variants": { "variants": {
"": {
"model": "minecraft:block/stairs"
},
"inventory": {
"model": "minecraft:block/stairs"
},
"facing=east,half=bottom,shape=straight": { "facing=east,half=bottom,shape=straight": {
"model": "minecraft:block/stairs" "model": "minecraft:block/stairs"
}, },

View file

@ -4,6 +4,7 @@
"model": "naturesaura:block/spawn_lamp", "model": "naturesaura:block/spawn_lamp",
"textures": { "textures": {
"0": "naturesaura:blocks/spawn_lamp", "0": "naturesaura:blocks/spawn_lamp",
"-1": "naturesaura:blocks/spawn_lamp",
"particle": "#0" "particle": "#0"
}, },
"transform": "forge:default-block" "transform": "forge:default-block"

View file

@ -3,8 +3,8 @@
"defaults": { "defaults": {
"model": "naturesaura:block/wood_stand", "model": "naturesaura:block/wood_stand",
"textures": { "textures": {
"texture": "minecraft:blocks/log_oak", "texture": "minecraft:block/stripped_oak_log",
"top": "minecraft:blocks/log_oak_top", "top": "minecraft:block/stripped_oak_log_top",
"particle": "#texture" "particle": "#texture"
}, },
"transform": "forge:default-block" "transform": "forge:default-block"

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"from": [4, 4, 4], "from": [4, 4, 4],

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"from": [0, 0, 0], "from": [0, 0, 0],

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"from": [2, 0, 2], "from": [2, 0, 2],

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"ambientocclusion": false, "ambientocclusion": false,
"elements": [ "elements": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"ambientocclusion": false, "ambientocclusion": false,
"elements": [ "elements": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"from": [0, 0, 0], "from": [0, 0, 0],

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"from": [0, 0, 0], "from": [0, 0, 0],

View file

@ -1,5 +1,6 @@
{ {
"__comment": "Model contributed by PolarizedIons <3", "__comment": "Model contributed by PolarizedIons <3",
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"name": "Base", "name": "Base",

View file

@ -1,4 +1,5 @@
{ {
"parent": "minecraft:block/block",
"elements": [ "elements": [
{ {
"from": [3, 0, 3], "from": [3, 0, 3],

View file

@ -1,5 +1,5 @@
{ {
"parent": "minecraft:block/half_slab", "parent": "minecraft:block/slab",
"textures": { "textures": {
"bottom": "naturesaura:blocks/ancient_planks", "bottom": "naturesaura:blocks/ancient_planks",
"top": "naturesaura:blocks/ancient_planks", "top": "naturesaura:blocks/ancient_planks",

View file

@ -1,5 +1,5 @@
{ {
"parent": "minecraft:model/leaves", "parent": "minecraft:block/leaves",
"textures": { "textures": {
"all": "naturesaura:blocks/decayed_leaves" "all": "naturesaura:blocks/decayed_leaves"
} }

View file

@ -1,5 +1,5 @@
{ {
"parent": "minecraft:blocks/cube", "parent": "minecraft:block/cube",
"textures": { "textures": {
"up": "naturesaura:blocks/ender_crate_top", "up": "naturesaura:blocks/ender_crate_top",
"down": "naturesaura:blocks/ender_crate_bottom", "down": "naturesaura:blocks/ender_crate_bottom",

View file

@ -1,6 +1,6 @@
{ {
"parent": "minecraft:block/leaves", "parent": "minecraft:block/leaves",
"textures": { "textures": {
"all": "minecraft:blocks/leaves_oak" "all": "minecraft:block/oak_leaves"
} }
} }

View file

@ -1,5 +1,5 @@
{ {
"parent": "minecraft:block/half_slab", "parent": "minecraft:block/slab",
"textures": { "textures": {
"bottom": "naturesaura:blocks/infused_brick", "bottom": "naturesaura:blocks/infused_brick",
"top": "naturesaura:blocks/infused_brick", "top": "naturesaura:blocks/infused_brick",

View file

@ -1,5 +1,5 @@
{ {
"parent": "minecraft:block/half_slab", "parent": "minecraft:block/slab",
"textures": { "textures": {
"bottom": "naturesaura:blocks/infused_stone", "bottom": "naturesaura:blocks/infused_stone",
"top": "naturesaura:blocks/infused_stone", "top": "naturesaura:blocks/infused_stone",

View file

@ -1,6 +1,6 @@
{ {
"parent": "item/generated", "parent": "item/generated",
"textures": { "textures": {
"layer0": "minecraft:items/stick" "layer0": "minecraft:item/stick"
} }
} }

View file

@ -1,6 +1,7 @@
{ {
"parent": "naturesaura:block/spawn_lamp", "parent": "naturesaura:block/spawn_lamp",
"textures": { "textures": {
"0": "naturesaura:blocks/spawn_lamp" "0": "naturesaura:blocks/spawn_lamp",
"-1": "naturesaura:blocks/spawn_lamp"
} }
} }

View file

@ -1,7 +1,7 @@
{ {
"parent": "naturesaura:block/wood_stand", "parent": "naturesaura:block/wood_stand",
"textures": { "textures": {
"texture": "minecraft:blocks/log_oak", "texture": "minecraft:block/stripped_oak_log",
"top": "minecraft:blocks/log_oak_top" "top": "minecraft:block/stripped_oak_log_top"
} }
} }