generated from babric/babric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 4
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
e51b941
commit 538226e
Showing
15 changed files
with
102 additions
and
106 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
2 changes: 1 addition & 1 deletion
2
.../io/github/betterthanupdates/shockahpi/client/gui/screen/ShockAhPIAchievementsScreen.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
4 changes: 1 addition & 3 deletions
4
...main/java/io/github/betterthanupdates/shockahpi/mixin/client/AchievementsScreenMixin.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
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
18 changes: 10 additions & 8 deletions
18
...ub/betterthanupdates/shockahpi/mixin/client/MultiplayerClientInteractionManagerMixin.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,23 +1,25 @@ | ||
package io.github.betterthanupdates.shockahpi.mixin.client; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyReturnValue; | ||
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.CallbackInfoReturnable; | ||
import shockahpi.SAPI; | ||
|
||
import net.minecraft.client.ClientInteractionManager; | ||
import net.minecraft.MultiplayerInteractionManager; | ||
import net.minecraft.client.InteractionManager; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.MultiplayerClientInteractionManager; | ||
|
||
@Mixin(MultiplayerClientInteractionManager.class) | ||
public class MultiplayerClientInteractionManagerMixin extends ClientInteractionManager { | ||
@Mixin(MultiplayerInteractionManager.class) | ||
public class MultiplayerClientInteractionManagerMixin extends InteractionManager { | ||
public MultiplayerClientInteractionManagerMixin(Minecraft minecraft) { | ||
super(minecraft); | ||
} | ||
|
||
@Inject(method = "getBlockReachDistance", at = @At("RETURN"), cancellable = true) | ||
public void shockahpi$getBlockReachDistance(CallbackInfoReturnable<Float> cir) { | ||
if (cir.getReturnValue() == 4.0F) cir.setReturnValue(SAPI.reachGet()); | ||
@ModifyReturnValue(method = "method_1715", at = @At("RETURN")) | ||
public float shockahpi$getBlockReachDistance(float reach) { | ||
if (reach == 4.0F) return SAPI.reachGet(); | ||
|
||
return reach; | ||
} | ||
} |
7 changes: 2 additions & 5 deletions
7
apron/src/main/java/io/github/betterthanupdates/shockahpi/mixin/client/PortalBlockMixin.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
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
Oops, something went wrong.