Migrate Carpet Mixin names to mojang mappings

This commit is contained in:
FX - PR0CESS committed 2022-01-28 16:47:18 -05:00
1 parent 2c3871b90e
commit a547677597
154 files changed
+422 -501

No files matched your search

@@ -4,7 +4,6 @@ import carpet.CarpetServer;
import carpet.helpers.HopperCounter; import carpet.helpers.HopperCounter;
import carpet.helpers.TickSpeed; import carpet.helpers.TickSpeed;
import carpet.logging.logHelpers.PacketCounter; import carpet.logging.logHelpers.PacketCounter;
import carpet.mixins.PlayerListHeaderS2CPacketMixin;
import carpet.utils.Messenger; import carpet.utils.Messenger;
import carpet.utils.SpawnReporter; import carpet.utils.SpawnReporter;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
@@ -15,10 +15,10 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(AbstractArrow.class) @Mixin(AbstractArrow.class)
public abstract class ProjectileEntityMixin extends Entity public abstract class AbstractArrowMixin extends Entity
{ {
private TrajectoryLogHelper logHelper; private TrajectoryLogHelper logHelper;
public ProjectileEntityMixin(EntityType<?> entityType_1, Level world_1) { super(entityType_1, world_1); } public AbstractArrowMixin(EntityType<?> entityType_1, Level world_1) { super(entityType_1, world_1); }
@Inject(method = "<init>(Lnet/minecraft/world/entity/EntityType;Lnet/minecraft/world/level/Level;)V", at = @At("RETURN")) @Inject(method = "<init>(Lnet/minecraft/world/entity/EntityType;Lnet/minecraft/world/level/Level;)V", at = @At("RETURN"))
private void addLogger(EntityType<? extends Projectile> entityType_1, Level world_1, CallbackInfo ci) private void addLogger(EntityType<? extends Projectile> entityType_1, Level world_1, CallbackInfo ci)
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.world.entity.projectile.AbstractArrow; import net.minecraft.world.entity.projectile.AbstractArrow;
@Mixin(AbstractArrow.class) @Mixin(AbstractArrow.class)
public class ProjectileEntity_extremeMixin public class AbstractArrow_extremeMixin
{ {
// calculates damage // calculates damage
@Redirect(method = "setEnchantmentEffectsFromEntity", expect = 1, at = @At( @Redirect(method = "setEnchantmentEffectsFromEntity", expect = 1, at = @At(
@@ -16,8 +16,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
//classes that override onButtonClick //classes that override onButtonClick
@Mixin({EnchantmentMenu.class, LecternMenu.class, LoomMenu.class, StonecutterMenu.class}) @Mixin({EnchantmentMenu.class, LecternMenu.class, LoomMenu.class, StonecutterMenu.class})
public abstract class ScreenHandlerSubclasses_scarpetMixin extends AbstractContainerMenu { public abstract class AbstractContainerMenuSubclasses_scarpetMixin extends AbstractContainerMenu {
protected ScreenHandlerSubclasses_scarpetMixin(MenuType<?> type, int syncId) { protected AbstractContainerMenuSubclasses_scarpetMixin(MenuType<?> type, int syncId) {
super(type, syncId); super(type, syncId);
} }
@@ -7,9 +7,7 @@ import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.List;
import net.minecraft.core.NonNullList; import net.minecraft.core.NonNullList;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.AbstractContainerMenu;
@@ -19,7 +17,7 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@Mixin(AbstractContainerMenu.class) @Mixin(AbstractContainerMenu.class)
public abstract class ContainerMixin public abstract class AbstractContainerMenu_ctrlQCraftingMixin
{ {
@Shadow public abstract void clicked(int int_1, int int_2, ClickType slotActionType_1, Player playerEntity_1); @Shadow public abstract void clicked(int int_1, int int_2, ClickType slotActionType_1, Player playerEntity_1);
@@ -37,7 +35,6 @@ public abstract class ContainerMixin
{ {
if (actionType == ClickType.THROW && CarpetSettings.ctrlQCraftingFix && this.getCarried().isEmpty() && slotId >= 0) if (actionType == ClickType.THROW && CarpetSettings.ctrlQCraftingFix && this.getCarried().isEmpty() && slotId >= 0)
{ {
ItemStack itemStack_1 = ItemStack.EMPTY;
Slot slot_4 = slots.get(slotId); Slot slot_4 = slots.get(slotId);
if (/*slot_4 != null && */slot_4.hasItem() && slot_4.mayPickup(playerEntity)) if (/*slot_4 != null && */slot_4.hasItem() && slot_4.mayPickup(playerEntity))
{ {
@@ -20,7 +20,7 @@ import net.minecraft.world.inventory.DataSlot;
import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.Recipe;
@Mixin(AbstractContainerMenu.class) @Mixin(AbstractContainerMenu.class)
public abstract class ScreenHandler_scarpetMixin implements ScreenHandlerInterface public abstract class AbstractContainerMenu_scarpetMixin implements ScreenHandlerInterface
{ {
@Shadow @Final private List<ContainerListener> containerListeners; @Shadow @Final private List<ContainerListener> containerListeners;
@Shadow public abstract void sendAllDataToRemote(); @Shadow public abstract void sendAllDataToRemote();
@@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(AbstractContainerMenu.class) @Mixin(AbstractContainerMenu.class)
public class ScreenHandler_stackableSBoxesMixin public class AbstractContainerMenu_stackableSBoxesMixin
{ {
@Redirect(method = "doClick", at = @At( @Redirect(method = "doClick", at = @At(
value = "INVOKE", value = "INVOKE",
@@ -15,9 +15,9 @@ import net.minecraft.world.entity.decoration.ArmorStand;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
@Mixin(ArmorStand.class) @Mixin(ArmorStand.class)
public abstract class ArmorStandEntity_scarpetMarkerMixin extends LivingEntity public abstract class ArmorStand_scarpetMarkerMixin extends LivingEntity
{ {
protected ArmorStandEntity_scarpetMarkerMixin(EntityType<? extends LivingEntity> entityType_1, Level world_1) protected ArmorStand_scarpetMarkerMixin(EntityType<? extends LivingEntity> entityType_1, Level world_1)
{ {
super(entityType_1, world_1); super(entityType_1, world_1);
} }
@@ -1,17 +1,11 @@
package carpet.mixins; package carpet.mixins;
import carpet.CarpetSettings;
import com.google.common.collect.Lists;
import com.mojang.serialization.Codec;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import java.util.Collections;
import java.util.List;
import net.minecraft.world.level.levelgen.feature.BastionFeature; import net.minecraft.world.level.levelgen.feature.BastionFeature;
@Mixin(BastionFeature.class) @Mixin(BastionFeature.class)
public abstract class BastionRemnantFeatureMixin //extends JigsawFeature public abstract class BastionFeatureMixin //extends JigsawFeature
{ {
/* /*
private static final Pool<SpawnSettings.SpawnEntry> spawnList = Pool.of( private static final Pool<SpawnSettings.SpawnEntry> spawnList = Pool.of(
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
import java.util.Random; import java.util.Random;
@Mixin(targets = "net.minecraft.world.entity.monster.Blaze$BlazeAttackGoal") @Mixin(targets = "net.minecraft.world.entity.monster.Blaze$BlazeAttackGoal")
public class BlazeEntityShootFireballGoal_extremeMixin public class BlazeAttackGoal_extremeMixin
{ {
@Redirect(method = "tick()V", expect = 2, at = @At( @Redirect(method = "tick()V", expect = 2, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.world.entity.monster.Blaze; import net.minecraft.world.entity.monster.Blaze;
@Mixin(Blaze.class) @Mixin(Blaze.class)
public class BlazeEntity_extremeMixin public class Blaze_extremeMixin
{ {
// unused actually // unused actually
@Redirect(method = "customServerAiStep", expect = 1, at = @At( @Redirect(method = "customServerAiStep", expect = 1, at = @At(
@@ -12,7 +12,7 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
@Mixin(BlockInput.class) @Mixin(BlockInput.class)
public class BlockStateArgument_fillUpdatesMixin public class BlockInput_fillUpdatesMixin
{ {
@Redirect(method = "place", at = @At( @Redirect(method = "place", at = @At(
value = "INVOKE", value = "INVOKE",
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(BlockInput.class) @Mixin(BlockInput.class)
public class BlockStateArgument_scarpetMixin implements BlockStateArgumentInterface public class BlockInput_scarpetMixin implements BlockStateArgumentInterface
{ {
@Shadow @Final private @Nullable CompoundTag tag; @Shadow @Final private @Nullable CompoundTag tag;
@@ -16,9 +16,9 @@ import net.minecraft.world.level.lighting.LayerLightEngine;
import net.minecraft.world.level.lighting.LayerLightSectionStorage; import net.minecraft.world.level.lighting.LayerLightSectionStorage;
@Mixin(BlockLightSectionStorage.class) @Mixin(BlockLightSectionStorage.class)
public abstract class BlockLightStorage_scarpetChunkCreationMixin extends LayerLightSectionStorage<BlockDataLayerStorageMap> implements LightStorageInterface public abstract class BlockLightSectionStorage_scarpetChunkCreationMixin extends LayerLightSectionStorage<BlockDataLayerStorageMap> implements LightStorageInterface
{ {
private BlockLightStorage_scarpetChunkCreationMixin(final LightLayer lightType, final LightChunkGetter chunkProvider, final BlockDataLayerStorageMap lightData) private BlockLightSectionStorage_scarpetChunkCreationMixin(final LightLayer lightType, final LightChunkGetter chunkProvider, final BlockDataLayerStorageMap lightData)
{ {
super(lightType, chunkProvider, lightData); super(lightType, chunkProvider, lightData);
} }
@@ -26,7 +26,7 @@ public abstract class BlockLightStorage_scarpetChunkCreationMixin extends LayerL
@Override @Override
public void processRelight(final LayerLightEngine<?, ?> lightProvider, final long cPos) public void processRelight(final LayerLightEngine<?, ?> lightProvider, final long cPos)
{ {
final LevelPropagator_resetChunkInterface levelPropagator = (LevelPropagator_resetChunkInterface) lightProvider; final DynamicGraphMinFixedPoint_resetChunkInterface levelPropagator = (DynamicGraphMinFixedPoint_resetChunkInterface) lightProvider;
for (int y = -1; y < 17; ++y) for (int y = -1; y < 17; ++y)
{ {
@@ -18,7 +18,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.block.state.properties.Property;
@Mixin(targets = "net.minecraft.commands.arguments.blocks.BlockPredicateArgument$BlockPredicate") @Mixin(targets = "net.minecraft.commands.arguments.blocks.BlockPredicateArgument$BlockPredicate")
public class StatePredicate_scarpetMixin implements BlockPredicateInterface public class BlockPredicate_scarpetMixin implements BlockPredicateInterface
{ {
@Shadow @Final private BlockState state; @Shadow @Final private BlockState state;
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(targets = "net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity") @Mixin(targets = "net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity")
public class WorldChunkBEList_tickMixin<T extends BlockEntity> public class BoundTickingBlockEntity_tickMixin<T extends BlockEntity>
{ {
@Shadow @Final private T blockEntity; @Shadow @Final private T blockEntity;
CarpetProfiler.ProfilerToken entitySection; CarpetProfiler.ProfilerToken entitySection;
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ChunkAccess.class) @Mixin(ChunkAccess.class)
public abstract class ChunkMixin public abstract class ChunkAccess_warningsMixin
{ {
// failed to mixin into interface. need to mixin in two places that uses it // failed to mixin into interface. need to mixin in two places that uses it
@Inject(method = "markPosForPostprocessing(Lnet/minecraft/core/BlockPos;)V", @Inject(method = "markPosForPostprocessing(Lnet/minecraft/core/BlockPos;)V",
@@ -59,7 +59,7 @@ import static carpet.script.CarpetEventServer.Event.CHUNK_GENERATED;
import static carpet.script.CarpetEventServer.Event.CHUNK_LOADED; import static carpet.script.CarpetEventServer.Event.CHUNK_LOADED;
@Mixin(ChunkMap.class) @Mixin(ChunkMap.class)
public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implements ThreadedAnvilChunkStorageInterface public abstract class ChunkMap_scarpetChunkCreationMixin implements ThreadedAnvilChunkStorageInterface
{ {
@Shadow @Shadow
@Final @Final
@@ -13,7 +13,7 @@ import net.minecraft.server.level.ChunkMap;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
@Mixin(ChunkMap.class) @Mixin(ChunkMap.class)
public class ThreadedAnvilChunkStorage_tickMixin public class ChunkMap_tickMixin
{ {
@Shadow @Final private ServerLevel level; @Shadow @Final private ServerLevel level;
CarpetProfiler.ProfilerToken currentSection; CarpetProfiler.ProfilerToken currentSection;
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ClientPacketListener.class) @Mixin(ClientPacketListener.class)
public abstract class ClientPlayNetworkHandlerMixin public abstract class ClientPacketListener_customPacketsMixin
{ {
@Shadow private Minecraft minecraft; @Shadow private Minecraft minecraft;
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor; import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(ClientboundTabListPacket.class) @Mixin(ClientboundTabListPacket.class)
public interface PlayerListHeaderS2CPacketMixin public interface ClientboundTabListPacketMixin
{ {
@Accessor("header") @Accessor("header")
void setHeader(Component header); void setHeader(Component header);
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(CloneCommands.class) @Mixin(CloneCommands.class)
public abstract class CloneCommandMixin public abstract class CloneCommands_fillUpdatesMixin
{ {
@ModifyConstant(method = "clone", constant = @Constant(intValue = 32768)) @ModifyConstant(method = "clone", constant = @Constant(intValue = 32768))
private static int fillLimit(int original) { private static int fillLimit(int original) {
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Commands.class) @Mixin(Commands.class)
public abstract class CommandManagerMixin public abstract class Commands_customCommandsMixin
{ {
@Shadow @Shadow
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Connection.class) @Mixin(Connection.class)
public abstract class ClientConnectionMixin implements ClientConnectionInterface public abstract class Connection_packetCounterMixin implements ClientConnectionInterface
{ {
// Add to the packet counter whenever a packet is received. // Add to the packet counter whenever a packet is received.
@Inject(method = "channelRead0", at = @At("HEAD")) @Inject(method = "channelRead0", at = @At("HEAD"))
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.world.Containers; import net.minecraft.world.Containers;
@Mixin(Containers.class) @Mixin(Containers.class)
public class ItemScatterer_extremeMixin public class Containers_extremeMixin
{ {
@Redirect(method = "dropItemStack(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/item/ItemStack;)V", expect = 3, at = @At( @Redirect(method = "dropItemStack(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/item/ItemStack;)V", expect = 3, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -1,82 +1,82 @@
package carpet.mixins; package carpet.mixins;
import carpet.CarpetSettings; import carpet.CarpetSettings;
import carpet.fakes.CoralFeatureInterface; import carpet.fakes.CoralFeatureInterface;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.BlockTags; import net.minecraft.tags.BlockTags;
import net.minecraft.tags.FluidTags; import net.minecraft.tags.FluidTags;
import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseCoralPlantTypeBlock; import net.minecraft.world.level.block.BaseCoralPlantTypeBlock;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BonemealableBlock; import net.minecraft.world.level.block.BonemealableBlock;
import net.minecraft.world.level.block.CoralFanBlock; import net.minecraft.world.level.block.CoralFanBlock;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.CoralClawFeature; import net.minecraft.world.level.levelgen.feature.CoralClawFeature;
import net.minecraft.world.level.levelgen.feature.CoralFeature; import net.minecraft.world.level.levelgen.feature.CoralFeature;
import net.minecraft.world.level.levelgen.feature.CoralMushroomFeature; import net.minecraft.world.level.levelgen.feature.CoralMushroomFeature;
import net.minecraft.world.level.levelgen.feature.CoralTreeFeature; import net.minecraft.world.level.levelgen.feature.CoralTreeFeature;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MaterialColor;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import java.util.Random; import java.util.Random;
@Mixin(CoralFanBlock.class) @Mixin(CoralFanBlock.class)
public abstract class CoralFanBlockMixin implements BonemealableBlock public abstract class CoralFanBlock_renewableCoralMixin implements BonemealableBlock
{ {
public boolean isValidBonemealTarget(BlockGetter var1, BlockPos var2, BlockState var3, boolean var4) public boolean isValidBonemealTarget(BlockGetter var1, BlockPos var2, BlockState var3, boolean var4)
{ {
return CarpetSettings.renewableCoral == CarpetSettings.RenewableCoralMode.EXPANDED return CarpetSettings.renewableCoral == CarpetSettings.RenewableCoralMode.EXPANDED
&& var3.getValue(BaseCoralPlantTypeBlock.WATERLOGGED) && var3.getValue(BaseCoralPlantTypeBlock.WATERLOGGED)
&& var1.getFluidState(var2.above()).is(FluidTags.WATER); && var1.getFluidState(var2.above()).is(FluidTags.WATER);
} }
public boolean isBonemealSuccess(Level var1, Random var2, BlockPos var3, BlockState var4) public boolean isBonemealSuccess(Level var1, Random var2, BlockPos var3, BlockState var4)
{ {
return (double)var1.random.nextFloat() < 0.15D; return (double)var1.random.nextFloat() < 0.15D;
} }
public void performBonemeal(ServerLevel worldIn, Random random, BlockPos pos, BlockState blockUnder) public void performBonemeal(ServerLevel worldIn, Random random, BlockPos pos, BlockState blockUnder)
{ {
CoralFeature coral; CoralFeature coral;
int variant = random.nextInt(3); int variant = random.nextInt(3);
if (variant == 0) if (variant == 0)
coral = new CoralClawFeature(NoneFeatureConfiguration.CODEC); coral = new CoralClawFeature(NoneFeatureConfiguration.CODEC);
else if (variant == 1) else if (variant == 1)
coral = new CoralTreeFeature(NoneFeatureConfiguration.CODEC); coral = new CoralTreeFeature(NoneFeatureConfiguration.CODEC);
else else
coral = new CoralMushroomFeature(NoneFeatureConfiguration.CODEC); coral = new CoralMushroomFeature(NoneFeatureConfiguration.CODEC);
MaterialColor color = blockUnder.getMapColor(worldIn, pos); MaterialColor color = blockUnder.getMapColor(worldIn, pos);
BlockState proper_block = blockUnder; BlockState proper_block = blockUnder;
for (Block block: BlockTags.CORAL_BLOCKS.getValues()) for (Block block: BlockTags.CORAL_BLOCKS.getValues())
{ {
proper_block = block.defaultBlockState(); proper_block = block.defaultBlockState();
if (proper_block.getMapColor(worldIn,pos) == color) if (proper_block.getMapColor(worldIn,pos) == color)
{ {
break; break;
} }
} }
worldIn.setBlock(pos, Blocks.WATER.defaultBlockState(), 4); worldIn.setBlock(pos, Blocks.WATER.defaultBlockState(), 4);
if (!((CoralFeatureInterface)coral).growSpecific(worldIn, random, pos, proper_block)) if (!((CoralFeatureInterface)coral).growSpecific(worldIn, random, pos, proper_block))
{ {
worldIn.setBlock(pos, blockUnder, 3); worldIn.setBlock(pos, blockUnder, 3);
} }
else else
{ {
if (worldIn.random.nextInt(10)==0) if (worldIn.random.nextInt(10)==0)
{ {
BlockPos randomPos = pos.offset(worldIn.random.nextInt(16)-8,worldIn.random.nextInt(8),worldIn.random.nextInt(16)-8 ); BlockPos randomPos = pos.offset(worldIn.random.nextInt(16)-8,worldIn.random.nextInt(8),worldIn.random.nextInt(16)-8 );
if (BlockTags.CORAL_BLOCKS.contains(worldIn.getBlockState(randomPos).getBlock())) if (BlockTags.CORAL_BLOCKS.contains(worldIn.getBlockState(randomPos).getBlock()))
{ {
worldIn.setBlock(randomPos, Blocks.WET_SPONGE.defaultBlockState(), 3); worldIn.setBlock(randomPos, Blocks.WET_SPONGE.defaultBlockState(), 3);
} }
} }
} }
} }
} }
@@ -12,7 +12,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.CoralFeature; import net.minecraft.world.level.levelgen.feature.CoralFeature;
@Mixin(CoralFeature.class) @Mixin(CoralFeature.class)
public abstract class CoralFeatureMixin implements CoralFeatureInterface public abstract class CoralFeature_renewableCoralMixin implements CoralFeatureInterface
{ {
@Shadow protected abstract boolean placeFeature(LevelAccessor var1, Random var2, BlockPos var3, BlockState var4); @Shadow protected abstract boolean placeFeature(LevelAccessor var1, Random var2, BlockPos var3, BlockState var4);
@@ -25,7 +25,7 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
import net.minecraft.world.level.material.MaterialColor; import net.minecraft.world.level.material.MaterialColor;
@Mixin(CoralPlantBlock.class) @Mixin(CoralPlantBlock.class)
public abstract class CoralBlockMixin implements BonemealableBlock public abstract class CoralPlantBlock_renewableCoralMixin implements BonemealableBlock
{ {
public boolean isValidBonemealTarget(BlockGetter var1, BlockPos var2, BlockState var3, boolean var4) public boolean isValidBonemealTarget(BlockGetter var1, BlockPos var2, BlockState var3, boolean var4)
{ {
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior; import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
@Mixin(DefaultDispenseItemBehavior.class) @Mixin(DefaultDispenseItemBehavior.class)
public class ItemDispenserBehaviour_extremeBehavioursMixin public class DefaultDispenseItemBehavior_extremeBehavioursMixin
{ {
@Redirect(method = "spawnItem", expect = 3, at = @At( @Redirect(method = "spawnItem", expect = 3, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.Shadow;
import carpet.fakes.ChunkTicketManagerInterface; import carpet.fakes.ChunkTicketManagerInterface;
@Mixin(DistanceManager.class) @Mixin(DistanceManager.class)
public abstract class ChunkTicketManager_scarpetChunkCreationMixin implements ChunkTicketManagerInterface public abstract class DistanceManager_scarpetChunkCreationMixin implements ChunkTicketManagerInterface
{ {
@Shadow @Shadow
@Final @Final
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(DistanceManager.class) @Mixin(DistanceManager.class)
public abstract class ChunkTicketManager_scarpetMixin implements ChunkTicketManagerInterface public abstract class DistanceManager_scarpetMixin implements ChunkTicketManagerInterface
{ {
@Shadow @Final private Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> tickets; @Shadow @Final private Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> tickets;
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.Shadow;
import java.util.Iterator; import java.util.Iterator;
@Mixin(DistanceManager.class) @Mixin(DistanceManager.class)
public abstract class ChunkTicketManager_spawnChunksMixin implements ChunkTicketManagerInterface public abstract class DistanceManager_spawnChunksMixin implements ChunkTicketManagerInterface
{ {
@Shadow @Final private Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> tickets; @Shadow @Final private Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> tickets;
@@ -9,11 +9,11 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(DistanceManager.class) @Mixin(DistanceManager.class)
public class ChunkTicketManager_tickMixin public class DistanceManager_tickMixin
{ {
@Shadow private long ticketTickCounter; @Shadow private long ticketTickCounter;
@Inject(method = "purgeStaleTickets", at = @At("HEAD"), cancellable = true) @Inject(method = "purgeStaleTickets", at = @At("HEAD"))
private void pauseTicketSystem(CallbackInfo ci) private void pauseTicketSystem(CallbackInfo ci)
{ {
// pausing expiry of tickets // pausing expiry of tickets
@@ -5,7 +5,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker; import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(DynamicGraphMinFixedPoint.class) @Mixin(DynamicGraphMinFixedPoint.class)
public interface LevelPropagator_resetChunkInterface public interface DynamicGraphMinFixedPoint_resetChunkInterface
{ {
@Invoker("checkEdge") @Invoker("checkEdge")
void cmInvokeUpdateLevel(long sourceId, long id, int level, boolean decrease); void cmInvokeUpdateLevel(long sourceId, long id, int level, boolean decrease);
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ExperienceOrb.class) @Mixin(ExperienceOrb.class)
public abstract class ExperienceOrbEntityMixin extends Entity public abstract class ExperienceOrb_xpNoCooldownMixin extends Entity
{ {
@Shadow @Shadow
private int count; private int count;
@@ -21,7 +21,7 @@ public abstract class ExperienceOrbEntityMixin extends Entity
@Shadow @Shadow
private int value; private int value;
public ExperienceOrbEntityMixin(EntityType<?> type, Level world) public ExperienceOrb_xpNoCooldownMixin(EntityType<?> type, Level world)
{ {
super(type, world); super(type, world);
} }
@@ -24,7 +24,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
@Mixin(value = Explosion.class) @Mixin(value = Explosion.class)
public abstract class ExplosionMixin public abstract class Explosion_optimizedTntMixin
{ {
@Shadow @Shadow
@Final @Final
@@ -8,11 +8,9 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageSource;
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.entity.projectile.FireworkRocketEntity;
@Mixin(FireworkRocketEntity.class) @Mixin(FireworkRocketEntity.class)
public class FireworkEntity_extremeMixin public class FireworkRocketEntity_extremeMixin
{ {
@Redirect(method = "<init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/item/ItemStack;)V", expect = 2, at = @At( @Redirect(method = "<init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/item/ItemStack;)V", expect = 2, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.world.entity.projectile.FishingHook; import net.minecraft.world.entity.projectile.FishingHook;
@Mixin(FishingHook.class) @Mixin(FishingHook.class)
public class FishingBobberEntity_extremeMixin public class FishingHook_extremeMixin
{ {
@Redirect(method = "<init>(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/Level;II)V", expect =3, at = @At( @Redirect(method = "<init>(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/Level;II)V", expect =3, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -4,7 +4,6 @@ import carpet.CarpetSettings;
import carpet.helpers.CustomSpawnLists; import carpet.helpers.CustomSpawnLists;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import java.util.List;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.util.random.WeightedRandomList; import net.minecraft.util.random.WeightedRandomList;
import net.minecraft.world.entity.MobCategory; import net.minecraft.world.entity.MobCategory;
@@ -22,10 +21,10 @@ import net.minecraft.world.level.levelgen.feature.StructureFeature;
import net.minecraft.world.level.levelgen.feature.SwamplandHutFeature; import net.minecraft.world.level.levelgen.feature.SwamplandHutFeature;
@Mixin(FlatLevelSource.class) @Mixin(FlatLevelSource.class)
public abstract class FlatChunkGeneratorMixin extends ChunkGenerator public abstract class FlatLevelSource_structuresMixin extends ChunkGenerator
{ {
public FlatChunkGeneratorMixin(BiomeSource biomeSource, StructureSettings structuresConfig) public FlatLevelSource_structuresMixin(BiomeSource biomeSource, StructureSettings structuresConfig)
{ {
super(biomeSource, structuresConfig); super(biomeSource, structuresConfig);
} }
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(FlowingFluid.class) @Mixin(FlowingFluid.class)
public class FlowableFluid_liquidDamageDisabledMixin public class FlowingFluid_liquidDamageDisabledMixin
{ {
@Inject( @Inject(
method = "canHoldFluid", method = "canHoldFluid",
@@ -14,9 +14,9 @@ import net.minecraft.world.level.Level;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@Mixin(Guardian.class) @Mixin(Guardian.class)
public abstract class GuardianEntityMixin extends Monster public abstract class Guardian_renewableSpongesMixin extends Monster
{ {
protected GuardianEntityMixin(EntityType<? extends Monster> entityType_1, Level world_1) protected Guardian_renewableSpongesMixin(EntityType<? extends Monster> entityType_1, Level world_1)
{ {
super(entityType_1, world_1); super(entityType_1, world_1);
} }
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Gui.class) @Mixin(Gui.class)
public abstract class InGameHudMixin public abstract class Gui_tablistMixin
{ {
@Shadow @Shadow
@Final @Final
@@ -23,9 +23,9 @@ import net.minecraft.world.level.block.state.BlockState;
* The {@link Mixin} which removes items in a hopper if it points into a wool counter, and calls {@link HopperCounter#add} * The {@link Mixin} which removes items in a hopper if it points into a wool counter, and calls {@link HopperCounter#add}
*/ */
@Mixin(HopperBlockEntity.class) @Mixin(HopperBlockEntity.class)
public abstract class HopperBlockEntityMixin extends RandomizableContainerBlockEntity public abstract class HopperBlockEntity_counterMixin extends RandomizableContainerBlockEntity
{ {
protected HopperBlockEntityMixin(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockState blockState) { protected HopperBlockEntity_counterMixin(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockState blockState) {
super(blockEntityType, blockPos, blockState); super(blockEntityType, blockPos, blockState);
} }
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Husk.class) @Mixin(Husk.class)
public class HuskEntityMixin public class Husk_templesMixin
{ {
@Redirect(method = "checkHuskSpawnRules", at = @At(value = "INVOKE", target="Lnet/minecraft/world/level/ServerLevelAccessor;canSeeSky(Lnet/minecraft/core/BlockPos;)Z")) @Redirect(method = "checkHuskSpawnRules", at = @At(value = "INVOKE", target="Lnet/minecraft/world/level/ServerLevelAccessor;canSeeSky(Lnet/minecraft/core/BlockPos;)Z"))
private static boolean isSkylightOrTempleVisible(ServerLevelAccessor serverWorldAccess, BlockPos pos) private static boolean isSkylightOrTempleVisible(ServerLevelAccessor serverWorldAccess, BlockPos pos)
@@ -13,9 +13,9 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(InfestedBlock.class) @Mixin(InfestedBlock.class)
public abstract class InfestedBlockMixin extends Block public abstract class InfestedBlock_gravelMixin extends Block
{ {
public InfestedBlockMixin(Properties block$Settings_1) public InfestedBlock_gravelMixin(Properties block$Settings_1)
{ {
super(block$Settings_1); super(block$Settings_1);
} }
@@ -15,7 +15,7 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@Mixin(Inventory.class) @Mixin(Inventory.class)
public abstract class PlayerInventory_scarpetEventMixin public abstract class Inventory_scarpetEventMixin
{ {
@Shadow @Final public Player player; @Shadow @Final public Player player;
@@ -34,7 +34,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
@Override @Override
public void thunderHit(ServerLevel world, LightningBolt lightning) { public void thunderHit(ServerLevel world, LightningBolt lightning) {
if (CarpetSettings.lightningKillsDropsFix) { if (CarpetSettings.lightningKillsDropsFix) {
if (this.age > 8) { //Only kill item if its older then 8 ticks if (this.age > 8) { //Only kill item if it's older than 8 ticks
super.thunderHit(world, lightning); super.thunderHit(world, lightning);
} }
} else { } else {
@@ -12,7 +12,7 @@ import net.minecraft.world.level.lighting.LayerLightEngine;
import net.minecraft.world.level.lighting.LayerLightSectionStorage; import net.minecraft.world.level.lighting.LayerLightSectionStorage;
@Mixin(LayerLightEngine.class) @Mixin(LayerLightEngine.class)
public abstract class ChunkLightProvider_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface, ChunkLightProviderInterface public abstract class LayerLightEngine_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface, ChunkLightProviderInterface
{ {
@Shadow @Shadow
@Final @Final
@@ -20,7 +20,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.longs.LongSet;
@Mixin(LayerLightSectionStorage.class) @Mixin(LayerLightSectionStorage.class)
public abstract class LightStorage_scarpetChunkCreationMixin implements LightStorageInterface public abstract class LayerLightSectionStorage_scarpetChunkCreationMixin implements LightStorageInterface
{ {
@Shadow @Shadow
protected abstract DataLayer getDataLayer(final long sectionPos, final boolean cached); protected abstract DataLayer getDataLayer(final long sectionPos, final boolean cached);
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(LevelChunk.class) @Mixin(LevelChunk.class)
public class WorldChunk_fillUpdatesMixin public class LevelChunk_fillUpdatesMixin
{ {
// todo onStateReplaced needs a bit more love since it removes be which is needed // todo onStateReplaced needs a bit more love since it removes be which is needed
@Redirect(method = "setBlockState", at = @At( @Redirect(method = "setBlockState", at = @At(
@@ -27,13 +27,13 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(LevelChunk.class) @Mixin(LevelChunk.class)
public abstract class WorldChunk_movableTEMixin extends ChunkAccess implements WorldChunkInterface public abstract class LevelChunk_movableBEMixin extends ChunkAccess implements WorldChunkInterface
{ {
@Shadow @Shadow
@Final @Final
Level level; Level level;
public WorldChunk_movableTEMixin(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biome, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable BlendingData blendingData) { public LevelChunk_movableBEMixin(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biome, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable BlendingData blendingData) {
super(pos, upgradeData, heightLimitView, biome, inhabitedTime, sectionArrayInitializer, blendingData); super(pos, upgradeData, heightLimitView, biome, inhabitedTime, sectionArrayInitializer, blendingData);
} }
@@ -14,7 +14,7 @@ import net.minecraft.world.level.entity.EntitySectionStorage;
import net.minecraft.world.level.entity.LevelEntityGetterAdapter; import net.minecraft.world.level.entity.LevelEntityGetterAdapter;
@Mixin(LevelEntityGetterAdapter.class) @Mixin(LevelEntityGetterAdapter.class)
public class SimpleEntityLookup_scarpetMixin<T extends EntityAccess> implements SimpleEntityLookupInterface public class LevelEntityGetterAdapter_scarpetMixin<T extends EntityAccess> implements SimpleEntityLookupInterface
{ {
@Shadow @Final private EntitySectionStorage<T> sectionStorage; @Shadow @Final private EntitySectionStorage<T> sectionStorage;
@@ -9,7 +9,7 @@ import net.minecraft.world.level.lighting.LayerLightEngine;
import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.lighting.LevelLightEngine;
@Mixin(LevelLightEngine.class) @Mixin(LevelLightEngine.class)
public abstract class LightingProvider_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface public abstract class LevelLightEngine_scarpetChunkCreationMixin implements Lighting_scarpetChunkCreationInterface
{ {
@Shadow @Shadow
@Final @Final
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(LevelRenderer.class) @Mixin(LevelRenderer.class)
public class WorldRenderer_creativeNoClipMixin public class LevelRenderer_creativeNoClipMixin
{ {
@Redirect(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;isSpectator()Z")) @Redirect(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;isSpectator()Z"))
private boolean canSeeWorld(LocalPlayer clientPlayerEntity) private boolean canSeeWorld(LocalPlayer clientPlayerEntity)
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(value = LevelRenderer.class, priority = 69420) @Mixin(value = LevelRenderer.class, priority = 69420)
public class WorldRenderer_fogOffMixin public class LevelRenderer_fogOffMixin
{ {
@Redirect(method = "renderLevel", require = 0, expect = 0, at = @At( @Redirect(method = "renderLevel", require = 0, expect = 0, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.ModifyVariable;
@Mixin(value = LevelRenderer.class, priority = 69420) @Mixin(value = LevelRenderer.class, priority = 69420)
public class WorldRenderer_pausedShakeMixin public class LevelRenderer_pausedShakeMixin
{ {
@Shadow @Final private Minecraft minecraft; @Shadow @Final private Minecraft minecraft;
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(LevelRenderer.class) @Mixin(LevelRenderer.class)
public class WorldRenderer_scarpetRenderMixin public class LevelRenderer_scarpetRenderMixin
{ {
@Inject(method = "<init>", at = @At("RETURN")) @Inject(method = "<init>", at = @At("RETURN"))
private void addRenderers(Minecraft client, RenderBuffers bufferBuilders, CallbackInfo ci) private void addRenderers(Minecraft client, RenderBuffers bufferBuilders, CallbackInfo ci)
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Level.class) @Mixin(Level.class)
public abstract class World_fillUpdatesMixin public abstract class Level_fillUpdatesMixin
{ {
@ModifyConstant(method = "setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;II)Z", //setBlockState main @ModifyConstant(method = "setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;II)Z", //setBlockState main
constant = @Constant(intValue = 16)) constant = @Constant(intValue = 16))
@@ -18,7 +18,7 @@ import net.minecraft.world.level.entity.LevelEntityGetter;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
@Mixin(Level.class) @Mixin(Level.class)
public abstract class World_getOtherEntitiesLimited implements WorldInterface { public abstract class Level_getOtherEntitiesLimited implements WorldInterface {
private static final RuntimeException CONTROL_FLOW_EXCEPTION = new RuntimeException("Should be caught for control flow in World_getOtherEntitiesLimited!"); private static final RuntimeException CONTROL_FLOW_EXCEPTION = new RuntimeException("Should be caught for control flow in World_getOtherEntitiesLimited!");
@@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(Level.class) @Mixin(Level.class)
public abstract class World_movableTEMixin implements WorldInterface, LevelAccessor public abstract class Level_movableBEMixin implements WorldInterface, LevelAccessor
{ {
@Shadow @Shadow
@Final @Final
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Level.class) @Mixin(Level.class)
public class World_scarpetPlopMixin public class Level_scarpetPlopMixin
{ {
@Redirect(method = "getHeight", at = @At( @Redirect(method = "getHeight", at = @At(
@@ -19,7 +19,7 @@ import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
@Mixin(Level.class) @Mixin(Level.class)
public abstract class World_tickMixin implements WorldInterface public abstract class Level_tickMixin implements WorldInterface
{ {
@Shadow @Final public boolean isClientSide; @Shadow @Final public boolean isClientSide;
CarpetProfiler.ProfilerToken currentSection; CarpetProfiler.ProfilerToken currentSection;
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(Level.class) @Mixin(Level.class)
public class World_updateSuppressionCrashFixMixin { public class Level_updateSuppressionCrashFixMixin {
@Inject( @Inject(
method = "neighborChanged", method = "neighborChanged",
@@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LiquidBlock.class) @Mixin(LiquidBlock.class)
public abstract class FluidBlock_renewableBlackstoneMixin public abstract class LiquidBlock_renewableBlackstoneMixin
{ {
@Shadow @Final protected FlowingFluid fluid; @Shadow @Final protected FlowingFluid fluid;
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LiquidBlock.class) @Mixin(LiquidBlock.class)
public abstract class FluidBlock_renewableDeepslateMixin { public abstract class LiquidBlock_renewableDeepslateMixin {
@Shadow protected abstract void fizz(LevelAccessor world, BlockPos pos); @Shadow protected abstract void fizz(LevelAccessor world, BlockPos pos);
@@ -11,10 +11,10 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(LivingEntity.class) @Mixin(LivingEntity.class)
public abstract class LivingEntityMixin extends Entity public abstract class LivingEntity_cleanLogsMixin extends Entity
{ {
public LivingEntityMixin(EntityType<?> type, Level world) public LivingEntity_cleanLogsMixin(EntityType<?> type, Level world)
{ {
super(type, world); super(type, world);
} }
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(LocalPlayer.class) @Mixin(LocalPlayer.class)
public class ClientPlayerEntity_clientCommandMixin public class LocalPlayer_clientCommandMixin
{ {
@Inject(method = "chat", at = @At("HEAD")) @Inject(method = "chat", at = @At("HEAD"))
private void inspectMessage(String string, CallbackInfo ci) private void inspectMessage(String string, CallbackInfo ci)
@@ -6,8 +6,6 @@ import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import static carpet.script.CarpetEventServer.Event.PLAYER_TRADES; import static carpet.script.CarpetEventServer.Event.PLAYER_TRADES;
@@ -18,8 +16,8 @@ import net.minecraft.world.inventory.MerchantResultSlot;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.trading.Merchant; import net.minecraft.world.item.trading.Merchant;
@Mixin(value = MerchantResultSlot.class) @Mixin(MerchantResultSlot.class)
public abstract class TradeOutputSlot_scarpetEventMixin { public abstract class MerchantResultSlot_scarpetEventMixin {
@Shadow @Final private Merchant merchant; @Shadow @Final private Merchant merchant;
@Shadow @Final private MerchantContainer slots; @Shadow @Final private MerchantContainer slots;
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Minecraft.class) @Mixin(Minecraft.class)
public class MinecraftClientMixin public class MinecraftMixin
{ {
@Shadow public ClientLevel level; @Shadow public ClientLevel level;
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(Minecraft.class) @Mixin(Minecraft.class)
public class MinecraftClient_pausedShakeMixin implements MinecraftClientInferface public class Minecraft_pausedShakeMixin implements MinecraftClientInferface
{ {
@Shadow private float pausePartialTick; @Shadow private float pausePartialTick;
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(MobCategory.class) @Mixin(MobCategory.class)
public class SpawnGroup_spawnMixin implements SpawnGroupInterface public class MobCategory_spawnMixin implements SpawnGroupInterface
{ {
@Shadow @Final private int max; @Shadow @Final private int max;
@@ -12,7 +12,7 @@ import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ai.goal.GoalSelector; import net.minecraft.world.entity.ai.goal.GoalSelector;
@Mixin(Mob.class) @Mixin(Mob.class)
public abstract class MobEntityMixin implements MobEntityInterface public abstract class MobMixin implements MobEntityInterface
{ {
@Shadow @Final protected GoalSelector targetSelector; @Shadow @Final protected GoalSelector targetSelector;
@Shadow @Final protected GoalSelector goalSelector; @Shadow @Final protected GoalSelector goalSelector;
@@ -9,7 +9,7 @@ import java.util.Random;
import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.Mob;
@Mixin(Mob.class) @Mixin(Mob.class)
public class MobEntity_extremeMixin public class Mob_extremeMixin
{ {
@Redirect(method = "finalizeSpawn", expect = 1, at = @At( @Redirect(method = "finalizeSpawn", expect = 1, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -40,7 +40,7 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
@Mixin(NaturalSpawner.class) @Mixin(NaturalSpawner.class)
public class SpawnHelperMixin public class NaturalSpawnerMixin
{ {
@Shadow @Final private static int MAGIC_NUMBER; @Shadow @Final private static int MAGIC_NUMBER;
@@ -7,7 +7,6 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.List;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.util.random.WeightedRandomList; import net.minecraft.util.random.WeightedRandomList;
import net.minecraft.world.entity.MobCategory; import net.minecraft.world.entity.MobCategory;
@@ -21,10 +20,9 @@ import net.minecraft.world.level.levelgen.StructureSettings;
import net.minecraft.world.level.levelgen.feature.StructureFeature; import net.minecraft.world.level.levelgen.feature.StructureFeature;
@Mixin(NoiseBasedChunkGenerator.class) @Mixin(NoiseBasedChunkGenerator.class)
// todo rename mixin after 1.15 is gone public abstract class NoiseBasedChunkGenerator_husksSpawnMixin extends ChunkGenerator
public abstract class NoiseChunkGenerator_husksSpawnMixin extends ChunkGenerator
{ {
public NoiseChunkGenerator_husksSpawnMixin(BiomeSource biomeSource, StructureSettings structuresConfig) public NoiseBasedChunkGenerator_husksSpawnMixin(BiomeSource biomeSource, StructureSettings structuresConfig)
{ {
super(biomeSource, structuresConfig); super(biomeSource, structuresConfig);
} }
@@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(NoiseSampler.class) @Mixin(NoiseSampler.class)
public abstract class NoiseColumnSamplerMixin_scarpetMixin implements NoiseColumnSamplerInterface { public abstract class NoiseSampler_scarpetMixin implements NoiseColumnSamplerInterface {
@Shadow @Final @Shadow @Final
private BlendedNoise blendedNoise; private BlendedNoise blendedNoise;
@@ -198,12 +198,12 @@ public abstract class NoiseColumnSamplerMixin_scarpetMixin implements NoiseColum
} }
case "spaghetti3dFirst" -> { case "spaghetti3dFirst" -> {
double d = this.spaghetti3DRarityModulator.getValue(x * 2, y, z * 2); double d = this.spaghetti3DRarityModulator.getValue(x * 2, y, z * 2);
double e = CaveScalerMixin_scarpetMixin.invokeGetSpaghettiRarity3D(d); double e = QuantizedSpaghettiRarityMixin_scarpetMixin.invokeGetSpaghettiRarity3D(d);
return sampleWithRarity(this.spaghetti3DNoiseSource1, x, y, z, e); return sampleWithRarity(this.spaghetti3DNoiseSource1, x, y, z, e);
} }
case "spaghetti3dSecond" -> { case "spaghetti3dSecond" -> {
double d = this.spaghetti3DRarityModulator.getValue(x * 2, y, z * 2); double d = this.spaghetti3DRarityModulator.getValue(x * 2, y, z * 2);
double e = CaveScalerMixin_scarpetMixin.invokeGetSpaghettiRarity3D(d); double e = QuantizedSpaghettiRarityMixin_scarpetMixin.invokeGetSpaghettiRarity3D(d);
return sampleWithRarity(this.spaghetti3DNoiseSource2, x, y, z, e); return sampleWithRarity(this.spaghetti3DNoiseSource2, x, y, z, e);
} }
case "spaghetti3dRarity" -> { case "spaghetti3dRarity" -> {
@@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor; import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(Objective.class) @Mixin(Objective.class)
public interface ScoreboardObjective_scarpetMixin { public interface Objective_scarpetMixin {
@Mutable @Accessor("criteria") @Mutable @Accessor("criteria")
void setCriterion(ObjectiveCriteria criterion); void setCriterion(ObjectiveCriteria criterion);
} }
@@ -17,7 +17,7 @@ import net.minecraft.world.level.pathfinder.Path;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
@Mixin(PathNavigation.class) @Mixin(PathNavigation.class)
public abstract class EntityNavigation_pathfindingMixin public abstract class PathNavigation_pathfindingMixin
{ {
@Shadow @Final protected Mob mob; @Shadow @Final protected Mob mob;
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PersistentEntitySectionManager.class) @Mixin(PersistentEntitySectionManager.class)
public class ServerEntityManager_scarpetMixin public class PersistentEntitySectionManager_scarpetMixin
{ {
@Inject(method = "addEntity(Lnet/minecraft/world/level/entity/EntityAccess;Z)Z", at = @At( @Inject(method = "addEntity(Lnet/minecraft/world/level/entity/EntityAccess;Z)Z", at = @At(
value = "INVOKE", value = "INVOKE",
@@ -10,8 +10,6 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
//import org.spongepowered.asm.mixin.injection.At;
//import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(PickaxeItem.class) @Mixin(PickaxeItem.class)
public class PickaxeItem_missingToolsMixin extends DiggerItem public class PickaxeItem_missingToolsMixin extends DiggerItem
@@ -9,7 +9,7 @@ import java.util.function.Predicate;
import net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplier; import net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplier;
@Mixin(PieceGeneratorSupplier.class) @Mixin(PieceGeneratorSupplier.class)
public interface StructureGeneratorFactory_plopMixin public interface PieceGeneratorSupplier_plopMixin
{ {
@SuppressWarnings("UnresolvedMixinReference") @SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "method_39845", at = @At( @Redirect(method = "method_39845", at = @At(
@@ -27,9 +27,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Mixin(PistonBaseBlock.class) @Mixin(PistonBaseBlock.class)
public abstract class PistonBlock_movableTEMixin extends DirectionalBlock public abstract class PistonBaseBlock_movableBEMixin extends DirectionalBlock
{ {
protected PistonBlock_movableTEMixin(Properties block$Settings_1) protected PistonBaseBlock_movableBEMixin(Properties block$Settings_1)
{ {
super(block$Settings_1); super(block$Settings_1);
} }
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PistonBaseBlock.class) @Mixin(PistonBaseBlock.class)
public class PistonBlock_qcMixin public class PistonBaseBlock_qcMixin
{ {
@Inject(method = "getNeighborSignal", cancellable = true, at = @At( @Inject(method = "getNeighborSignal", cancellable = true, at = @At(
value = "INVOKE", value = "INVOKE",
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(PistonBaseBlock.class) @Mixin(PistonBaseBlock.class)
public abstract class PistonBlock_rotatorBlockMixin implements PistonBlockInterface public abstract class PistonBaseBlock_rotatorBlockMixin implements PistonBlockInterface
{ {
@Shadow protected abstract boolean getNeighborSignal(Level world_1, BlockPos blockPos_1, Direction direction_1); @Shadow protected abstract boolean getNeighborSignal(Level world_1, BlockPos blockPos_1, Direction direction_1);
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(PistonHeadRenderer.class) @Mixin(PistonHeadRenderer.class)
public abstract class PistonBlockEntityRenderer_movableTEMixin implements BlockEntityRenderer<PistonMovingBlockEntity> public abstract class PistonHeadRenderer_movableBEMixin implements BlockEntityRenderer<PistonMovingBlockEntity>
{ {
BlockEntityRenderDispatcher dispatcher; BlockEntityRenderDispatcher dispatcher;
@Inject(method = "<init>", at = @At("TAIL")) @Inject(method = "<init>", at = @At("TAIL"))
@@ -20,10 +20,9 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PistonMovingBlockEntity.class) @Mixin(PistonMovingBlockEntity.class)
public abstract class PistonBlockEntity_movableTEMixin extends BlockEntity implements PistonBlockEntityInterface public abstract class PistonMovingBlockEntity_movableBEMixin extends BlockEntity implements PistonBlockEntityInterface
{ {
@Shadow @Shadow
private boolean isSourcePiston; private boolean isSourcePiston;
@@ -34,7 +33,7 @@ public abstract class PistonBlockEntity_movableTEMixin extends BlockEntity imple
private boolean renderCarriedBlockEntity = false; private boolean renderCarriedBlockEntity = false;
private boolean renderSet = false; private boolean renderSet = false;
public PistonBlockEntity_movableTEMixin(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockState blockState) { public PistonMovingBlockEntity_movableBEMixin(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockState blockState) {
super(blockEntityType, blockPos, blockState); super(blockEntityType, blockPos, blockState);
} }
@@ -20,11 +20,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(PistonMovingBlockEntity.class) @Mixin(PistonMovingBlockEntity.class)
public abstract class PistonBlockEntity_playerHandlingMixin public abstract class PistonMovingBlockEntity_playerHandlingMixin
{ {
@Shadow private BlockState movedState;
@Shadow public abstract Direction getMovementDirection();
@Inject(method = "moveEntityByPiston", at = @At("HEAD"), cancellable = true) @Inject(method = "moveEntityByPiston", at = @At("HEAD"), cancellable = true)
private static void dontPushSpectators(Direction direction, Entity entity, double d, Direction direction2, CallbackInfo ci) private static void dontPushSpectators(Direction direction, Entity entity, double d, Direction direction2, CallbackInfo ci)
@@ -55,13 +52,13 @@ public abstract class PistonBlockEntity_playerHandlingMixin
Direction direction = pistonBlockEntity.getMovementDirection(); Direction direction = pistonBlockEntity.getMovementDirection();
switch(direction.getAxis()) { switch(direction.getAxis()) {
case X: case X:
e = (double)direction.getStepX(); e = direction.getStepX();
break; break;
case Y: case Y:
f = (double)direction.getStepY(); f = direction.getStepY();
break; break;
case Z: case Z:
g = (double)direction.getStepZ(); g = direction.getStepZ();
} }
entity.setDeltaMovement(e, f, g); entity.setDeltaMovement(e, f, g);
@@ -2,12 +2,9 @@ package carpet.mixins;
import carpet.CarpetServer; import carpet.CarpetServer;
import net.minecraft.network.Connection; import net.minecraft.network.Connection;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.players.PlayerList; import net.minecraft.server.players.PlayerList;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -15,9 +12,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import static carpet.script.CarpetEventServer.Event.PLAYER_CONNECTS; import static carpet.script.CarpetEventServer.Event.PLAYER_CONNECTS;
@Mixin(PlayerList.class) @Mixin(PlayerList.class)
public class PlayerManager_coreMixin public class PlayerList_coreMixin
{ {
@Shadow @Final private MinecraftServer server;
@Inject(method = "placeNewPlayer", at = @At("RETURN")) @Inject(method = "placeNewPlayer", at = @At("RETURN"))
private void onPlayerConnected(Connection connection, ServerPlayer player, CallbackInfo ci) private void onPlayerConnected(Connection connection, ServerPlayer player, CallbackInfo ci)
@@ -17,7 +17,7 @@ import carpet.patches.NetHandlerPlayServerFake;
import carpet.patches.EntityPlayerMPFake; import carpet.patches.EntityPlayerMPFake;
@Mixin(PlayerList.class) @Mixin(PlayerList.class)
public abstract class PlayerManager_fakePlayersMixin public abstract class PlayerList_fakePlayersMixin
{ {
@Shadow @Shadow
@Final @Final
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import static carpet.script.CarpetEventServer.Event.PLAYER_RESPAWNS; import static carpet.script.CarpetEventServer.Event.PLAYER_RESPAWNS;
@Mixin(PlayerList.class) @Mixin(PlayerList.class)
public class PlayerManager_scarpetEventsMixin public class PlayerList_scarpetEventsMixin
{ {
@Inject(method = "respawn", at = @At("HEAD")) @Inject(method = "respawn", at = @At("HEAD"))
private void onRespawn(ServerPlayer player, boolean olive, CallbackInfoReturnable<ServerPlayer> cir) private void onRespawn(ServerPlayer player, boolean olive, CallbackInfoReturnable<ServerPlayer> cir)
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
@Mixin(PlayerTabOverlay.class) @Mixin(PlayerTabOverlay.class)
public abstract class PlayerListHudMixin implements PlayerListHudInterface public abstract class PlayerTabOverlayMixin implements PlayerListHudInterface
{ {
@Shadow private Component footer; @Shadow private Component footer;
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor; import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(PlayerTeam.class) @Mixin(PlayerTeam.class)
public interface Team_scarpetMixin public interface PlayerTeam_scarpetMixin
{ {
@Accessor("color") @Accessor("color")
ChatFormatting getColor(); ChatFormatting getColor();
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntity_antiCheatDisabled public abstract class Player_antiCheatDisabledMixin
{ {
@Shadow public abstract ItemStack getItemBySlot(EquipmentSlot equipmentSlot_1); @Shadow public abstract ItemStack getItemBySlot(EquipmentSlot equipmentSlot_1);
@@ -10,9 +10,9 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntity_creativeNoClipMixin extends LivingEntity public abstract class Player_creativeNoClipMixin extends LivingEntity
{ {
protected PlayerEntity_creativeNoClipMixin(EntityType<? extends LivingEntity> type, Level world) protected Player_creativeNoClipMixin(EntityType<? extends LivingEntity> type, Level world)
{ {
super(type, world); super(type, world);
} }
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntity_fakePlayersMixin public abstract class Player_fakePlayersMixin
{ {
/** /**
* To make sure player attacks are able to knockback fake players * To make sure player attacks are able to knockback fake players
@@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntity_parrotMixin extends LivingEntity public abstract class Player_parrotMixin extends LivingEntity
{ {
@Shadow @Final public Abilities abilities; @Shadow @Final public Abilities abilities;
@@ -34,7 +34,7 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
@Shadow protected abstract void respawnEntityOnShoulder(CompoundTag entityNbt); @Shadow protected abstract void respawnEntityOnShoulder(CompoundTag entityNbt);
protected PlayerEntity_parrotMixin(EntityType<? extends LivingEntity> entityType_1, Level world_1) protected Player_parrotMixin(EntityType<? extends LivingEntity> entityType_1, Level world_1)
{ {
super(entityType_1, world_1); super(entityType_1, world_1);
} }
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntityMixin_portalDelayMixin public abstract class Player_portalDelayMixin
{ {
@Final @Shadow public Abilities abilities; @Final @Shadow public Abilities abilities;
@@ -25,9 +25,9 @@ import static carpet.script.CarpetEventServer.Event.PLAYER_TAKES_DAMAGE;
import static carpet.script.CarpetEventServer.Event.PLAYER_COLLIDES_WITH_ENTITY; import static carpet.script.CarpetEventServer.Event.PLAYER_COLLIDES_WITH_ENTITY;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntity_scarpetEventsMixin extends LivingEntity public abstract class Player_scarpetEventsMixin extends LivingEntity
{ {
protected PlayerEntity_scarpetEventsMixin(EntityType<? extends LivingEntity> type, Level world) protected Player_scarpetEventsMixin(EntityType<? extends LivingEntity> type, Level world)
{ {
super(type, world); super(type, world);
} }
@@ -11,7 +11,7 @@ import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
@Mixin(Player.class) @Mixin(Player.class)
public abstract class PlayerEntity_xpNoCooldownMixin { public abstract class Player_xpNoCooldownMixin {
@Shadow @Shadow
protected abstract void touch(Entity entity); protected abstract void touch(Entity entity);
Loaded 100 of 154 files, more files were not shown because too many files have changed in this diff. Show more