Skip to content

Commit

Permalink
fix: Update contraption bugfix for Create 6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rover656 committed Mar 3, 2025
1 parent e788845 commit 7f59d2a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ void exclusiveRepo(RepositoryHandler handler, String url, Consumer<InclusiveRepo
}

repositories { RepositoryHandler handler ->
exclusiveRepo(handler, 'https://maven.tterrag.com/', 'com.tterrag.registrate', 'com.jozufozu.flywheel')
exclusiveRepo(handler, 'https://maven.tterrag.com/', 'com.tterrag.registrate')
exclusiveRepo(handler, 'https://maven.createmod.net/', 'com.simibubi.create', 'dev.engine-room.flywheel')
exclusiveRepo(handler, "https://modmaven.dev/", "mezz.jei", "mcjty.theoneprobe", "appeng", "mekanism")
exclusiveRepo(handler, 'https://cursemaven.com', 'curse.maven')
exclusiveRepo(handler, 'https://maven.blamejared.com', 'vazkii.patchouli', 'net.darkhax.bookshelf', 'net.darkhax.enchdesc', 'com.almostreliable.mods')
Expand Down Expand Up @@ -281,8 +282,9 @@ dependencies {
//fluxnetworks
localRuntime fg.deobf("curse.maven:fluxnetworks-248020:4651164")

//Flywheel
compileOnly fg.deobf("com.jozufozu.flywheel:flywheel-forge-1.20.1:0.6.9-5") // REMOVE When crash is fixed
// Create/Flywheel -- REMOVE When crash is fixed
compileOnly fg.deobf("com.simibubi.create:create-${minecraft_version}:6.0.1-20:slim") { transitive = false }
compileOnly fg.deobf("dev.engine-room.flywheel:flywheel-forge-api-${minecraft_version}:1.0.1")

// Almost Unified
compileOnly fg.deobf("com.almostreliable.mods:almostunified-forge:${minecraft_version}-${almostunified_version}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.enderio.core.common.compat;

import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.simibubi.create.foundation.virtualWorld.VirtualRenderWorld;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.entity.BlockEntity;
import org.jetbrains.annotations.Nullable;

public class FlywheelCompat {
public class CreateCompat {

@Nullable
public static BlockEntity getExistingBlockEntity(BlockGetter level, BlockPos pos) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.enderio.machines.common.block;

import com.enderio.base.common.tag.EIOTags;
import com.enderio.core.common.compat.FlywheelCompat;
import com.enderio.core.common.compat.CreateCompat;
import com.enderio.machines.common.blockentity.base.MachineBlockEntity;
import com.tterrag.registrate.util.entry.BlockEntityEntry;
import net.minecraft.core.BlockPos;
Expand Down Expand Up @@ -146,8 +146,8 @@ public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) {
// Credit: https://github.com/XFactHD/FramedBlocks/blob/1.20/src/main/java/xfacthd/framedblocks/common/util/InternalApiImpl.java#L13-L20
if (ModList.get().isLoaded("starlight")) {
existingBlockEntity = level.getBlockEntity(pos);
} else if (ModList.get().isLoaded("flywheel")) {
existingBlockEntity = FlywheelCompat.getExistingBlockEntity(level, pos);
} else if (ModList.get().isLoaded("create")) {
existingBlockEntity = CreateCompat.getExistingBlockEntity(level, pos);
} else {
existingBlockEntity = level.getExistingBlockEntity(pos);
}
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ modId="kubejs_enderio"
mandatory=false
versionRange="[1.20.1-0.6.0,)"
side="BOTH"

# Flywheel breaking changes
[[dependencies.enderio]]
modId="create"
mandatory=false
versionRange="[6.0.0,)"
side="BOTH"

0 comments on commit 7f59d2a

Please sign in to comment.