PumpState

- Added blockstates, models and TE rendering for mechanical pumps
- Removed unused pipe textures
- Removed hasStaticPart in IWrenchable as it became obsolete in 1.15
- Bumped version
This commit is contained in:
simibubi 2020-06-15 02:25:33 +02:00
parent 20de324b72
commit 0a9816504b
57 changed files with 829 additions and 179 deletions

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# mod version info
mod_version=0.2.4d
mod_version=0.3
minecraft_version=1.15.2
forge_version=31.2.3

View file

@ -179,6 +179,7 @@ da612a05f94dc19e07e250efc35a7b2839d2ee76 assets\create\blockstates\mechanical_pi
94ec340a50b2406f833735f7501a1840c692e32a assets\create\blockstates\mechanical_piston_head.json
debef0f5dde74103aaf4422de4bc90e4099b0c47 assets\create\blockstates\mechanical_plough.json
92269fe66d7b83095a2e04e121af0be792f55dd6 assets\create\blockstates\mechanical_press.json
b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets\create\blockstates\mechanical_pump.json
1478fc76afb9b186fd3fddc20c29525d60d692bc assets\create\blockstates\mechanical_saw.json
4e48ad0936647065c2322390e7c0fe115c853a98 assets\create\blockstates\millstone.json
468202df0802e17c75fcad0993daf1bc5300ca91 assets\create\blockstates\minecart_anchor.json
@ -274,7 +275,7 @@ b7829c2ef2c47188713f8cab21b2c9bc7f9c5b79 assets\create\blockstates\portable_stor
e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggle_latch.json
3a739f9d4276828d83f2d2750bf3227c87bcd438 assets\create\blockstates\pulley_magnet.json
469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets\create\blockstates\pulse_repeater.json
ab2a1bf8f37f1c64d00538867f4c3a97195bd3c4 assets\create\blockstates\radial_chassis.json
5c1df061eb5efe49beee7219e113206fc31a4733 assets\create\blockstates\radial_chassis.json
8929677f2cc5354aa19ef182af69f9f0b41eb242 assets\create\blockstates\redstone_contact.json
c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json
1eac804cba08aebb5f4646758ae1ef9b32e01365 assets\create\blockstates\reinforced_rail.json
@ -326,8 +327,8 @@ c60c3115fd6eeaa3a696428a87a74d184ab7d62d assets\create\blockstates\weathered_lim
c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json
88f2465e94bac0cd25432195825faaa457fa8b0e assets\create\lang\en_ud.json
8cb43c2910b0dedf4dd87adc900c165bec3d192f assets\create\lang\en_us.json
3afe2434c36e1af9b04d5adda313f31db68c5040 assets\create\lang\en_ud.json
d3bec6b99c6fee4728ed4a49e01ccc4715273d06 assets\create\lang\en_us.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json
@ -1122,6 +1123,7 @@ bbf18e5d54128375139c712e93b35ec25f59f2d0 assets\create\models\item\mechanical_ha
f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets\create\models\item\mechanical_piston.json
726ae61699dc379a4f535c1be3ec2672a2f03583 assets\create\models\item\mechanical_plough.json
6c2acb80e53256fbb85f76851f335f9248ace6da assets\create\models\item\mechanical_press.json
4e363477e3e8059dd7b2bad04046521b31923d1b assets\create\models\item\mechanical_pump.json
bca99d467ec8ead10124becb60ac24b39be83de4 assets\create\models\item\mechanical_saw.json
0eb5726c8c0de462f432411c210d6132b2c446a4 assets\create\models\item\millstone.json
1134bc8ecdfefe5d30ee4973c37aa9a349c368b4 assets\create\models\item\minecart_contraption.json
@ -1878,6 +1880,7 @@ b12efeeef5682966016ce6ea2d171eecd33d9667 data\create\loot_tables\blocks\mechanic
205f5899101262f31f5c1a88bb7d954918d08d04 data\create\loot_tables\blocks\mechanical_piston_head.json
d9e217fcc668a04ee495968f8ccf9966271b6cea data\create\loot_tables\blocks\mechanical_plough.json
0e0742d066bda87ba5cc835a4028efb99e70b2f2 data\create\loot_tables\blocks\mechanical_press.json
e94a78187bcf7f235244b2c656732ba9a5821dd0 data\create\loot_tables\blocks\mechanical_pump.json
321daee16d6fad25ecc84da1b2830556d67e2a19 data\create\loot_tables\blocks\mechanical_saw.json
efbd4689e7d6740b80357203d1e02196f0752efa data\create\loot_tables\blocks\millstone.json
205f5899101262f31f5c1a88bb7d954918d08d04 data\create\loot_tables\blocks\minecart_anchor.json

View file

@ -0,0 +1,30 @@
{
"variants": {
"facing=down": {
"model": "create:block/mechanical_pump/block",
"x": 180
},
"facing=up": {
"model": "create:block/mechanical_pump/block"
},
"facing=north": {
"model": "create:block/mechanical_pump/block",
"x": 90
},
"facing=south": {
"model": "create:block/mechanical_pump/block",
"x": 90,
"y": 180
},
"facing=west": {
"model": "create:block/mechanical_pump/block",
"x": 90,
"y": 270
},
"facing=east": {
"model": "create:block/mechanical_pump/block",
"x": 90,
"y": 90
}
}
}

View file

@ -29,8 +29,8 @@
},
{
"when": {
"axis": "x",
"sticky_south": "true"
"sticky_south": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -39,8 +39,8 @@
},
{
"when": {
"axis": "y",
"sticky_south": "true"
"sticky_south": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky"
@ -48,8 +48,8 @@
},
{
"when": {
"axis": "z",
"sticky_south": "true"
"sticky_south": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -59,8 +59,8 @@
},
{
"when": {
"axis": "x",
"sticky_south": "false"
"sticky_south": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -69,8 +69,8 @@
},
{
"when": {
"axis": "y",
"sticky_south": "false"
"sticky_south": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y"
@ -78,8 +78,8 @@
},
{
"when": {
"axis": "z",
"sticky_south": "false"
"sticky_south": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -149,8 +149,8 @@
},
{
"when": {
"axis": "x",
"sticky_north": "true"
"sticky_north": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky"
@ -158,8 +158,8 @@
},
{
"when": {
"axis": "y",
"sticky_north": "true"
"sticky_north": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky",
@ -168,8 +168,8 @@
},
{
"when": {
"axis": "z",
"sticky_north": "true"
"sticky_north": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -178,8 +178,8 @@
},
{
"when": {
"axis": "x",
"sticky_north": "false"
"sticky_north": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x"
@ -187,8 +187,8 @@
},
{
"when": {
"axis": "y",
"sticky_north": "false"
"sticky_north": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y",
@ -197,8 +197,8 @@
},
{
"when": {
"axis": "z",
"sticky_north": "false"
"sticky_north": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x",

View file

@ -180,6 +180,7 @@
"block.create.mechanical_piston_head": "p\u0250\u01DDH uo\u0287s\u0131\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
"block.create.mechanical_plough": "\u0265bno\u05DF\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
"block.create.mechanical_press": "ss\u01DD\u0279\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
"block.create.mechanical_pump": "d\u026Fn\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
"block.create.mechanical_saw": "\u028D\u0250S \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",
"block.create.millstone": "\u01DDuo\u0287s\u05DF\u05DF\u0131W",
"block.create.minecart_anchor": "\u0279o\u0265\u0254u\u2C6F \u0287\u0279\u0250\u0254\u01DDu\u0131W",

View file

@ -183,6 +183,7 @@
"block.create.mechanical_piston_head": "Mechanical Piston Head",
"block.create.mechanical_plough": "Mechanical Plough",
"block.create.mechanical_press": "Mechanical Press",
"block.create.mechanical_pump": "Mechanical Pump",
"block.create.mechanical_saw": "Mechanical Saw",
"block.create.millstone": "Millstone",
"block.create.minecart_anchor": "Minecart Anchor",

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/mechanical_pump/item"
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:mechanical_pump"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -82,6 +82,9 @@ public enum AllBlockPartials {
COPPER_PIPE_RIM_NORTH("copper_pipe/rim/north"),
COPPER_PIPE_RIM_SOUTH("copper_pipe/rim/south"),
MECHANICAL_PUMP_ARROW("mechanical_pump/arrow"),
MECHANICAL_PUMP_COG("mechanical_pump/cog"),
;
private ResourceLocation modelLocation;

View file

@ -51,6 +51,7 @@ import com.simibubi.create.content.contraptions.components.turntable.TurntableBl
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelBlock;
import com.simibubi.create.content.contraptions.fluids.PipeBlock;
import com.simibubi.create.content.contraptions.fluids.PipeModel;
import com.simibubi.create.content.contraptions.fluids.PumpBlock;
import com.simibubi.create.content.contraptions.processing.BasinBlock;
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
@ -398,6 +399,15 @@ public class AllBlocks {
.transform(customItemModel())
.register();
public static final BlockEntry<PumpBlock> MECHANICAL_PUMP =
REGISTRATE.block("mechanical_pump", PumpBlock::new)
.initialProperties(SharedProperties::softMetal)
.blockstate(BlockStateGen.directionalBlockProvider(true))
.transform(StressConfigDefaults.setImpact(4.0))
.item()
.transform(customItemModel())
.register();
// Contraptions
public static final BlockEntry<MechanicalPistonBlock> MECHANICAL_PISTON =

View file

@ -64,7 +64,10 @@ public class AllShapes {
.forHorizontalAxis(),
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()
.forHorizontalAxis(),
PUMP = shape(2, 0, 2, 14, 5, 14).add(4, 0, 4, 12, 16, 12)
.add(3, 12, 3, 13, 16, 13)
.forDirectional(Direction.UP)
;

View file

@ -45,6 +45,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.pul
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
import com.simibubi.create.content.contraptions.components.turntable.TurntableTileEntity;
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity;
import com.simibubi.create.content.contraptions.fluids.PumpRenderer;
import com.simibubi.create.content.contraptions.fluids.PumpTileEntity;
import com.simibubi.create.content.contraptions.processing.BasinRenderer;
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer;
@ -136,6 +138,9 @@ public class AllTileEntities {
public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK =
register("cuckoo_clock", CuckooClockTileEntity::new, AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK);
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP =
register("mechanical_pump", PumpTileEntity::new, AllBlocks.MECHANICAL_PUMP);
public static final TileEntityEntry<BeltTileEntity> BELT = register("belt", BeltTileEntity::new, AllBlocks.BELT);
public static final TileEntityEntry<BeltTunnelTileEntity> BELT_TUNNEL =
register("belt_tunnel", BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL);
@ -251,6 +256,8 @@ public class AllTileEntities {
bind(CUCKOO_CLOCK, CuckooClockRenderer::new);
bind(ANALOG_LEVER, AnalogLeverRenderer::new);
bind(MECHANICAL_PUMP, PumpRenderer::new);
bind(MECHANICAL_PISTON, MechanicalPistonRenderer::new);
bind(MECHANICAL_BEARING, BearingRenderer::new);
bind(CLOCKWORK_BEARING, BearingRenderer::new);

View file

@ -38,7 +38,7 @@ public class Create {
public static final String ID = "create";
public static final String NAME = "Create";
public static final String VERSION = "0.2.4d";
public static final String VERSION = "0.3";
public static Logger logger = LogManager.getLogger();
public static ItemGroup baseCreativeTab = new CreateItemGroup();

View file

@ -84,8 +84,6 @@ public abstract class KineticBlock extends Block implements IRotate {
kte.updateSpeed = true;
}
protected abstract boolean hasStaticPart();
@Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
if (worldIn.isRemote)

View file

@ -83,11 +83,6 @@ public class DrillBlock extends DirectionalKineticBlock implements IPortableBloc
return PushReaction.NORMAL;
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public MovementBehaviour getMovementBehaviour() {
return MOVEMENT;

View file

@ -61,11 +61,6 @@ public class CuckooClockBlock extends HorizontalKineticBlock {
return this.getDefaultState().with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing().getOpposite());
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == state.get(HORIZONTAL_FACING).getOpposite();

View file

@ -57,11 +57,6 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT
return AllTileEntities.MECHANICAL_CRAFTER.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
return true;

View file

@ -87,11 +87,6 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandC
return AllTileEntities.HAND_CRANK.create();
}
@Override
protected boolean hasStaticPart() {
return false;
}
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == state.get(FACING).getOpposite();

View file

@ -173,11 +173,6 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE
return face.getAxis() == state.get(AXIS);
}
@Override
protected boolean hasStaticPart() {
return false;
}
@Override
public float getParticleTargetRadius() {
return 1.125f;

View file

@ -38,11 +38,6 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<De
return AllTileEntities.DEPLOYER.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public PushReaction getPushReaction(BlockState state) {
return PushReaction.NORMAL;

View file

@ -73,11 +73,6 @@ public class EncasedFanBlock extends DirectionalKineticBlock implements ITE<Enca
return state.get(FACING).getAxis();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == state.get(FACING).getOpposite();

View file

@ -45,11 +45,6 @@ public class FlywheelBlock extends HorizontalKineticBlock {
return this.getDefaultState().with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing());
}
@Override
protected boolean hasStaticPart() {
return true;
}
public static boolean isConnected(BlockState state) {
return getConnection(state) != null;
}

View file

@ -41,11 +41,6 @@ public class MillstoneBlock extends KineticBlock implements ITE<MillstoneTileEnt
return AllTileEntities.MILLSTONE.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.MILLSTONE;

View file

@ -28,11 +28,6 @@ public class MechanicalMixerBlock extends KineticBlock implements ITE<Mechanical
return AllTileEntities.MECHANICAL_MIXER.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
return !AllBlocks.BASIN.has(worldIn.getBlockState(pos.down()));

View file

@ -51,11 +51,6 @@ public class CreativeMotorBlock extends DirectionalKineticBlock {
return state.get(FACING).getAxis();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public boolean hideStressImpact() {
return true;

View file

@ -93,11 +93,6 @@ public class MechanicalPressBlock extends HorizontalKineticBlock
return face.getAxis() == state.get(HORIZONTAL_FACING).getAxis();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
onAttachmentPlaced(worldIn, pos, state);

View file

@ -63,11 +63,6 @@ public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTile
return AllTileEntities.SAW.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.CASING_12PX.get(state.get(FACING));

View file

@ -19,11 +19,6 @@ public abstract class BearingBlock extends DirectionalKineticBlock {
return face == state.get(FACING).getOpposite();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public Axis getRotationAxis(BlockState state) {
return state.get(FACING).getAxis();

View file

@ -103,11 +103,6 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock implement
return AllTileEntities.MECHANICAL_PISTON.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
if (state.get(STATE) != PistonState.RETRACTED)

View file

@ -39,11 +39,6 @@ public class PulleyBlock extends HorizontalAxisKineticBlock implements ITE<Pulle
return AllTileEntities.ROPE_PULLEY.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
if (state.getBlock() != newState.getBlock()) {

View file

@ -102,11 +102,6 @@ public class TurntableBlock extends KineticBlock implements ITE<TurntableTileEnt
return Axis.Y;
}
@Override
protected boolean hasStaticPart() {
return false;
}
@Override
public Class<TurntableTileEntity> getTileEntityClass() {
return TurntableTileEntity.class;

View file

@ -35,11 +35,6 @@ public class WaterWheelBlock extends HorizontalKineticBlock implements ITE<Water
return AllTileEntities.WATER_WHEEL.create();
}
@Override
protected boolean hasStaticPart() {
return false;
}
@Override
public BlockRenderType getRenderType(BlockState state) {
return BlockRenderType.ENTITYBLOCK_ANIMATED;

View file

@ -44,8 +44,8 @@ public class PipeBlock extends SixWayBlock {
// Update sides that are not ignored
for (Direction d : Iterate.directions)
if (d != ignore)
state = state.with(FACING_TO_PROPERTY_MAP.get(d), this == world.getBlockState(pos.offset(d))
.getBlock());
state = state.with(FACING_TO_PROPERTY_MAP.get(d),
canConnectTo(world, pos.offset(d), world.getBlockState(pos.offset(d)), d.getOpposite()));
// See if it has enough connections
Direction connectedDirection = null;
@ -70,6 +70,16 @@ public class PipeBlock extends SixWayBlock {
return state.getBlock() instanceof PipeBlock;
}
// TODO: more generic pipe connection handling. Ideally without marker interface
public static boolean canConnectTo(ILightReader world, BlockPos pos, BlockState neighbour, Direction blockFace) {
if (isPipe(neighbour))
return true;
if (neighbour.getBlock() instanceof PumpBlock && blockFace.getAxis() == neighbour.get(PumpBlock.FACING)
.getAxis())
return true;
return false;
}
public static boolean shouldDrawRim(ILightReader world, BlockPos pos, BlockState state, Direction direction) {
if (!isPipe(state))
return false;
@ -77,6 +87,9 @@ public class PipeBlock extends SixWayBlock {
return false;
BlockPos offsetPos = pos.offset(direction);
BlockState facingState = world.getBlockState(offsetPos);
if (facingState.getBlock() instanceof PumpBlock && facingState.get(PumpBlock.FACING)
.getAxis() == direction.getAxis())
return false;
if (!isPipe(facingState))
return true;
if (!isCornerOrEndPipe(world, pos, state))

View file

@ -0,0 +1,56 @@
package com.simibubi.create.content.contraptions.fluids;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
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.IWorldReader;
public class PumpBlock extends DirectionalKineticBlock {
public PumpBlock(Properties p_i48415_1_) {
super(p_i48415_1_);
}
@Override
public boolean hasTileEntity(BlockState state) {
return true;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.MECHANICAL_PUMP.create();
}
@Override
public BlockState getRotatedBlockState(BlockState originalState, Direction targetedFace) {
return originalState.with(FACING, originalState.get(FACING)
.getOpposite());
}
@Override
public Axis getRotationAxis(BlockState state) {
return state.get(FACING)
.getAxis();
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_,
ISelectionContext p_220053_4_) {
return AllShapes.PUMP.get(state.get(FACING));
}
@Override
public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) {
return true;
}
}

View file

@ -0,0 +1,58 @@
package com.simibubi.create.content.contraptions.fluids;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.MatrixStacker;
import com.simibubi.create.foundation.utility.SuperByteBuffer;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.util.Direction;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
public class PumpRenderer extends KineticTileEntityRenderer {
public PumpRenderer(TileEntityRendererDispatcher dispatcher) {
super(dispatcher);
}
@Override
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
int light, int overlay) {
super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
if (!(te instanceof PumpTileEntity))
return;
PumpTileEntity pump = (PumpTileEntity) te;
Vec3d rotationOffset = new Vec3d(.5, 14 / 16f, .5);
BlockState blockState = te.getBlockState();
float angle = MathHelper.lerp(pump.arrowDirection.get(partialTicks), 0, 90) - 90;
for (float yRot : new float[] { 0, 90 }) {
ms.push();
SuperByteBuffer arrow = AllBlockPartials.MECHANICAL_PUMP_ARROW.renderOn(blockState);
Direction direction = blockState.get(PumpBlock.FACING);
MatrixStacker.of(ms)
.centre()
.rotateY(AngleHelper.horizontalAngle(direction) + 180)
.rotateX(-AngleHelper.verticalAngle(direction) - 90)
.unCentre()
.translate(rotationOffset)
.rotateY(yRot)
.rotateZ(angle)
.translateBack(rotationOffset);
arrow.renderInto(ms, buffer.getBuffer(RenderType.getSolid()));
ms.pop();
}
}
@Override
protected SuperByteBuffer getRotatedModel(KineticTileEntity te) {
return AllBlockPartials.MECHANICAL_PUMP_COG.renderOnDirectional(te.getBlockState());
}
}

View file

@ -0,0 +1,29 @@
package com.simibubi.create.content.contraptions.fluids;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue;
import net.minecraft.tileentity.TileEntityType;
public class PumpTileEntity extends KineticTileEntity {
InterpolatedChasingValue arrowDirection;
public PumpTileEntity(TileEntityType<?> typeIn) {
super(typeIn);
arrowDirection = new InterpolatedChasingValue();
arrowDirection.start(1);
}
@Override
public void tick() {
super.tick();
if (world.isRemote) {
float speed = getSpeed();
if (speed != 0)
arrowDirection.target(Math.signum(speed));
arrowDirection.tick();
}
}
}

View file

@ -25,11 +25,6 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock {
return AllTileEntities.ROTATION_SPEED_CONTROLLER.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockState above = context.getWorld().getBlockState(context.getPos().up());

View file

@ -137,11 +137,6 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen
return super.getRotationAxis(state);
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public Class<SequencedGearshiftTileEntity> getTileEntityClass() {
return SequencedGearshiftTileEntity.class;

View file

@ -588,11 +588,6 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
return pos;
}
@Override
protected boolean hasStaticPart() {
return false;
}
public static boolean canAccessFromSide(Direction facing, BlockState belt) {
if (facing == null)
return true;

View file

@ -41,11 +41,6 @@ public class ShaftBlock extends RotatedPillarKineticBlock {
return AllTileEntities.SIMPLE_KINETIC.create();
}
@Override
protected boolean hasStaticPart() {
return false;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.SIX_VOXEL_POLE.get(state.get(AXIS));

View file

@ -185,11 +185,6 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
return AllTileEntities.ENCASED_SHAFT.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
public enum Part implements IStringSerializable {
START, MIDDLE, END, NONE;

View file

@ -29,11 +29,6 @@ public class EncasedShaftBlock extends RotatedPillarKineticBlock {
return AllTileEntities.ENCASED_SHAFT.create();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public PushReaction getPushReaction(BlockState state) {
return PushReaction.PUSH_ONLY;

View file

@ -108,11 +108,6 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
return super.getStateForPlacement(context);
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
protected Direction getFacingForPlacement(BlockItemUseContext context) {
return context.getFace();

View file

@ -73,11 +73,6 @@ public class GearboxBlock extends RotatedPillarKineticBlock {
return face.getAxis() != state.get(AXIS);
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public Axis getRotationAxis(BlockState state) {
return state.get(AXIS);

View file

@ -32,7 +32,8 @@ public interface IWrenchable {
KineticTileEntity.switchToBlockState(world, context.getPos(), updateAfterWrenched(rotated, context));
TileEntity te = context.getWorld().getTileEntity(context.getPos());
TileEntity te = context.getWorld()
.getTileEntity(context.getPos());
if (te != null)
te.updateContainingBlockInfo();
if (te instanceof GeneratingKineticTileEntity) {
@ -62,32 +63,48 @@ public interface IWrenchable {
return ActionResultType.SUCCESS;
}
static BlockState getRotatedBlockState(BlockState originalState, Direction targetedFace){
default BlockState getRotatedBlockState(BlockState originalState, Direction targetedFace) {
BlockState newState = originalState;
if (targetedFace.getAxis() == Direction.Axis.Y) {
if (originalState.has(HorizontalAxisKineticBlock.HORIZONTAL_AXIS))
return originalState.with(HorizontalAxisKineticBlock.HORIZONTAL_AXIS, DirectionHelper.rotateAround(VoxelShaper.axisAsFace(originalState.get(HorizontalAxisKineticBlock.HORIZONTAL_AXIS)), targetedFace.getAxis()).getAxis());
return originalState.with(HorizontalAxisKineticBlock.HORIZONTAL_AXIS, DirectionHelper
.rotateAround(VoxelShaper.axisAsFace(originalState.get(HorizontalAxisKineticBlock.HORIZONTAL_AXIS)),
targetedFace.getAxis())
.getAxis());
if (originalState.has(HorizontalKineticBlock.HORIZONTAL_FACING))
return originalState.with(HorizontalKineticBlock.HORIZONTAL_FACING, DirectionHelper.rotateAround(originalState.get(HorizontalKineticBlock.HORIZONTAL_FACING), targetedFace.getAxis()));
return originalState.with(HorizontalKineticBlock.HORIZONTAL_FACING, DirectionHelper
.rotateAround(originalState.get(HorizontalKineticBlock.HORIZONTAL_FACING), targetedFace.getAxis()));
}
if (originalState.has(RotatedPillarKineticBlock.AXIS))
return originalState.with(RotatedPillarKineticBlock.AXIS, DirectionHelper.rotateAround(VoxelShaper.axisAsFace(originalState.get(RotatedPillarKineticBlock.AXIS)), targetedFace.getAxis()).getAxis());
return originalState.with(RotatedPillarKineticBlock.AXIS,
DirectionHelper
.rotateAround(VoxelShaper.axisAsFace(originalState.get(RotatedPillarKineticBlock.AXIS)),
targetedFace.getAxis())
.getAxis());
if (!originalState.has(DirectionalKineticBlock.FACING)) return originalState;
if (!originalState.has(DirectionalKineticBlock.FACING))
return originalState;
Direction stateFacing = originalState.get(DirectionalKineticBlock.FACING);
if (stateFacing.getAxis().equals(targetedFace.getAxis())) {
if (originalState.has(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE)) return originalState.cycle(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE);
else return originalState;
if (stateFacing.getAxis()
.equals(targetedFace.getAxis())) {
if (originalState.has(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE))
return originalState.cycle(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE);
else
return originalState;
} else {
do {
newState = newState.with(DirectionalKineticBlock.FACING, DirectionHelper.rotateAround(newState.get(DirectionalKineticBlock.FACING), targetedFace.getAxis()));
if (targetedFace.getAxis() == Direction.Axis.Y && newState.has(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE)) newState = newState.cycle(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE);
} while (newState.get(DirectionalKineticBlock.FACING).getAxis().equals(targetedFace.getAxis()));
newState = newState.with(DirectionalKineticBlock.FACING,
DirectionHelper.rotateAround(newState.get(DirectionalKineticBlock.FACING), targetedFace.getAxis()));
if (targetedFace.getAxis() == Direction.Axis.Y
&& newState.has(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE))
newState = newState.cycle(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE);
} while (newState.get(DirectionalKineticBlock.FACING)
.getAxis()
.equals(targetedFace.getAxis()));
}
return newState;
}

View file

@ -0,0 +1,117 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/large_wheels",
"textures": {
"4": "create:block/pump",
"particle": "create:block/copper_pipe"
},
"elements": [
{
"from": [7, 11.5, 1.5],
"to": [9, 13.5, 2.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 9.5]},
"faces": {
"north": {"uv": [12, 2, 14, 4], "rotation": 270, "texture": "#4"},
"east": {"uv": [12, 2, 14, 3], "rotation": 270, "texture": "#4"},
"south": {"uv": [14, 2, 12, 4], "rotation": 90, "texture": "#4"},
"west": {"uv": [12, 3, 14, 4], "rotation": 90, "texture": "#4"},
"up": {"uv": [12, 3, 14, 4], "texture": "#4"},
"down": {"uv": [12, 2, 13, 4], "rotation": 90, "texture": "#4"}
}
},
{
"from": [7, 11.5, 13.5],
"to": [9, 13.5, 14.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 6.5]},
"faces": {
"north": {"uv": [14, 4, 12, 2], "rotation": 90, "texture": "#4"},
"east": {"uv": [12, 3, 14, 2], "rotation": 270, "texture": "#4"},
"south": {"uv": [12, 4, 14, 2], "rotation": 270, "texture": "#4"},
"west": {"uv": [12, 4, 14, 3], "rotation": 90, "texture": "#4"},
"up": {"uv": [12, 4, 14, 3], "texture": "#4"},
"down": {"uv": [13, 2, 12, 4], "rotation": 90, "texture": "#4"}
}
},
{
"from": [7, 13.5, 1.5],
"to": [11, 15.5, 2.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 9.5]},
"faces": {
"north": {"uv": [14, 0, 16, 4], "rotation": 270, "texture": "#4"},
"east": {"uv": [14, 0, 16, 1], "rotation": 270, "texture": "#4"},
"south": {"uv": [16, 0, 14, 4], "rotation": 90, "texture": "#4"},
"west": {"uv": [12, 3, 14, 4], "rotation": 270, "texture": "#4"},
"up": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"down": {"uv": [12, 0, 13, 4], "rotation": 270, "texture": "#4"}
}
},
{
"from": [7, 13.5, 13.5],
"to": [11, 15.5, 14.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 6.5]},
"faces": {
"north": {"uv": [16, 4, 14, 0], "rotation": 90, "texture": "#4"},
"east": {"uv": [14, 1, 16, 0], "rotation": 270, "texture": "#4"},
"south": {"uv": [14, 4, 16, 0], "rotation": 270, "texture": "#4"},
"west": {"uv": [12, 4, 14, 3], "rotation": 270, "texture": "#4"},
"up": {"uv": [16, 0, 15, 4], "rotation": 90, "texture": "#4"},
"down": {"uv": [13, 0, 12, 4], "rotation": 270, "texture": "#4"}
}
},
{
"name": "rod",
"from": [7.5, 13.5, 1],
"to": [8.5, 14.5, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [15.5, 21.5, 10]},
"faces": {
"north": {"uv": [0, 15, 1, 16], "texture": "#4"},
"east": {"uv": [0, 15, 14, 16], "texture": "#4"},
"south": {"uv": [0, 15, 1, 16], "texture": "#4"},
"west": {"uv": [0, 15, 14, 16], "texture": "#4"},
"up": {"uv": [0, 15, 14, 16], "rotation": 90, "texture": "#4"},
"down": {"uv": [0, 15, 14, 16], "rotation": 90, "texture": "#4"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 1.25],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [2.5, -0.5, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 1.75, -4.5],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "arrow",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4]
}
]
}

View file

@ -0,0 +1,92 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/large_wheels",
"textures": {
"3": "create:block/copper_pipe",
"4": "create:block/pump",
"particle": "create:block/copper_pipe"
},
"elements": [
{
"name": "middle",
"from": [4, 4, 4],
"to": [12, 12, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 8, 4, 12], "texture": "#3"},
"east": {"uv": [0, 8, 4, 12], "texture": "#3"},
"south": {"uv": [0, 8, 4, 12], "texture": "#3"},
"west": {"uv": [0, 8, 4, 12], "texture": "#3"}
}
},
{
"name": "back",
"from": [2, 0, 2],
"to": [14, 5, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [11, 8, 20]},
"faces": {
"north": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"east": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"south": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"west": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"up": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#3"},
"down": {"uv": [0, 0, 12, 12], "texture": "#4"}
}
},
{
"name": "front",
"from": [3, 12, 3],
"to": [13, 16, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 10]},
"faces": {
"north": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"east": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"south": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"west": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"up": {"uv": [6, 0, 11, 5], "texture": "#3"},
"down": {"uv": [6, 0, 11, 5], "texture": "#3"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 1.25],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [2.5, -0.5, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 1.75, -4.5],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "pump",
"origin": [8, 8, 8],
"children": [0, 1, 2]
}
]
}

View file

@ -0,0 +1,118 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/large_wheels",
"textures": {
"5": "create:block/millstone",
"particle": "create:block/copper_pipe"
},
"elements": [
{
"name": "Gear5",
"from": [6.5, -1, 5],
"to": [9.5, 17, 11],
"faces": {
"north": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"},
"south": {"uv": [0, 8.5, 9, 10], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 10, 9, 13], "rotation": 90, "texture": "#5"},
"up": {"uv": [9, 10, 10.5, 13], "rotation": 180, "texture": "#5"},
"down": {"uv": [9, 10, 10.5, 13], "texture": "#5"}
}
},
{
"name": "Gear6",
"from": [6.5, -1, 5],
"to": [9.5, 17, 11],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"},
"south": {"uv": [0, 8.5, 9, 10], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 10, 9, 13], "rotation": 90, "texture": "#5"},
"up": {"uv": [9, 10, 10.5, 13], "rotation": 180, "texture": "#5"},
"down": {"uv": [9, 10, 10.5, 13], "texture": "#5"}
}
},
{
"name": "Gear7",
"from": [-1, 6.5, 5],
"to": [17, 9.5, 11],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"},
"east": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"},
"south": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"},
"west": {"uv": [9, 10, 10.5, 13], "rotation": 90, "texture": "#5"},
"up": {"uv": [0, 10, 9, 13], "rotation": 180, "texture": "#5"},
"down": {"uv": [0, 10, 9, 13], "texture": "#5"}
}
},
{
"name": "Gear7",
"from": [-1, 6.5, 5],
"to": [17, 9.5, 11],
"faces": {
"north": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"},
"east": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"},
"south": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"},
"west": {"uv": [9, 10, 10.5, 13], "rotation": 90, "texture": "#5"},
"up": {"uv": [0, 10, 9, 13], "rotation": 180, "texture": "#5"},
"down": {"uv": [0, 10, 9, 13], "texture": "#5"}
}
},
{
"name": "GearCaseInner",
"from": [2, 2, 5.5],
"to": [14, 14, 10.5],
"faces": {
"north": {"uv": [0, 0, 6, 6], "texture": "#5"},
"east": {"uv": [0, 6, 6, 8.5], "rotation": 270, "texture": "#5"},
"south": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#5"},
"west": {"uv": [0, 6, 6, 8.5], "rotation": 90, "texture": "#5"},
"up": {"uv": [0, 6, 6, 8.5], "rotation": 180, "texture": "#5"},
"down": {"uv": [0, 6, 6, 8.5], "texture": "#5"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 1.25],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [2.5, -0.5, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 1.75, -4.5],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "cogwheel",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4]
}
]
}

View file

@ -0,0 +1,202 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/block",
"textures": {
"3": "create:block/copper_pipe",
"4": "create:block/pump",
"5": "create:block/millstone",
"particle": "create:block/copper_pipe"
},
"elements": [
{
"from": [7, 11.5, 1.5],
"to": [9, 13.5, 2.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 9.5]},
"faces": {
"north": {"uv": [12, 2, 14, 4], "rotation": 270, "texture": "#4"},
"east": {"uv": [12, 2, 14, 3], "rotation": 270, "texture": "#4"},
"south": {"uv": [14, 2, 12, 4], "rotation": 90, "texture": "#4"},
"west": {"uv": [12, 3, 14, 4], "rotation": 90, "texture": "#4"},
"up": {"uv": [12, 3, 14, 4], "texture": "#4"},
"down": {"uv": [12, 2, 13, 4], "rotation": 90, "texture": "#4"}
}
},
{
"from": [7, 11.5, 13.5],
"to": [9, 13.5, 14.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 6.5]},
"faces": {
"north": {"uv": [14, 4, 12, 2], "rotation": 90, "texture": "#4"},
"east": {"uv": [12, 3, 14, 2], "rotation": 270, "texture": "#4"},
"south": {"uv": [12, 4, 14, 2], "rotation": 270, "texture": "#4"},
"west": {"uv": [12, 4, 14, 3], "rotation": 90, "texture": "#4"},
"up": {"uv": [12, 4, 14, 3], "texture": "#4"},
"down": {"uv": [13, 2, 12, 4], "rotation": 90, "texture": "#4"}
}
},
{
"from": [7, 13.5, 1.5],
"to": [11, 15.5, 2.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 9.5]},
"faces": {
"north": {"uv": [14, 0, 16, 4], "rotation": 270, "texture": "#4"},
"east": {"uv": [14, 0, 16, 1], "rotation": 270, "texture": "#4"},
"south": {"uv": [16, 0, 14, 4], "rotation": 90, "texture": "#4"},
"west": {"uv": [12, 3, 14, 4], "rotation": 270, "texture": "#4"},
"up": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"down": {"uv": [12, 0, 13, 4], "rotation": 270, "texture": "#4"}
}
},
{
"from": [7, 13.5, 13.5],
"to": [11, 15.5, 14.5],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 14.5, 6.5]},
"faces": {
"north": {"uv": [16, 4, 14, 0], "rotation": 90, "texture": "#4"},
"east": {"uv": [14, 1, 16, 0], "rotation": 270, "texture": "#4"},
"south": {"uv": [14, 4, 16, 0], "rotation": 270, "texture": "#4"},
"west": {"uv": [12, 4, 14, 3], "rotation": 270, "texture": "#4"},
"up": {"uv": [16, 0, 15, 4], "rotation": 90, "texture": "#4"},
"down": {"uv": [13, 0, 12, 4], "rotation": 270, "texture": "#4"}
}
},
{
"name": "rod",
"from": [7.5, 13.5, 1],
"to": [8.5, 14.5, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [15.5, 21.5, 10]},
"faces": {
"north": {"uv": [0, 15, 1, 16], "texture": "#4"},
"east": {"uv": [0, 15, 14, 16], "texture": "#4"},
"south": {"uv": [0, 15, 1, 16], "texture": "#4"},
"west": {"uv": [0, 15, 14, 16], "texture": "#4"},
"up": {"uv": [0, 15, 14, 16], "rotation": 90, "texture": "#4"},
"down": {"uv": [0, 15, 14, 16], "rotation": 90, "texture": "#4"}
}
},
{
"name": "Gear5",
"from": [6.5, 5, -1],
"to": [9.5, 11, 17],
"faces": {
"north": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"east": {"uv": [0, 10, 9, 13], "texture": "#5"},
"south": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"west": {"uv": [0, 10, 9, 13], "texture": "#5"},
"up": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"},
"down": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"}
}
},
{
"name": "Gear6",
"from": [6.5, 5, -1],
"to": [9.5, 11, 17],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"east": {"uv": [0, 10, 9, 13], "texture": "#5"},
"south": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"west": {"uv": [0, 10, 9, 13], "texture": "#5"},
"up": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"},
"down": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"}
}
},
{
"name": "Gear7",
"from": [-1, 5, 6.5],
"to": [17, 11, 9.5],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 10, 9, 13], "texture": "#5"},
"east": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"south": {"uv": [0, 10, 9, 13], "texture": "#5"},
"west": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"up": {"uv": [0, 8.5, 9, 10], "texture": "#5"},
"down": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"}
}
},
{
"name": "Gear7",
"from": [-1, 5, 6.5],
"to": [17, 11, 9.5],
"faces": {
"north": {"uv": [0, 10, 9, 13], "texture": "#5"},
"east": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"south": {"uv": [0, 10, 9, 13], "texture": "#5"},
"west": {"uv": [9, 10, 10.5, 13], "texture": "#5"},
"up": {"uv": [0, 8.5, 9, 10], "texture": "#5"},
"down": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"}
}
},
{
"name": "GearCaseInner",
"from": [2, 5.5, 2],
"to": [14, 10.5, 14],
"faces": {
"north": {"uv": [0, 6, 6, 8.5], "texture": "#5"},
"east": {"uv": [0, 6, 6, 8.5], "texture": "#5"},
"south": {"uv": [0, 6, 6, 8.5], "texture": "#5"},
"west": {"uv": [0, 6, 6, 8.5], "texture": "#5"},
"up": {"uv": [0, 0, 6, 6], "texture": "#5"},
"down": {"uv": [0, 0, 6, 6], "texture": "#5"}
}
},
{
"name": "middle",
"from": [4, 4, 4],
"to": [12, 12, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 8, 4, 12], "texture": "#3"},
"east": {"uv": [0, 8, 4, 12], "texture": "#3"},
"south": {"uv": [0, 8, 4, 12], "texture": "#3"},
"west": {"uv": [0, 8, 4, 12], "texture": "#3"}
}
},
{
"name": "back",
"from": [2, 0, 2],
"to": [14, 5, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [11, 8, 20]},
"faces": {
"north": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"east": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"south": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"west": {"uv": [11, 0, 13.5, 6], "rotation": 270, "texture": "#3"},
"up": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#3"},
"down": {"uv": [0, 0, 12, 12], "texture": "#4"}
}
},
{
"name": "front",
"from": [3, 12, 3],
"to": [13, 16, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 10]},
"faces": {
"north": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"east": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"south": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"west": {"uv": [12, 4, 16, 14], "rotation": 90, "texture": "#4"},
"up": {"uv": [6, 0, 11, 5], "texture": "#3"},
"down": {"uv": [6, 0, 11, 5], "texture": "#3"}
}
}
],
"groups": [
{
"name": "arrow",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4]
},
{
"name": "cogwheel",
"origin": [8, 8, 8],
"children": [5, 6, 7, 8, 9]
},
{
"name": "pump",
"origin": [8, 8, 8],
"children": [10, 11, 12]
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B