-
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: wrappers for methods with coordinates from BlockFalling, BlockFa…
…rmland, BlockFire, BlockFlowerPot, BlockFurnace, BlockHopper, BlockJukebox, BlockLeaves, BlockLever, BlockMushroom, BlockPane, BlockPistonBase, BlockPistonMoving, BlockPortal, BlockRailBase and BlockRailDetector to BlockPos;
- Loading branch information
Showing
14 changed files
with
553 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockFalling.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,13 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.BlockFalling; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockFalling.class) | ||
public interface AccessorBlockFalling { | ||
@Invoker("func_149830_m") | ||
void tryFall(@NotNull World world, int x, int y, int z); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockFarmland.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.BlockFarmland; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockFarmland.class) | ||
public interface AccessorBlockFarmland { | ||
@Invoker("func_149822_e") | ||
boolean isEmpty(@NotNull World world, int x, int y, int z); | ||
|
||
@Invoker("func_149821_m") | ||
boolean isMoistened(@NotNull World world, int x, int y, int z); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockFire.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.block.BlockFire; | ||
import net.minecraft.world.World; | ||
import net.minecraftforge.common.util.ForgeDirection; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
import java.util.Random; | ||
|
||
@Mixin(BlockFire.class) | ||
public interface AccessorBlockFire { | ||
@Invoker("tryCatchFire") | ||
void tryCatchFire(@NotNull World world, int x, int y, int z, int chance, @NotNull Random rand, int meta); | ||
|
||
@Invoker("tryCatchFire") | ||
void tryCatchFire(@NotNull World world, int x, int y, int z, int chance, @NotNull Random rand, int meta, | ||
@NotNull ForgeDirection side); | ||
|
||
@Invoker("canNeighborBurn") | ||
boolean canNeighborBurn(@NotNull World world, int x, int y, int z); | ||
|
||
@Invoker("getChanceOfNeighborsEncouragingFire") | ||
int getChanceOfNeighborsEncouragingFire(@NotNull World world, int x, int y, int z); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockFlowerPot.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.BlockFlowerPot; | ||
import net.minecraft.tileentity.TileEntityFlowerPot; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockFlowerPot.class) | ||
public interface AccessorBlockFlowerPot { | ||
@Invoker("func_149929_e") | ||
@Nullable | ||
TileEntityFlowerPot getFlowerPotTileEntity(@NotNull World world, int x, int y, int z); | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockFurnace.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,13 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.BlockFurnace; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockFurnace.class) | ||
public interface AccessorBlockFurnace { | ||
@Invoker("func_149930_e") | ||
void rotateFaceToFreeSide(@NotNull World world, int x, int y, int z); | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockHopper.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,13 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.BlockHopper; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockHopper.class) | ||
public interface AccessorBlockHopper { | ||
@Invoker("func_149919_e") | ||
void updateHopperBlockState(@NotNull World world, int x, int y, int z); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockLeaves.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.BlockLeaves; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockLeaves.class) | ||
public interface AccessorBlockLeaves { | ||
@Invoker("removeLeaves") | ||
void removeLeaves(@NotNull World world, int x, int y, int z); | ||
|
||
@Invoker("func_150124_c") | ||
void dropExtra(@NotNull World world, int x, int y, int z, int meta, int chance); | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockLever.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,13 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.BlockLever; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockLever.class) | ||
public interface AccessorBlockLever { | ||
@Invoker("func_149820_e") | ||
boolean checkAndDropBlock(@NotNull World world, int x, int y, int z); | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockPistonBase.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,31 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockPistonBase; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockPistonBase.class) | ||
public interface AccessorBlockPistonBase { | ||
@Invoker("updatePistonState") | ||
void updatePistonState(@NotNull World world, int x, int y, int z); | ||
|
||
@Invoker("isIndirectlyPowered") | ||
boolean isIndirectlyPowered(@NotNull World world, int x, int y, int z, int orientation); | ||
|
||
@Invoker("canPushBlock") | ||
static boolean canPushBlock(@NotNull Block blockToPush, @NotNull World world, int x, int y, int z, | ||
boolean moveFlag) { | ||
throw new AssertionError(); | ||
} | ||
|
||
@Invoker("canExtend") | ||
static boolean canExtend(@NotNull World world, int x, int y, int z, int orientation) { | ||
throw new AssertionError(); | ||
} | ||
|
||
@Invoker("tryExtend") | ||
boolean tryExtend(@NotNull World world, int x, int y, int z, int orientation); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockPistonMoving.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.BlockPistonMoving; | ||
import net.minecraft.tileentity.TileEntityPiston; | ||
import net.minecraft.world.IBlockAccess; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockPistonMoving.class) | ||
public interface AccessorBlockPistonMoving { | ||
@Invoker("func_149963_e") | ||
@Nullable | ||
TileEntityPiston getPistonMovingTileEntity(@NotNull IBlockAccess world, int x, int y, int z); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockRailBase.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 io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockRailBase; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockRailBase.class) | ||
public interface AccessorBlockRailBase { | ||
@Invoker("func_150048_a") | ||
void onRailNeighborBlockChange(@NotNull World p_150048_1_, int x, int y, int z, int meta, int baseMeta, | ||
@NotNull Block block); | ||
|
||
@Invoker("func_150052_a") | ||
void updateRailBaseBlockState(@NotNull World world, int x, int y, int z, boolean forceUpdate); | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/github/mjaroslav/mjutils/asm/mixin/accessors/AccessorBlockRailDetector.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,13 @@ | ||
package io.github.mjaroslav.mjutils.asm.mixin.accessors; | ||
|
||
import net.minecraft.block.BlockRailDetector; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(BlockRailDetector.class) | ||
public interface AccessorBlockRailDetector { | ||
@Invoker("func_150054_a") | ||
void updateRailDetectorBlockState(@NotNull World world, int x, int y, int z, int meta); | ||
} |
Oops, something went wrong.