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.material.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.state.DirectionProperty;
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.MathHelper;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.items.IItemHandler;
import javax.annotation.Nullable;
public class BlockGratedChute extends BlockContainerImpl {
// TODO voxel shape stuff
@ -58,9 +60,10 @@ public class BlockGratedChute extends BlockContainerImpl {
return true;
}
@Nullable
@Override
public BlockState getStateForPlacement(BlockState state, Direction facing, BlockState state2, IWorld world, BlockPos pos1, BlockPos pos2, Hand hand) {
Direction newFacing = facing.getOpposite();
public BlockState getStateForPlacement(BlockItemUseContext context) {
Direction newFacing = context.getFace().getOpposite();
if (newFacing == Direction.UP)
newFacing = Direction.DOWN;
return this.getDefaultState().with(FACING, newFacing);

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:block/half_slab",
"model": "minecraft:block/slab",
"textures": {
"bottom": "naturesaura:blocks/ancient_planks",
"top": "naturesaura:blocks/ancient_planks",
@ -18,7 +18,10 @@
],
"type=bottom": [{}],
"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": {
"normal": {
"model": "minecraft:block/stairs"
},
"inventory": {
"model": "minecraft:block/stairs"
},
"facing=east,half=bottom,shape=straight": {
"model": "minecraft:block/stairs"
},

View file

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

View file

@ -8,20 +8,28 @@
"transform": "forge:default-block"
},
"variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/dimension_rail_end"
},
"transform": "forge:default-item"
}
],
"shape": {
"north_south": {},
"east_west": {
"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"
},
"variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/dimension_rail_nether"
},
"transform": "forge:default-item"
}
],
"shape": {
"north_south": {},
"east_west": {
"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"
},
"variants": {
"": [{}],
"inventory": [
{
"model": "builtin/generated",
"textures": {
"layer0": "naturesaura:blocks/dimension_rail_overworld"
},
"transform": "forge:default-item"
}
],
"shape": {
"north_south": {},
"east_west": {
"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"
},
"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"
},
"variants": {
"": [{}],
"facing": {
"down": {
"x": 180

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:block/half_slab",
"model": "minecraft:block/slab",
"textures": {
"bottom": "naturesaura:blocks/infused_brick",
"top": "naturesaura:blocks/infused_brick",
@ -18,7 +18,10 @@
],
"type=bottom": [{}],
"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": {
"normal": {
"model": "minecraft:block/stairs"
},
"inventory": {
"model": "minecraft:block/stairs"
},
"facing=east,half=bottom,shape=straight": {
"model": "minecraft:block/stairs"
},

View file

@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:block/half_slab",
"model": "minecraft:block/slab",
"textures": {
"bottom": "naturesaura:blocks/infused_stone",
"top": "naturesaura:blocks/infused_stone",
@ -18,7 +18,10 @@
],
"type=bottom": [{}],
"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": {
"": {
"model": "minecraft:block/stairs"
},
"inventory": {
"model": "minecraft:block/stairs"
},
"facing=east,half=bottom,shape=straight": {
"model": "minecraft:block/stairs"
},

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:block/leaves",
"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": {
"bottom": "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": {
"bottom": "naturesaura:blocks/infused_stone",
"top": "naturesaura:blocks/infused_stone",

View file

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

View file

@ -1,6 +1,7 @@
{
"parent": "naturesaura:block/spawn_lamp",
"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",
"textures": {
"texture": "minecraft:blocks/log_oak",
"top": "minecraft:blocks/log_oak_top"
"texture": "minecraft:block/stripped_oak_log",
"top": "minecraft:block/stripped_oak_log_top"
}
}