File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
java/uk/protonull/civvoxelmap/mixins/elevation Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ package uk .protonull .civvoxelmap .mixins .elevation ;
2
+
3
+ import com .mamiyaotaru .voxelmap .Radar ;
4
+ import com .mamiyaotaru .voxelmap .util .GameVariableAccessShim ;
5
+ import net .minecraft .world .phys .Vec3 ;
6
+ import org .jetbrains .annotations .NotNull ;
7
+ import org .spongepowered .asm .mixin .Mixin ;
8
+ import org .spongepowered .asm .mixin .injection .At ;
9
+ import org .spongepowered .asm .mixin .injection .Redirect ;
10
+
11
+ @ Mixin (Radar .class )
12
+ public abstract class RadarPreventElevationFilteringMixin {
13
+ @ Redirect (
14
+ method = "calculateMobs" ,
15
+ at = @ At (
16
+ value = "INVOKE" ,
17
+ target = "Lnet/minecraft/world/phys/Vec3;y()D"
18
+ )
19
+ )
20
+ protected double civvoxelmap$useSameElevationAsPlayer (
21
+ final @ NotNull Vec3 instance
22
+ ) {
23
+ return GameVariableAccessShim .yCoord ();
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ package uk .protonull .civvoxelmap .mixins .elevation ;
2
+
3
+ import com .mamiyaotaru .voxelmap .RadarSimple ;
4
+ import com .mamiyaotaru .voxelmap .util .GameVariableAccessShim ;
5
+ import net .minecraft .world .phys .Vec3 ;
6
+ import org .jetbrains .annotations .NotNull ;
7
+ import org .spongepowered .asm .mixin .Mixin ;
8
+ import org .spongepowered .asm .mixin .injection .At ;
9
+ import org .spongepowered .asm .mixin .injection .Redirect ;
10
+
11
+ @ Mixin (RadarSimple .class )
12
+ public abstract class RadarSimplePreventElevationFilteringMixin {
13
+ @ Redirect (
14
+ method = "calculateMobs" ,
15
+ at = @ At (
16
+ value = "INVOKE" ,
17
+ target = "Lnet/minecraft/world/phys/Vec3;y()D"
18
+ )
19
+ )
20
+ protected double civvoxelmap$useSameElevationAsPlayer (
21
+ final @ NotNull Vec3 instance
22
+ ) {
23
+ return GameVariableAccessShim .yCoord ();
24
+ }
25
+ }
Original file line number Diff line number Diff line change 12
12
" commands.DisableVoxelMapCommands" ,
13
13
" commands.ReplaceVoxelMapCommands" ,
14
14
" elevation.ObscureElevationMixin" ,
15
+ " elevation.RadarPreventElevationFilteringMixin" ,
16
+ " elevation.RadarSimplePreventElevationFilteringMixin" ,
15
17
" radar.RadarMixin" ,
16
18
" radar.RadarSimpleMixin" ,
17
19
" settings.GuiMinimapOptionsMixin" ,
You can’t perform that action at this time.
0 commit comments