Skip to content

Commit

Permalink
Merge pull request #603 from ValkyrienSkies/1.18.x/feature/create-0.5.1
Browse files Browse the repository at this point in the history
Updated create to 0.5.1
  • Loading branch information
StewStrong authored Oct 16, 2023
2 parents 2139deb + ba64881 commit 71c5986
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 40 deletions.
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
//We just use a version from a platform and hope the classes exist on both versions and mixins apply correctly
modCompileOnly("com.simibubi.create:create-fabric-${minecraft_version}:${create_fabric_version}")
{ exclude group: 'com.github.AlphaMode', module: 'fakeconfigtoml' }
modCompileOnly("com.jozufozu.flywheel:flywheel-fabric-${minecraft_version}:0.6.8-33")
modCompileOnly("com.jozufozu.flywheel:flywheel-fabric-${minecraft_version}:${flywheel_version_fabric}")
modCompileOnly("io.github.fabricators_of_create:Porting-Lib:${port_lib_version}+${minecraft_version}")
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.mod.mixin.mod_compat.create_big_cannons;

import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
import com.simibubi.create.content.contraptions.OrientedContraptionEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
Expand All @@ -18,7 +18,6 @@
import org.valkyrienskies.mod.common.VSGameUtilsKt;
import org.valkyrienskies.mod.common.util.VectorConversionsMCKt;


@Pseudo
@Mixin(targets = "rbasamoyai.createbigcannons.cannon_control.contraption.PitchOrientedContraptionEntity")
public abstract class MixinPitchOrientedContraptionEntity extends OrientedContraptionEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import net.minecraft.world.entity.Entity
object CreateCompat {

private val contraptionClass = runCatching {
Class.forName("com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity")
Class.forName("com.simibubi.create.content.contraptions.AbstractContraptionEntity")
}.getOrNull()

@JvmStatic
Expand Down
6 changes: 4 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ dependencies {
modImplementation("curse.maven:cc-restitched-462672:3838648")

// Create compat
modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_version}+${minecraft_version}") { transitive = false }
modImplementation("com.jozufozu.flywheel:flywheel-fabric-${minecraft_version}:${flywheel_version}")
modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_fabric_version}") {
exclude group: 'com.github.AlphaMode', module: 'fakeconfigtoml'
}
modImplementation("com.jozufozu.flywheel:flywheel-fabric-${minecraft_version}:${flywheel_version_fabric}")
modImplementation("com.tterrag.registrate_fabric:Registrate:${registrate_version}")
modImplementation("io.github.fabricators_of_create:Porting-Lib:${port_lib_version}+${minecraft_version}")
modImplementation("me.alphamode:ForgeTags:${forge_tags_version}")
Expand Down
3 changes: 1 addition & 2 deletions fabric/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
loader_platform=Fabric
create_version=0.5.0g-821
create_version=0.5.1-c-build.1092+mc1.18.2
# https://github.com/Fabricators-of-Create/Create/blob/mc1.18/fabric/dev/gradle.properties
config_api_id=3671141
forge_config_api_port_version=3.2.4
fake_player_api_version=0.3.0
# https://maven.tterrag.com/com/jozufozu/flywheel/Flywheel-Fabric
flywheel_version=0.6.8-33
reach_entity_attributes_version=2.1.1
registrate_version=MC1.18.2-1.1.6
forge_tags_version=2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.mod.fabric.mixin.compat.create;

import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.AbstractContraptionEntity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -42,7 +42,7 @@ public void setWingGroupId(final int wingGroupId) {
private void postTick(final CallbackInfo ci) {
final AbstractContraptionEntity thisAsAbstractContraptionEntity = AbstractContraptionEntity.class.cast(this);
final Level level = thisAsAbstractContraptionEntity.level;
if (wingGroupId != -1 && level instanceof ServerLevel serverLevel) {
if (wingGroupId != -1 && level instanceof final ServerLevel serverLevel) {
final LoadedServerShip ship = VSGameUtilsKt.getShipObjectManagingPos(serverLevel,
VectorConversionsMCKt.toJOML(thisAsAbstractContraptionEntity.position()));
if (ship != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.mod.fabric.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
4 changes: 2 additions & 2 deletions forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ loader_platform=Forge
loom.platform=forge
kotlin.stdlib.default.dependency=false
#Compat
create_version=0.5.0.g-233
flywheel_version=0.6.8-98
create_version=0.5.1.e-318
flywheel_version=0.6.10-105
registrate_version=MC1.18.2-1.1.3
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.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.AbstractContraptionEntity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -40,7 +40,7 @@ public void setWingGroupId(final int wingGroupId) {
private void postTick(final CallbackInfo ci) {
final AbstractContraptionEntity thisAsAbstractContraptionEntity = AbstractContraptionEntity.class.cast(this);
final Level level = thisAsAbstractContraptionEntity.level;
if (wingGroupId != -1 && level instanceof ServerLevel serverLevel) {
if (wingGroupId != -1 && level instanceof final ServerLevel serverLevel) {
final LoadedServerShip ship = VSGameUtilsKt.getShipObjectManagingPos(serverLevel,
VectorConversionsMCKt.toJOML(thisAsAbstractContraptionEntity.position()));
ship.getAttachment(WingManager.class).setWingGroupTransform(wingGroupId, computeContraptionWingTransform());
Expand Down
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
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ 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
create_fabric_version=0.5.0.i-934+1.18.2
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
# Prevent kotlin from autoincluding stdlib as a dependency, which breaks
# gradle's composite builds (includeBuild) for some reason. We'll add it manually
Expand Down

0 comments on commit 71c5986

Please sign in to comment.