-
Notifications
You must be signed in to change notification settings - Fork 288
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
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/org/violetmoon/quark/mixin/mixins/NetherFortressPiecesMixin.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.violetmoon.quark.mixin.mixins; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import net.minecraft.world.level.WorldGenLevel; | ||
import net.minecraft.world.level.block.FenceBlock; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.level.levelgen.structure.BoundingBox; | ||
import net.minecraft.world.level.levelgen.structure.structures.NetherFortressPieces; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(NetherFortressPieces.class) | ||
public class NetherFortressPiecesMixin { | ||
@Mixin(NetherFortressPieces.CastleEntrance.class) | ||
public static class CastleEntranceMixin { | ||
@WrapOperation(method = "postProcess", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces$CastleEntrance;generateBox(Lnet/minecraft/world/level/WorldGenLevel;Lnet/minecraft/world/level/levelgen/structure/BoundingBox;IIIIIILnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/state/BlockState;Z)V", ordinal = 11)) | ||
private void quark$fixFenceConnectionInPostProcess(NetherFortressPieces.CastleEntrance instance, WorldGenLevel pLevel, BoundingBox pBox, int pXMin, int pYMin, int pZMin, int pXMax, int pYMax, int pZMax, BlockState pBoundaryBlockState, BlockState pInsideBlockState, boolean pExistingOnly, Operation<Void> original) { | ||
instance.generateBox(pLevel, pBox, pXMin, pYMin, pZMin, pXMax, pYMax, pZMax, pBoundaryBlockState.setValue(FenceBlock.WEST, Boolean.TRUE).setValue(FenceBlock.EAST, Boolean.TRUE), pInsideBlockState, pExistingOnly); | ||
} | ||
} | ||
} |
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