Mockup Fixes
This commit is contained in:
parent
5b07073e00
commit
6d79cf16f6
5 changed files with 35 additions and 16 deletions
|
@ -124,7 +124,6 @@ import com.tterrag.registrate.util.DataIngredient;
|
|||
import com.tterrag.registrate.util.entry.BlockEntry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Block.Properties;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.MaterialColor;
|
||||
|
@ -360,7 +359,7 @@ public class AllBlocks {
|
|||
public static final BlockEntry<MechanicalPressBlock> MECHANICAL_PRESS =
|
||||
REGISTRATE.block("mechanical_press", MechanicalPressBlock::new)
|
||||
.initialProperties(SharedProperties::stone)
|
||||
.properties(Properties::nonOpaque)
|
||||
.properties(p -> p.nonOpaque())
|
||||
.blockstate(BlockStateGen.horizontalBlockProvider(true))
|
||||
.transform(StressConfigDefaults.setImpact(8.0))
|
||||
.item(BasinOperatorBlockItem::new)
|
||||
|
@ -713,6 +712,7 @@ public class AllBlocks {
|
|||
|
||||
public static final BlockEntry<ChuteBlock> CHUTE = REGISTRATE.block("chute", ChuteBlock::new)
|
||||
.initialProperties(SharedProperties::softMetal)
|
||||
.addLayer(() -> RenderType::getCutoutMipped)
|
||||
.blockstate((c, p) -> p.getVariantBuilder(c.get())
|
||||
.forAllStates(s -> ConfiguredModel.builder()
|
||||
.modelFile(s.get(ChuteBlock.WINDOW) ? AssetLookup.partialBaseModel(c, p, "windowed")
|
||||
|
@ -731,7 +731,7 @@ public class AllBlocks {
|
|||
public static final BlockEntry<PackagerBlock> PACKAGER = REGISTRATE.block("packager", PackagerBlock::new)
|
||||
.initialProperties(SharedProperties::softMetal)
|
||||
.transform(StressConfigDefaults.setImpact(4.0))
|
||||
.properties(Properties::nonOpaque)
|
||||
.properties(p -> p.nonOpaque())
|
||||
.blockstate((c, p) -> p.getVariantBuilder(c.get())
|
||||
.forAllStates(s -> ConfiguredModel.builder()
|
||||
.modelFile(AssetLookup.partialBaseModel(c, p))
|
||||
|
|
|
@ -65,7 +65,7 @@ public class AllShapes {
|
|||
NIXIE_TUBE_CEILING = shape(0, 12, 0, 16, 16, 16).add(9, 1, 5, 15, 16, 11)
|
||||
.add(1, 1, 5, 7, 16, 11)
|
||||
.forHorizontalAxis(),
|
||||
REALITY_FUNNEL = shape(2, 2, 14, 14, 14, 18).forDirectional(NORTH),
|
||||
REALITY_FUNNEL = shape(2, -2, 2, 14, 2, 14).forDirectional(UP),
|
||||
BELT_FUNNEL_RETRACTED = shape(3, -5, 14, 13, 13, 19).add(0, -5, 8, 16, 16, 14)
|
||||
.forHorizontal(NORTH),
|
||||
BELT_FUNNEL_DEFAULT = shape(3, -5, 12, 13, 13, 17).add(0, -5, 6, 16, 16, 12)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.simibubi.create.content.logistics.block.realityFunnel;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllShapes;
|
||||
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
|
||||
|
||||
|
@ -11,6 +12,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -31,6 +33,20 @@ public class RealityFunnelBlock extends ProperDirectionalBlock {
|
|||
return AllShapes.REALITY_FUNNEL.get(state.get(FACING));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState p_196271_3_, IWorld world,
|
||||
BlockPos pos, BlockPos p_196271_6_) {
|
||||
if (state.get(FACING)
|
||||
.getAxis()
|
||||
.isHorizontal() && direction == Direction.DOWN) {
|
||||
BlockState equivalentFunnel = AllBlocks.BELT_FUNNEL.getDefaultState()
|
||||
.with(BeltFunnelBlock.HORIZONTAL_FACING, state.get(FACING));
|
||||
if (BeltFunnelBlock.isOnValidBelt(equivalentFunnel, world, pos))
|
||||
return equivalentFunnel;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
|
@ -52,5 +68,4 @@ public class RealityFunnelBlock extends ProperDirectionalBlock {
|
|||
.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
"rotation": {"angle": 0, "axis": "y", "origin": [9, 16, 9]},
|
||||
"faces": {
|
||||
"north": {"uv": [15, 0, 16, 4], "texture": "#13"},
|
||||
"east": {"uv": [9, 0, 16, 4], "texture": "#13"},
|
||||
"east": {"uv": [0, 12, 7, 16], "texture": "#13"},
|
||||
"south": {"uv": [9, 0, 10, 4], "texture": "#13"},
|
||||
"west": {"uv": [0, 12, 7, 16], "texture": "#13"},
|
||||
"up": {"uv": [0, 0, 1, 7], "texture": "#13"},
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [2, -2, 2],
|
||||
"to": [14, 0, 14],
|
||||
"from": [2.1, -2, 2.1],
|
||||
"to": [13.9, 0, 13.9],
|
||||
"rotation": {"angle": 0, "axis": "z", "origin": [9, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 13, 0.5, 16], "rotation": 270, "texture": "#10"},
|
||||
|
@ -34,7 +34,8 @@
|
|||
"east": {"uv": [0.5, 13, 1, 16], "rotation": 270, "texture": "#10"},
|
||||
"south": {"uv": [0.5, 13, 1, 13.25], "rotation": 270, "texture": "#10"},
|
||||
"west": {"uv": [0.5, 13, 1, 16], "rotation": 270, "texture": "#10"},
|
||||
"up": {"uv": [0.75, 13, 1, 16], "rotation": 180, "texture": "#10"}
|
||||
"up": {"uv": [0.75, 13, 1, 16], "rotation": 180, "texture": "#10"},
|
||||
"down": {"uv": [0.75, 13, 1, 16], "rotation": 180, "texture": "#10"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -46,7 +47,8 @@
|
|||
"east": {"uv": [0.5, 13, 1, 16], "rotation": 270, "texture": "#10"},
|
||||
"south": {"uv": [0.5, 15.75, 1, 16], "rotation": 270, "texture": "#10"},
|
||||
"west": {"uv": [0.5, 13, 1, 16], "rotation": 270, "texture": "#10"},
|
||||
"up": {"uv": [0.75, 13, 1, 16], "rotation": 180, "texture": "#10"}
|
||||
"up": {"uv": [0.75, 13, 1, 16], "rotation": 180, "texture": "#10"},
|
||||
"down": {"uv": [0.75, 13, 1, 16], "rotation": 180, "texture": "#10"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -56,7 +58,8 @@
|
|||
"faces": {
|
||||
"north": {"uv": [0.5, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"},
|
||||
"south": {"uv": [0.5, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"},
|
||||
"up": {"uv": [0.75, 13.25, 1, 15.75], "rotation": 90, "texture": "#10"}
|
||||
"up": {"uv": [0.75, 13.25, 1, 15.75], "rotation": 90, "texture": "#10"},
|
||||
"down": {"uv": [0.75, 13.25, 1, 15.75], "rotation": 90, "texture": "#10"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -66,7 +69,8 @@
|
|||
"faces": {
|
||||
"north": {"uv": [0.5, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"},
|
||||
"south": {"uv": [0.5, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"},
|
||||
"up": {"uv": [0.75, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"}
|
||||
"up": {"uv": [0.75, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"},
|
||||
"down": {"uv": [0.75, 13.25, 1, 15.75], "rotation": 270, "texture": "#10"}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue