mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-10 08:33:52 +01:00
This commit is contained in:
parent
b50b22938b
commit
ce955e9fcd
1 changed files with 5 additions and 3 deletions
|
@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.crank;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.core.PartialModel;
|
import com.jozufozu.flywheel.core.PartialModel;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
import com.simibubi.create.AllTileEntities;
|
import com.simibubi.create.AllTileEntities;
|
||||||
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
||||||
|
@ -74,7 +75,8 @@ public class HandCrankBlock extends DirectionalKineticBlock
|
||||||
return InteractionResult.PASS;
|
return InteractionResult.PASS;
|
||||||
|
|
||||||
withTileEntityDo(worldIn, pos, te -> te.turn(player.isShiftKeyDown()));
|
withTileEntityDo(worldIn, pos, te -> te.turn(player.isShiftKeyDown()));
|
||||||
player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF());
|
if(!player.getItemInHand(handIn).is(AllItems.EXTENDO_GRIP.get()))
|
||||||
|
player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF());
|
||||||
|
|
||||||
if (player.getFoodData()
|
if (player.getFoodData()
|
||||||
.getFoodLevel() == 0)
|
.getFoodLevel() == 0)
|
||||||
|
@ -117,14 +119,14 @@ public class HandCrankBlock extends DirectionalKineticBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState updateShape(BlockState pState, Direction pDirection, BlockState pNeighborState,
|
public BlockState updateShape(BlockState pState, Direction pDirection, BlockState pNeighborState,
|
||||||
LevelAccessor pLevel, BlockPos pCurrentPos, BlockPos pNeighborPos) {
|
LevelAccessor pLevel, BlockPos pCurrentPos, BlockPos pNeighborPos) {
|
||||||
updateWater(pLevel, pState, pCurrentPos);
|
updateWater(pLevel, pState, pCurrentPos);
|
||||||
return pState;
|
return pState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidState getFluidState(BlockState pState) {
|
public FluidState getFluidState(BlockState pState) {
|
||||||
return fluidState(pState);
|
return fluidState(pState);
|
||||||
|
|
Loading…
Reference in a new issue