Skip to content

Commit

Permalink
Fixed mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
StewStrong committed Oct 16, 2023
1 parent 33e03c5 commit f95be0e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.mod.forge.mixin.compat.create;

import com.simibubi.create.content.contraptions.components.actors.BlockBreakingKineticTileEntity;
import com.simibubi.create.content.kinetics.base.BlockBreakingKineticBlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.phys.BlockHitResult;
Expand All @@ -14,7 +14,7 @@
import org.valkyrienskies.mod.common.VSGameUtilsKt;
import org.valkyrienskies.mod.common.util.VectorConversionsMCKt;

@Mixin(BlockBreakingKineticTileEntity.class)
@Mixin(BlockBreakingKineticBlockEntity.class)
public abstract class MixinBlockBreakingKineticTileEntity {

@Shadow
Expand All @@ -24,10 +24,10 @@ public abstract class MixinBlockBreakingKineticTileEntity {
method = "tick",
at = @At(
value = "INVOKE",
target = "Lcom/simibubi/create/content/contraptions/components/actors/BlockBreakingKineticTileEntity;getBreakingPos()Lnet/minecraft/core/BlockPos;"
target = "Lcom/simibubi/create/content/kinetics/base/BlockBreakingKineticBlockEntity;getBreakingPos()Lnet/minecraft/core/BlockPos;"
), remap = false
)
private BlockPos getBreakingBlockPos(final BlockBreakingKineticTileEntity self) {
private BlockPos getBreakingBlockPos(final BlockBreakingKineticBlockEntity self) {
final BlockPos orig = this.getBreakingPos();
final Vec3 origin;
final Vec3 target;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.valkyrienskies.mod.forge.mixin.compat.create;

import com.simibubi.create.content.contraptions.components.millstone.MillstoneBlock;
import com.simibubi.create.content.contraptions.processing.BasinBlock;
import com.simibubi.create.content.logistics.block.chute.AbstractChuteBlock;
import com.simibubi.create.content.kinetics.millstone.MillstoneBlock;
import com.simibubi.create.content.logistics.chute.AbstractChuteBlock;
import com.simibubi.create.content.processing.basin.BasinBlock;
import java.util.Iterator;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.valkyrienskies.mod.forge.mixin.compat.create.client;

import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderInfo;
import com.simibubi.create.content.contraptions.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.render.ContraptionRenderInfo;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.world.phys.AABB;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -11,11 +11,10 @@

@Mixin(ContraptionRenderInfo.class)
public class MixinContraptionRenderInfo {

@Redirect(
at = @At(
value = "INVOKE",
target = "Lcom/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity;getBoundingBoxForCulling()Lnet/minecraft/world/phys/AABB;"
target = "Lcom/simibubi/create/content/contraptions/AbstractContraptionEntity;getBoundingBoxForCulling()Lnet/minecraft/world/phys/AABB;"
),
method = "beginFrame"
)
Expand All @@ -24,4 +23,3 @@ private AABB redirectGetAABBForCulling(final AbstractContraptionEntity receiver)
receiver.getBoundingBoxForCulling());
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.mojang.math.Matrix4f;
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderInfo;
import com.simibubi.create.content.contraptions.components.structureMovement.render.FlwContraption;
import com.simibubi.create.content.contraptions.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.Contraption;
import com.simibubi.create.content.contraptions.render.ContraptionRenderInfo;
import com.simibubi.create.content.contraptions.render.FlwContraption;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.AABB;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.mod.forge.mixin.compat.create.client;

import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollValueBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.scrollValue.ScrollValueBehaviour;
import net.minecraft.client.Minecraft;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -22,5 +22,4 @@ private Vec3 transformHitToShip(final Vec3 hitPos, final Vec3 blockPos) {
final Vec3 inShipHit = VSGameUtilsKt.toShipRenderCoordinates(Minecraft.getInstance().level, blockPos, hitPos);
return inShipHit.subtract(blockPos);
}

}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package org.valkyrienskies.mod.forge.mixin.compat.create.client;

import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBox;
import com.simibubi.create.foundation.blockEntity.behaviour.ValueBox;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.valkyrienskies.mod.common.VSClientGameUtils;

@Mixin(ValueBox.class)
public class MixinValueBox {

@Redirect(
method = "render",
at = @At(
Expand All @@ -21,5 +20,4 @@ public class MixinValueBox {
public void redirectTranslate(final PoseStack instance, final double x, final double y, final double z) {
VSClientGameUtils.transformRenderIfInShipyard(instance, x, y, z);
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.mod.forge.common

import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity
import com.simibubi.create.content.contraptions.AbstractContraptionEntity
import net.minecraft.core.BlockPos
import net.minecraft.world.entity.Entity
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate
Expand Down
2 changes: 1 addition & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ logoFile = "icon.png"
[[dependencies.valkyrienskies]]
modId = "forge"
mandatory = true
versionRange = "[40.1.69,)"
versionRange = "[40.2.4,)"
ordering = "NONE"
side = "BOTH"

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ maven_group=org.valkyrienskies.mod
architectury_version=4.10.86
fabric_loader_version=0.14.10
fabric_api_version=0.59.0+1.18.2
forge_version=1.18.2-40.1.69
forge_version=1.18.2-40.2.4
create_fabric_version=0.5.1-c-build.1092+mc1.18.2
flywheel_version_fabric=0.6.9-38
vs_core_version=1.1.0+00bb578f02
Expand Down

0 comments on commit f95be0e

Please sign in to comment.