Skip to content

Commit

Permalink
SpotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
DrParadox7 committed Nov 23, 2024
1 parent b95f68a commit 95781d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ public class FixesConfig {
@Config.DefaultBoolean(true)
public static boolean disableMassiveSacredTreeGeneration;


// Morpheus

@Config.Comment("Fix not properly waking players if not everyone is sleeping")
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ public enum Mixins {
// Minefactory Reloaded
DISARM_SACRED_TREE(new Builder("Prevents Sacred Rubber Tree Generation")
.addMixinClasses("minefactoryreloaded..MixinBlockRubberSapling").setPhase(Phase.LATE).setSide(Side.BOTH)
.addTargetedMod(TargetedMod.MINEFACTORY_RELOADED).setApplyIf(() -> FixesConfig.disableMassiveSacredTreeGeneration)),
.addTargetedMod(TargetedMod.MINEFACTORY_RELOADED)
.setApplyIf(() -> FixesConfig.disableMassiveSacredTreeGeneration)),

// Immersive engineering
JAVA12_IMMERSIVE_ENGINERRING(new Builder("Immersive Engineering Java-12 safe potion array resizing")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
package com.mitchej123.hodgepodge.mixins.late.minefactoryreloaded;

import java.util.Random;

import net.minecraft.world.World;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import powercrystals.minefactoryreloaded.block.BlockRubberSapling;
import powercrystals.minefactoryreloaded.world.MineFactoryReloadedWorldGen;
import powercrystals.minefactoryreloaded.world.WorldGenMassiveTree;

import java.util.Random;

@Mixin(BlockRubberSapling.class)
public class MixinBlockRubberSapling {

/**
* @author DrParadox7
* @reason Swap Massive world-breaking tree to Mega, a still reasonably large but safe tree, should it still be obtained by chance.
* @reason Swap Massive world-breaking tree to Mega, a still reasonably large but safe tree, should it still be
* obtained by chance.
*/
@Redirect(
method = "func_149878_d",
at = @At(value = "INVOKE", target = "Lpowercrystals/minefactoryreloaded/world/WorldGenMassiveTree;generate(Lnet/minecraft/world/World;Ljava/util/Random;III)Z"))
private boolean hodgepodge$generateMassiveRubberTree(WorldGenMassiveTree instance, World world, Random random, int x, int y, int z) {
at = @At(
value = "INVOKE",
target = "Lpowercrystals/minefactoryreloaded/world/WorldGenMassiveTree;generate(Lnet/minecraft/world/World;Ljava/util/Random;III)Z"))
private boolean hodgepodge$generateMassiveRubberTree(WorldGenMassiveTree instance, World world, Random random,
int x, int y, int z) {
return MineFactoryReloadedWorldGen.generateMegaRubberTree(world, random, x, y, z, true);
}
}

0 comments on commit 95781d9

Please sign in to comment.