-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Every Crashes & Java Checker Fixed
- Loading branch information
Showing
9 changed files
with
227 additions
and
186 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
335 changes: 174 additions & 161 deletions
335
src/main/java/net/aspw/client/features/module/impl/visual/Interface.kt
Large diffs are not rendered by default.
Oops, something went wrong.
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
34 changes: 34 additions & 0 deletions
34
src/main/java/net/aspw/client/injection/forge/mixins/tweaks/MixinRegionRenderCache.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,34 @@ | ||
package net.aspw.client.injection.forge.mixins.tweaks; | ||
|
||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.client.renderer.RegionRenderCache; | ||
import net.minecraft.util.BlockPos; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
@Mixin(RegionRenderCache.class) | ||
public class MixinRegionRenderCache { | ||
@Shadow | ||
@Final | ||
private static IBlockState DEFAULT_STATE; | ||
|
||
@Shadow | ||
private IBlockState[] blockStates; | ||
|
||
@Inject( | ||
method = "getBlockState", | ||
at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/RegionRenderCache;blockStates:[Lnet/minecraft/block/state/IBlockState;", ordinal = 0, shift = At.Shift.AFTER), | ||
locals = LocalCapture.CAPTURE_FAILSOFT, | ||
cancellable = true | ||
) | ||
private void connectedTexturesBoundsCheck(BlockPos pos, CallbackInfoReturnable<IBlockState> cir, int positionIndex) { | ||
if (positionIndex < 0 || positionIndex >= this.blockStates.length) { | ||
cir.setReturnValue(DEFAULT_STATE); | ||
} | ||
} | ||
} |
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