Skip to content

Commit

Permalink
remove furnace generate
Browse files Browse the repository at this point in the history
  • Loading branch information
Oganesson897 committed Dec 15, 2024
1 parent 720a593 commit 28372e7
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@ dependencies {
implementation rfg.deobf("curse.maven:athenaeum-284350:4633750")
implementation rfg.deobf("curse.maven:dropt-284973:5405050")

compileOnly rfg.deobf("curse.maven:yungs-better-mineshafts-forge-389665:3247154")

api("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.700")
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class SuSyLateMixinLoader implements ILateMixinLoader {

public static final List<String> modMixins = ImmutableList.of("bdsandm", "gregtech", "mcjtylib_ng", "xnet", "travelersbackpack");
public static final List<String> modMixins = ImmutableList.of("bdsandm", "gregtech", "mcjtylib_ng", "xnet", "travelersbackpack", "yungs");

@Override
public List<String> getMixinConfigs() {
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/supersymmetry/mixins/yungs/MixinSideRoom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package supersymmetry.mixins.yungs;

import com.yungnickyoung.minecraft.bettermineshafts.world.generator.pieces.MineshaftPiece;
import com.yungnickyoung.minecraft.bettermineshafts.world.generator.pieces.SideRoom;
import net.minecraft.block.BlockFurnace;
import net.minecraft.block.state.IBlockState;
import net.minecraft.world.World;
import net.minecraft.world.gen.structure.StructureBoundingBox;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(SideRoom.class)
public abstract class MixinSideRoom extends MineshaftPiece {

@Redirect(method = "addComponentParts", at = @At(value = "INVOKE", target = "Lcom/yungnickyoung/minecraft/bettermineshafts/world/generator/pieces/SideRoom;setBlockState(Lnet/minecraft/world/World;Lnet/minecraft/block/state/IBlockState;IIILnet/minecraft/world/gen/structure/StructureBoundingBox;)V"))
private void susycore$removeFurnace(SideRoom instance, World world, IBlockState iBlockState, int i1, int i2, int i3, StructureBoundingBox structureBoundingBox) {
if (iBlockState.getBlock() instanceof BlockFurnace) {
setBlockState(world, AIR, i1, i2, i3, structureBoundingBox);
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package supersymmetry.mixins.yungs;

import com.yungnickyoung.minecraft.bettermineshafts.world.generator.pieces.MineshaftPiece;
import com.yungnickyoung.minecraft.bettermineshafts.world.generator.pieces.ZombieVillagerRoom;
import net.minecraft.block.BlockFurnace;
import net.minecraft.block.state.IBlockState;
import net.minecraft.world.World;
import net.minecraft.world.gen.structure.StructureBoundingBox;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(ZombieVillagerRoom.class)
public abstract class MixinZombieVillagerRoom extends MineshaftPiece {

@Redirect(method = "addComponentParts", at = @At(value = "INVOKE", target = "Lcom/yungnickyoung/minecraft/bettermineshafts/world/generator/pieces/ZombieVillagerRoom;setBlockState(Lnet/minecraft/world/World;Lnet/minecraft/block/state/IBlockState;IIILnet/minecraft/world/gen/structure/StructureBoundingBox;)V"))
private void susycore$removeFurnace(ZombieVillagerRoom instance, World world, IBlockState iBlockState, int i1, int i2, int i3, StructureBoundingBox structureBoundingBox) {
if (iBlockState.getBlock() instanceof BlockFurnace) {
setBlockState(world, AIR, i1, i2, i3, structureBoundingBox);
}
}

}
11 changes: 11 additions & 0 deletions src/main/resources/mixins.susy.yungs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"package" : "supersymmetry.mixins.yungs",
"refmap" : "mixins.susy.refmap.json",
"target" : "@env(DEFAULT)",
"minVersion" : "0.8",
"compatibilityLevel" : "JAVA_8",
"mixins" : [
"MixinSideRoom",
"MixinZombieVillagerRoom"
]
}

0 comments on commit 28372e7

Please sign in to comment.