Migrate the Carpet codebase to Mojang Mappings
This commit is contained in:
346 files changed
+8353
-8492
No files matched your search
@@ -1,23 +1,23 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.helpers.BlockRotator;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.util.math.Direction;
|
||||
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(ItemUsageContext.class)
|
||||
@Mixin(UseOnContext.class)
|
||||
public class ItemUsageContext_cactusMixin
|
||||
{
|
||||
@Redirect(method = "getPlayerFacing", at = @At(
|
||||
@Redirect(method = "getHorizontalDirection", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/entity/player/PlayerEntity;getHorizontalFacing()Lnet/minecraft/util/math/Direction;"
|
||||
target = "Lnet/minecraft/world/entity/player/Player;getDirection()Lnet/minecraft/core/Direction;"
|
||||
))
|
||||
private Direction getPlayerFacing(PlayerEntity playerEntity)
|
||||
private Direction getPlayerFacing(Player playerEntity)
|
||||
{
|
||||
Direction dir = playerEntity.getHorizontalFacing();
|
||||
Direction dir = playerEntity.getDirection();
|
||||
if (BlockRotator.flippinEligibility(playerEntity))
|
||||
{
|
||||
dir = dir.getOpposite();
|
||||
|
||||
Reference in new issue
Block a user