From 49913dc96154c0a945e26920d3745734a2cc35a1 Mon Sep 17 00:00:00 2001 From: sashafiesta <46864270+sashafiesta@users.noreply.github.com> Date: Tue, 14 May 2024 19:31:45 +0700 Subject: [PATCH] Removed some content. --- README.md | 4 +- .../create_connected/CCBlockEntityTypes.java | 6 ++- .../hlysine/create_connected/CCBlocks.java | 6 ++- .../com/hlysine/create_connected/CCItems.java | 5 +- .../RotationPropagatorMixin.java | 54 ------------------- .../resources/create_connected.mixins.json | 3 +- 6 files changed, 17 insertions(+), 61 deletions(-) delete mode 100644 src/main/java/com/hlysine/create_connected/mixin/chaincogwheel/RotationPropagatorMixin.java diff --git a/README.md b/README.md index f66d190..646a931 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Port status: +=========================+=========================================================+ | Feature | Status | +=========================+=========================================================+ -| Kinetic Blocks | Implemented | +| Kinetic Blocks | Implemented except encased chain cogwheel | +-------------------------+---------------------------------------------------------+ | Copycats | Not planned | +-------------------------+---------------------------------------------------------+ @@ -23,7 +23,7 @@ Port status: +-------------------------+---------------------------------------------------------+ |Sequenced Pulse Generator| Implemented, recipe changed | +-------------------------+---------------------------------------------------------+ -| Linked Transmitter | Implemented, completely bugged | +| Linked Transmitter | Not implemented | +-------------------------+---------------------------------------------------------+ |S. Gearshift instructions| Not implemented | +-------------------------+---------------------------------------------------------+ diff --git a/src/main/java/com/hlysine/create_connected/CCBlockEntityTypes.java b/src/main/java/com/hlysine/create_connected/CCBlockEntityTypes.java index 0946e82..1aaae0b 100644 --- a/src/main/java/com/hlysine/create_connected/CCBlockEntityTypes.java +++ b/src/main/java/com/hlysine/create_connected/CCBlockEntityTypes.java @@ -68,13 +68,17 @@ public class CCBlockEntityTypes { .validBlocks(CCBlocks.CENTRIFUGAL_CLUTCH) .renderer(() -> SplitShaftRenderer::new) .register(); - + + /* + //completely bugged public static final BlockEntityEntry ENCASED_CHAIN_COGWHEEL = REGISTRATE .blockEntity("encased_chain_cogwheel", SimpleKineticBlockEntity::new) .instance(() -> EncasedCogInstance::small, false) .validBlocks(CCBlocks.ENCASED_CHAIN_COGWHEEL) .renderer(() -> EncasedCogRenderer::small) .register(); + */ + public static final BlockEntityEntry FREEWHEEL_CLUTCH = REGISTRATE .blockEntity("freewheel_clutch", FreewheelClutchBlockEntity::new) .instance(() -> SplitShaftInstance::new, false) diff --git a/src/main/java/com/hlysine/create_connected/CCBlocks.java b/src/main/java/com/hlysine/create_connected/CCBlocks.java index f9f1019..37631d1 100644 --- a/src/main/java/com/hlysine/create_connected/CCBlocks.java +++ b/src/main/java/com/hlysine/create_connected/CCBlocks.java @@ -147,6 +147,8 @@ public class CCBlocks { .transform(customItemModel()) .register(); + /* + //completely bugged public static final BlockEntry ENCASED_CHAIN_COGWHEEL = REGISTRATE.block("encased_chain_cogwheel", ChainCogwheelBlock::new) .initialProperties(SharedProperties::stone) @@ -159,6 +161,8 @@ public class CCBlocks { .item() .transform(customItemModel()) .register(); + */ + public static final BlockEntry FREEWHEEL_CLUTCH = REGISTRATE.block("freewheel_clutch", FreewheelClutchBlock::new) .initialProperties(SharedProperties::stone) .properties(p -> p.noOcclusion().mapColor(MapColor.PODZOL)) @@ -393,7 +397,7 @@ public class CCBlocks { content.accept(BRAKE); content.accept(BRASS_GEARBOX); content.accept(CENTRIFUGAL_CLUTCH); - content.accept(ENCASED_CHAIN_COGWHEEL); + //content.accept(ENCASED_CHAIN_COGWHEEL); content.accept(FREEWHEEL_CLUTCH); content.accept(INVERTED_CLUTCH); content.accept(INVERTED_GEARSHIFT); diff --git a/src/main/java/com/hlysine/create_connected/CCItems.java b/src/main/java/com/hlysine/create_connected/CCItems.java index aa1b813..7777f9b 100644 --- a/src/main/java/com/hlysine/create_connected/CCItems.java +++ b/src/main/java/com/hlysine/create_connected/CCItems.java @@ -99,17 +99,20 @@ public class CCItems { //.transform(FeatureToggle.registerDependent(CCBlocks.PARALLEL_GEARBOX)) .register(); + /* + //completely bugged public static final ItemEntry LINKED_TRANSMITTER = REGISTRATE.item("linked_transmitter", LinkedTransmitterItem::new) .model(AssetLookup.customGenericItemModel("linked_transmitter", "item")) //.transform(FeatureToggle.register()) .register(); + */ static { ItemGroupEvents.modifyEntriesEvent(CCCreativeTabs.MAIN.key()).register(content -> { content.accept(VERTICAL_SIX_WAY_GEARBOX); content.accept(VERTICAL_BRASS_GEARBOX); content.accept(VERTICAL_PARALLEL_GEARBOX); - content.accept(LINKED_TRANSMITTER); + //content.accept(LINKED_TRANSMITTER); }); } public static void register() { diff --git a/src/main/java/com/hlysine/create_connected/mixin/chaincogwheel/RotationPropagatorMixin.java b/src/main/java/com/hlysine/create_connected/mixin/chaincogwheel/RotationPropagatorMixin.java deleted file mode 100644 index 182c812..0000000 --- a/src/main/java/com/hlysine/create_connected/mixin/chaincogwheel/RotationPropagatorMixin.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.hlysine.create_connected.mixin.chaincogwheel; - -import com.hlysine.create_connected.CCBlocks; -import com.simibubi.create.content.kinetics.RotationPropagator; -import com.simibubi.create.content.kinetics.base.IRotate; -import com.simibubi.create.content.kinetics.base.KineticBlockEntity; -import com.simibubi.create.content.kinetics.chainDrive.ChainDriveBlock; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(value = RotationPropagator.class, remap = false) -public class RotationPropagatorMixin { - @Inject( - method = "getRotationSpeedModifier(Lcom/simibubi/create/content/kinetics/base/KineticBlockEntity;Lcom/simibubi/create/content/kinetics/base/KineticBlockEntity;)F", - at = @At(value = "INVOKE", target = "Lcom/simibubi/create/content/kinetics/chainDrive/ChainDriveBlock;areBlocksConnected(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/Direction;)Z"), - cancellable = true - ) - private static void handleChainCogwheels(KineticBlockEntity from, - KineticBlockEntity to, - CallbackInfoReturnable cir) { - final BlockState stateFrom = from.getBlockState(); - final BlockState stateTo = to.getBlockState(); - Block fromBlock = stateFrom.getBlock(); - Block toBlock = stateTo.getBlock(); - final IRotate definitionFrom = (IRotate) fromBlock; - final IRotate definitionTo = (IRotate) toBlock; - final BlockPos diff = to.getBlockPos() - .subtract(from.getBlockPos()); - final Direction direction = Direction.getNearest(diff.getX(), diff.getY(), diff.getZ()); - - if (stateFrom.is(CCBlocks.ENCASED_CHAIN_COGWHEEL.get()) && stateTo.is(CCBlocks.ENCASED_CHAIN_COGWHEEL.get())) { - boolean connected = ChainDriveBlock.areBlocksConnected(stateFrom, stateTo, direction); - if (!connected) { - if (diff.distManhattan(BlockPos.ZERO) != 1) { - cir.setReturnValue(0f); - return; - } - if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom)) { - cir.setReturnValue(0f); - return; - } - if (definitionFrom.getRotationAxis(stateFrom) == definitionTo.getRotationAxis(stateTo)) { - cir.setReturnValue(-1f); - } - } - } - } -} diff --git a/src/main/resources/create_connected.mixins.json b/src/main/resources/create_connected.mixins.json index add8c6e..37ce7ea 100644 --- a/src/main/resources/create_connected.mixins.json +++ b/src/main/resources/create_connected.mixins.json @@ -6,8 +6,7 @@ "mixins": [ "linkedtransmitter.AnalogLeverBlockEntityAccessor", "linkedtransmitter.AnalogLeverBlockMixin", - "linkedtransmitter.ButtonBlockAccessor", - "chaincogwheel.RotationPropagatorMixin" + "linkedtransmitter.ButtonBlockAccessor" ], "client": [ ],