-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: full EntityPos variants of methods with coordinates from vanilla…
… Entities and IProjectile;
- Loading branch information
Showing
16 changed files
with
1,003 additions
and
1 deletion.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntity.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 io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.entity.Entity; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(Entity.class) | ||
public interface AccessorEntity { | ||
@Invoker("func_145780_a") | ||
void playStepSound(int x, int y, int z, @NotNull Block block); | ||
|
||
@Invoker("func_145771_j") | ||
boolean tryCorrectMotionOnBlockCollision(double x, double y, double z); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityArrow.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.projectile.EntityArrow; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityArrow.class) | ||
public interface AccessorEntityArrow { | ||
@Accessor("field_145791_d") | ||
int getTileX(); | ||
|
||
@Accessor("field_145792_e") | ||
int getTileY(); | ||
|
||
@Accessor("field_145789_f") | ||
int getTileZ(); | ||
|
||
@Accessor("field_145791_d") | ||
void setTileX(int tileX); | ||
|
||
@Accessor("field_145792_e") | ||
void setTileY(int tileY); | ||
|
||
@Accessor("field_145789_f") | ||
void setTileZ(int tileZ); | ||
} |
52 changes: 52 additions & 0 deletions
52
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityBoat.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,52 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.entity.item.EntityBoat; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityBoat.class) | ||
public interface AccessorEntityBoat { | ||
@Accessor | ||
double getBoatX(); | ||
|
||
@Accessor | ||
double getBoatY(); | ||
|
||
@Accessor | ||
double getBoatZ(); | ||
|
||
@Accessor | ||
void setBoatX(double boatX); | ||
|
||
@Accessor | ||
void setBoatY(double boatY); | ||
|
||
@Accessor | ||
void setBoatZ(double boatZ); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
double getVelocityX(); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
double getVelocityY(); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
double getVelocityZ(); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
void setVelocityX(double velocityX); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
void setVelocityY(double velocityY); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
void setVelocityZ(double velocityZ); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityEnderEye.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.item.EntityEnderEye; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityEnderEye.class) | ||
public interface AccessorEntityEnderEye { | ||
@Accessor | ||
double getTargetX(); | ||
|
||
@Accessor | ||
double getTargetY(); | ||
|
||
@Accessor | ||
double getTargetZ(); | ||
|
||
@Accessor | ||
void setTargetX(double targetX); | ||
|
||
@Accessor | ||
void setTargetY(double targetY); | ||
|
||
@Accessor | ||
void setTargetZ(double targetZ); | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityEnderman.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,11 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.monster.EntityEnderman; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(EntityEnderman.class) | ||
public interface AccessorEntityEnderman { | ||
@Invoker | ||
boolean callTeleportTo(double x, double y, double z); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityFireball.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.projectile.EntityFireball; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityFireball.class) | ||
public interface AccessorEntityFireball { | ||
@Accessor("field_145795_e") | ||
int getTileX(); | ||
|
||
@Accessor("field_145793_f") | ||
int getTileY(); | ||
|
||
@Accessor("field_145794_g") | ||
int getTileZ(); | ||
|
||
@Accessor("field_145795_e") | ||
void setTileX(int tileX); | ||
|
||
@Accessor("field_145793_f") | ||
void setTileY(int tileY); | ||
|
||
@Accessor("field_145794_g") | ||
void setTileZ(int tileZ); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityFishHook.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.projectile.EntityFishHook; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityFishHook.class) | ||
public interface AccessorEntityFishHook { | ||
@Accessor("field_146037_g") | ||
int getTileX(); | ||
|
||
@Accessor("field_146048_h") | ||
int getTileY(); | ||
|
||
@Accessor("field_146050_i") | ||
int getTileZ(); | ||
|
||
@Accessor("field_146037_g") | ||
void setTileX(int tileX); | ||
|
||
@Accessor("field_146048_h") | ||
void setTileY(int tileY); | ||
|
||
@Accessor("field_146050_i") | ||
void setTileZ(int tileZ); | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityGhast.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,11 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.monster.EntityGhast; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(EntityGhast.class) | ||
public interface AccessorEntityGhast { | ||
@Invoker | ||
boolean callIsCourseTraversable(double x, double y, double z, double distance); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityLivingBase.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.EntityLivingBase; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityLivingBase.class) | ||
public interface AccessorEntityLivingBase { | ||
@Accessor | ||
double getNewPosX(); | ||
|
||
@Accessor | ||
double getNewPosY(); | ||
|
||
@Accessor | ||
double getNewPosZ(); | ||
|
||
@Accessor | ||
void setNewPosX(double newPosX); | ||
|
||
@Accessor | ||
void setNewPosY(double newPosY); | ||
|
||
@Accessor | ||
void setNewPosZ(double newPosZ); | ||
} |
59 changes: 59 additions & 0 deletions
59
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityMinecart.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,59 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.entity.item.EntityMinecart; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(EntityMinecart.class) | ||
public interface AccessorEntityMinecart { | ||
@Accessor | ||
double getMinecartX(); | ||
|
||
@Accessor | ||
double getMinecartY(); | ||
|
||
@Accessor | ||
double getMinecartZ(); | ||
|
||
@Accessor | ||
void setMinecartX(double minecartX); | ||
|
||
@Accessor | ||
void setMinecartY(double minecartY); | ||
|
||
@Accessor | ||
void setMinecartZ(double minecartZ); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
double getVelocityX(); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
double getVelocityY(); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
double getVelocityZ(); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
void setVelocityX(double velocityX); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
void setVelocityY(double velocityY); | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Accessor | ||
void setVelocityZ(double velocityZ); | ||
|
||
@Invoker("func_145821_a") | ||
void updateMovementOnRail(int x, int y, int z, double speed, double slopeAdjustment, @NotNull Block rail, | ||
int railMeta); | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityPlayer.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 io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.util.ChunkCoordinates; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(EntityPlayer.class) | ||
public interface AccessorEntityPlayer { | ||
@Invoker | ||
void callAddMountedMovementStat(double deltaX, double deltaY, double deltaZ); | ||
|
||
@Accessor | ||
@NotNull | ||
ChunkCoordinates getPlayerLocation(); | ||
|
||
@Accessor | ||
void setPlayerLocation(@NotNull ChunkCoordinates playerLocation); | ||
|
||
@Accessor | ||
@Nullable | ||
ChunkCoordinates getStartMinecartRidingCoordinate(); | ||
|
||
@Accessor | ||
void setStartMinecartRidingCoordinate(@Nullable ChunkCoordinates startMinecartRidingCoordinate); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntitySquid.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.passive.EntitySquid; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntitySquid.class) | ||
public interface AccessorEntitySquid { | ||
@Accessor | ||
float getRandomMotionVecX(); | ||
|
||
@Accessor | ||
float getRandomMotionVecY(); | ||
|
||
@Accessor | ||
float getRandomMotionVecZ(); | ||
|
||
@Accessor | ||
void setRandomMotionVecX(float randomMotionVecX); | ||
|
||
@Accessor | ||
void setRandomMotionVecY(float randomMotionVecY); | ||
|
||
@Accessor | ||
void setRandomMotionVecZ(float randomMotionVecZ); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityThrowable.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,26 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.projectile.EntityThrowable; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityThrowable.class) | ||
public interface AccessorEntityThrowable { | ||
@Accessor("field_145788_c") | ||
int getTileX(); | ||
|
||
@Accessor("field_145786_d") | ||
int getTileY(); | ||
|
||
@Accessor("field_145787_e") | ||
int getTileZ(); | ||
|
||
@Accessor("field_145788_c") | ||
void setTileX(int tileX); | ||
|
||
@Accessor("field_145786_d") | ||
void setTileY(int tileY); | ||
|
||
@Accessor("field_145787_e") | ||
void setTileZ(int tileZ); | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorEntityWither.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,11 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.entity.boss.EntityWither; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(EntityWither.class) | ||
public interface AccessorEntityWither { | ||
@Invoker("func_82209_a") | ||
void throwSkull(int head, double x, double y, double z, boolean invulnerable); | ||
} |
Oops, something went wrong.