-
Notifications
You must be signed in to change notification settings - Fork 12
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
8 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
client/src/main/java/com/fox2code/foxloader/client/mixins/MixinEntityWyvern.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,17 @@ | ||
package com.fox2code.foxloader.client.mixins; | ||
|
||
import net.minecraft.src.game.entity.monster.EntityWyvern; | ||
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; | ||
|
||
@Mixin(EntityWyvern.class) | ||
public class MixinEntityWyvern { | ||
@Inject(method = "isCourseTraversable", at = @At("HEAD"), cancellable = true) | ||
public void hotfix_isCourseTraversable(double x, double y, double z, double xyzsqrt, CallbackInfoReturnable<Boolean> cir) { | ||
if (xyzsqrt > Short.MAX_VALUE) { | ||
cir.setReturnValue(Boolean.FALSE); | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
client/src/main/java/com/fox2code/foxloader/client/mixins/MixinGuiEditSign.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,16 @@ | ||
package com.fox2code.foxloader.client.mixins; | ||
|
||
import net.minecraft.src.client.gui.GuiEditSign; | ||
import net.minecraft.src.game.level.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiEditSign.class) | ||
public class MixinGuiEditSign { | ||
@Redirect(method = "onGuiClosed", at = @At(value = "FIELD", | ||
target = "Lnet/minecraft/src/game/level/World;multiplayerWorld:Z")) | ||
public boolean hotfix_multiplayerWorld(World instance) { | ||
return instance != null && instance.multiplayerWorld; | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
server/src/main/java/com/fox2code/foxloader/server/mixins/MixinEntityWyvern.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,18 @@ | ||
package com.fox2code.foxloader.server.mixins; | ||
|
||
|
||
import net.minecraft.src.game.entity.monster.EntityWyvern; | ||
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; | ||
|
||
@Mixin(EntityWyvern.class) | ||
public class MixinEntityWyvern { | ||
@Inject(method = "isCourseTraversable", at = @At("HEAD"), cancellable = true) | ||
public void hotfix_isCourseTraversable(double x, double y, double z, double xyzsqrt, CallbackInfoReturnable<Boolean> cir) { | ||
if (xyzsqrt > Short.MAX_VALUE) { | ||
cir.setReturnValue(Boolean.FALSE); | ||
} | ||
} | ||
} |
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