-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b95f68a
commit 95781d9
Showing
3 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 11 additions & 5 deletions
16
...va/com/mitchej123/hodgepodge/mixins/late/minefactoryreloaded/MixinBlockRubberSapling.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |