mapping update, fixed missing target mixins

This commit is contained in:
gnembon committed 2020-03-11 00:01:59 -03:00
1 parent b9964c8da8
commit 286913ebd7
17 files changed
+37 -33

No files matched your search

@@ -42,6 +42,7 @@ public abstract class CommandManagerMixin
CarpetSettings.impendingFillSkipUpdates = false;
}
// warning expected
@Redirect(method = "execute", at = @At(
value = "INVOKE",
target = "Lorg/apache/logging/log4j/Logger;isDebugEnabled()Z"
@@ -1,12 +1,12 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.container.Container;
import net.minecraft.container.Slot;
import net.minecraft.container.SlotActionType;
import net.minecraft.screen.slot.Slot;
import net.minecraft.screen.slot.SlotActionType;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.screen.ScreenHandler;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.List;
@Mixin(Container.class)
@Mixin(ScreenHandler.class)
public abstract class ContainerMixin
{
@Shadow @Final public List<Slot> slots;
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(PickaxeItem.class)
public class PickaxeItem_missingToolsMixin
{
@Redirect(method = "getMiningSpeed", at = @At(
@Redirect(method = "getMiningSpeedMultiplier", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/BlockState;getMaterial()Lnet/minecraft/block/Material;"
))
@@ -18,16 +18,16 @@ public abstract class PlayerEntity_antiCheatDisabled
{
@Shadow public abstract ItemStack getEquippedStack(EquipmentSlot equipmentSlot_1);
@Shadow public abstract void method_23669();
@Shadow public abstract void startFallFlying();
@Inject(method = "method_23668", at = @At("HEAD"), cancellable = true)
@Inject(method = "checkFallFlying", at = @At("HEAD"), cancellable = true)
private void allowDeploys(CallbackInfoReturnable<Boolean> cir)
{
if (CarpetSettings.antiCheatDisabled && CarpetServer.minecraft_server.isDedicated())
{
ItemStack itemStack_1 = getEquippedStack(EquipmentSlot.CHEST);
if (itemStack_1.getItem() == Items.ELYTRA && ElytraItem.isUsable(itemStack_1)) {
method_23669();
startFallFlying();
cir.setReturnValue(true);
}
}
@@ -24,8 +24,6 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
@Shadow protected abstract void dropShoulderEntities();
@Shadow protected abstract void method_7296(CompoundTag compoundTag_1);
@Shadow public abstract CompoundTag getShoulderEntityLeft();
@Shadow protected abstract void setShoulderEntityLeft(CompoundTag compoundTag_1);
@@ -33,7 +31,9 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
@Shadow protected abstract void setShoulderEntityRight(CompoundTag compoundTag_1);
@Shadow public abstract CompoundTag getShoulderEntityRight();
@Shadow protected abstract void dropShoulderEntity(CompoundTag entityNbt);
protected PlayerEntity_parrotMixin(EntityType<? extends LivingEntity> entityType_1, World world_1)
{
super(entityType_1, world_1);
@@ -66,13 +66,13 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
protected void dismount_left()
{
this.method_7296(this.getShoulderEntityLeft());
dropShoulderEntity(this.getShoulderEntityLeft());
this.setShoulderEntityLeft(new CompoundTag());
}
protected void dismount_right()
{
this.method_7296(this.getShoulderEntityRight());
dropShoulderEntity(this.getShoulderEntityRight());
this.setShoulderEntityRight(new CompoundTag());
}
@@ -51,7 +51,7 @@ public class PortalForcer_portalSuffocationMixin
CarpetSettings.fixedPosition = null;
}
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "method_22391",at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/pattern/BlockPattern$Result;getTeleportTarget(Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;DLnet/minecraft/util/math/Vec3d;D)Lnet/minecraft/block/pattern/BlockPattern$TeleportTarget;"
@@ -193,7 +193,7 @@ public class ServerPlayNetworkHandler_scarpetEventsMixin
@Inject(method = "onClientCommand", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/network/ServerPlayerEntity;method_23668()Z",
target = "Lnet/minecraft/server/network/ServerPlayerEntity;checkFallFlying()Z",
shift = At.Shift.BEFORE
))
private void onElytraEngage(ClientCommandC2SPacket clientCommandC2SPacket_1, CallbackInfo ci)
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ShearsItem.class)
public class ShearsItem_missingToolsMixin
{
@Inject(method = "getMiningSpeed", at = @At("HEAD"), cancellable = true)
@Inject(method = "getMiningSpeedMultiplier", at = @At("HEAD"), cancellable = true)
private void getCustomMaterial(ItemStack itemStack_1, BlockState blockState_1, CallbackInfoReturnable<Float> cir)
{
if (CarpetSettings.missingTools && (blockState_1.getMaterial() == Material.SPONGE))
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Structure.class)
public class Structure_fillUpdatesMixin
{
@Redirect( method = "method_15172", at = @At(
@Redirect( method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/IWorld;updateNeighbors(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;)V"
))
@@ -23,7 +23,7 @@ public class Structure_fillUpdatesMixin
iWorld.updateNeighbors(var1, var2);
}
@Redirect(method = "method_15172", at = @At(
@Redirect(method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/structure/StructurePlacementData;shouldUpdateNeighbors()Z"
))
@@ -52,8 +52,6 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
@Shadow private boolean chunkHolderListDirty;
@Shadow protected abstract void method_20458(long l, ChunkHolder chunkHolder);
@Shadow @Final private Queue<Runnable> field_19343;
@Shadow @Final private ServerLightingProvider serverLightingProvider;
@@ -73,6 +71,8 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
//in method_20617
//method_19534(Lnet/minecraft/server/world/ChunkHolder;Lnet/minecraft/world/chunk/Chunk;)Ljava/util/concurrent/CompletableFuture;
// incmopatibility with optifine makes this mixin fail.
// lambda for convertToFullChunk
@SuppressWarnings("UnresolvedMixinReference")
@Inject(method = "method_19534", require = 0, at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/world/ThreadedAnvilChunkStorage;convertToFullChunk(Lnet/minecraft/server/world/ChunkHolder;)Ljava/util/concurrent/CompletableFuture;",
@@ -48,14 +48,13 @@ public abstract class World_movableTEMixin implements WorldInterface
@Shadow
public abstract void updateNeighborsAlways(BlockPos blockPos_1, Block block_1);
@Shadow
public abstract void updateHorizontalAdjacent(BlockPos blockPos_1, Block block_1);
@Shadow
public abstract void onBlockChanged(BlockPos blockPos_1, BlockState blockState_1, BlockState blockState_2);
@Shadow public abstract Profiler getProfiler();
@Shadow public abstract void updateComparators(BlockPos pos, Block block);
/**
* @author 2No2Name
*/
@@ -116,7 +115,7 @@ public abstract class World_movableTEMixin implements WorldInterface
this.updateNeighborsAlways(blockPos_1, blockState_2.getBlock());
if (blockState_1.hasComparatorOutput())
{
this.updateHorizontalAdjacent(blockPos_1, block_1);
updateComparators(blockPos_1, block_1);
}
}