Migrate Carpet Mixin names to mojang mappings
This commit is contained in:
1 parent
2c3871b90e
commit
a547677597
154 files changed
+422
-501
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.helpers.BlockRotator;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(UseOnContext.class)
|
||||
public class UseOnContext_cactusMixin
|
||||
{
|
||||
@Redirect(method = "getHorizontalDirection", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/entity/player/Player;getDirection()Lnet/minecraft/core/Direction;"
|
||||
))
|
||||
private Direction getPlayerFacing(Player playerEntity)
|
||||
{
|
||||
Direction dir = playerEntity.getDirection();
|
||||
if (BlockRotator.flippinEligibility(playerEntity))
|
||||
{
|
||||
dir = dir.getOpposite();
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user