-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
6 changed files
with
65 additions
and
202 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
29 changes: 29 additions & 0 deletions
29
odinclient/src/main/java/me/odinclient/mixin/mixins/MixinBlockChest.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,29 @@ | ||
package me.odinclient.mixin.mixins; | ||
|
||
import me.odinclient.features.impl.dungeon.SecretHitboxes; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockChest; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.util.BlockPos; | ||
import net.minecraft.world.IBlockAccess; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(BlockChest.class) | ||
public class MixinBlockChest extends Block { | ||
|
||
public MixinBlockChest(Material materialIn) { | ||
super(materialIn); | ||
} | ||
|
||
@Inject(method = "setBlockBoundsBasedOnState", at = @At("HEAD"), cancellable = true) | ||
private void onSetBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos, CallbackInfo ci) { | ||
if (SecretHitboxes.INSTANCE.getChests() && SecretHitboxes.INSTANCE.getEnabled()) { | ||
this.setBlockBounds(0, 0, 0, 1, 1, 1); | ||
ci.cancel(); | ||
} | ||
} | ||
|
||
} |
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
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