diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index aca2f76ab..4cbb3715b 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -388,7 +388,7 @@ a8094531617e27a545c4815ab2062bf0ffca3633 assets/create/blockstates/turntable.jso c4db76b9d36cfb098df0d158cb6f8b82768ebe14 assets/create/blockstates/vertical_framed_glass_pane.json 3a5da54d9763e9512cfaa47b25226b79738b25f3 assets/create/blockstates/warped_window.json 19ef7a16c82f07d304fb60d121845185d189aecf assets/create/blockstates/warped_window_pane.json -d995547bcd71603ba7378d8998098e462030bfd0 assets/create/blockstates/water_wheel.json +d31fce8315c8715521d66b5dcc166c84e949dd1d assets/create/blockstates/water_wheel.json f182669f7547964f9f2ef67916568556870def7b assets/create/blockstates/weathered_limestone.json 27e6740834c0f673acc3531371512daa6dcab025 assets/create/blockstates/weathered_limestone_bricks.json abb74e4f4c2b9851670cb6ad794281b0f7be0f5a assets/create/blockstates/weathered_limestone_bricks_slab.json @@ -1668,7 +1668,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json bbe7fc4aef29420319f59d02d4cd376a78244e70 assets/create/sounds.json -0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json +5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json diff --git a/src/generated/resources/assets/create/blockstates/water_wheel.json b/src/generated/resources/assets/create/blockstates/water_wheel.json index c9b0731b7..fe99163df 100644 --- a/src/generated/resources/assets/create/blockstates/water_wheel.json +++ b/src/generated/resources/assets/create/blockstates/water_wheel.json @@ -1,5 +1,12 @@ { "variants": { + "facing=down": { + "model": "create:block/water_wheel", + "x": 180 + }, + "facing=up": { + "model": "create:block/water_wheel" + }, "facing=north": { "model": "create:block/water_wheel", "x": 90 diff --git a/src/generated/resources/data/create/advancements/aesthetics.json b/src/generated/resources/data/create/advancements/aesthetics.json index d723cbe38..59a86f429 100644 --- a/src/generated/resources/data/create/advancements/aesthetics.json +++ b/src/generated/resources/data/create/advancements/aesthetics.json @@ -28,8 +28,8 @@ "trigger": "create:bracket_apply", "conditions": { "accepted_entries": [ - "create:cogwheel", - "create:large_cogwheel" + "create:large_cogwheel", + "create:cogwheel" ] } }, diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index badd19385..ed3d59709 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -368,8 +368,8 @@ public class AllBlocks { public static final BlockEntry WATER_WHEEL = REGISTRATE.block("water_wheel", WaterWheelBlock::new) .initialProperties(SharedProperties::wooden) - .properties(AbstractBlock.Properties::nonOpaque) - .blockstate(BlockStateGen.horizontalWheelProvider(false)) + .properties(Block.Properties::nonOpaque) + .blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(false)) .addLayer(() -> RenderType::getCutoutMipped) .transform(StressConfigDefaults.setCapacity(16.0)) .simpleItem() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java index de25c380c..b07b69aa3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/waterwheel/WaterWheelBlock.java @@ -5,7 +5,7 @@ import javax.annotation.ParametersAreNonnullByDefault; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllFluids; import com.simibubi.create.AllTileEntities; -import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; +import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.config.AllConfigs; @@ -33,7 +33,7 @@ import net.minecraft.world.World; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault -public class WaterWheelBlock extends HorizontalKineticBlock implements ITE { +public class WaterWheelBlock extends DirectionalKineticBlock implements ITE { public WaterWheelBlock(Properties properties) { super(properties); @@ -56,10 +56,10 @@ public class WaterWheelBlock extends HorizontalKineticBlock implements ITE 0 ^ !clockwise ? -flow.y * clockwiseMultiplier : -flow.y; } + + if (wf.getAxis() == Axis.Y) { + if (side.getAxis() == Axis.Z) + flowStrength = flow.x < 0 ^ !clockwise ? flow.x * clockwiseMultiplier : flow.x; + if (side.getAxis() == Axis.X) + flowStrength = flow.z > 0 ^ !clockwise ? -flow.z * clockwiseMultiplier : -flow.z; + } + if (te.getSpeed() == 0 && flowStrength != 0 && !world.isRemote()) { AllTriggers.triggerForNearbyPlayers(AllTriggers.WATER_WHEEL, world, pos, 5); if (FluidHelper.isLava(fluid.getFluid())) @@ -152,23 +161,23 @@ public class WaterWheelBlock extends HorizontalKineticBlock implements ITE s.with(WaterWheelBlock.HORIZONTAL_FACING, Direction.WEST), false); + scene.world.modifyBlock(wheel, s -> s.with(WaterWheelBlock.FACING, Direction.WEST), false); scene.world.rotateSection(wheelElement, 0, -180, 0, 0); scene.idle(1); scene.world.moveSection(water, util.vector.of(0, -2, 2), 10); @@ -618,7 +618,7 @@ public class KineticsScenes { scene.rotateCameraY(30); scene.world.rotateSection(wheelElement, 0, 180, 0, 5); scene.idle(10); - scene.world.modifyBlock(wheel, s -> s.with(WaterWheelBlock.HORIZONTAL_FACING, Direction.EAST), false); + scene.world.modifyBlock(wheel, s -> s.with(WaterWheelBlock.FACING, Direction.EAST), false); scene.world.rotateSection(wheelElement, 0, -180, 0, 0); scene.idle(1); scene.world.moveSection(water, util.vector.of(0, -2, 2), 10);