Update mcp 20201028

This commit is contained in:
IzzelAliz 2020-11-04 16:37:02 +08:00
parent f4063924e0
commit 3d71b9d4a7
58 changed files with 121 additions and 123 deletions

View File

@ -36,7 +36,7 @@ arclight {
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
minecraft {
mappings channel: 'snapshot', version: "20200916-1.16.2"
mappings channel: 'snapshot', version: "20201028-1.16.3"
accessTransformer = project.file('src/main/resources/META-INF/accesstransformer.cfg')
}

View File

@ -36,7 +36,7 @@ public class CarvedPumpkinBlockMixin {
}
@Inject(method = "trySpawnGolem", cancellable = true, at = @At(value = "INVOKE", shift = At.Shift.AFTER, target = "Lnet/minecraft/world/World;addEntity(Lnet/minecraft/entity/Entity;)Z"))
public void arclight$returnIfFail(World world, BlockPos p_196358_2_, CallbackInfo ci) {
public void arclight$returnIfFail(World world, BlockPos blockPos, CallbackInfo ci) {
if (arclight$success) {
if (arclight$populator != null) {
for (BlockPos pos : arclight$populator.getBlocks()) {

View File

@ -32,7 +32,7 @@ import java.util.Random;
public abstract class FireBlockMixin implements FireBlockBridge {
// @formatter:off
@Shadow protected abstract BlockState getStateForPlacement(IBlockReader p_196448_1_, BlockPos p_196448_2_);
@Shadow protected abstract BlockState getStateForPlacement(IBlockReader blockReader, BlockPos pos);
@Shadow @Final private Object2IntMap<net.minecraft.block.Block> flammabilities;
// @formatter:on

View File

@ -25,7 +25,7 @@ public class MushroomBlockMixin {
}
@SuppressWarnings("ConstantConditions")
@Inject(method = "grow(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/gen/feature/ConfiguredFeature;func_242765_a(Lnet/minecraft/world/ISeedReader;Lnet/minecraft/world/gen/ChunkGenerator;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;)Z"))
@Inject(method = "grow(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/gen/feature/ConfiguredFeature;generate(Lnet/minecraft/world/ISeedReader;Lnet/minecraft/world/gen/ChunkGenerator;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;)Z"))
private void arclight$captureTree(ServerWorld world, BlockPos pos, BlockState state, Random rand, CallbackInfoReturnable<Boolean> cir) {
if ((Object) this == Blocks.BROWN_MUSHROOM) {
ArclightCaptures.captureTreeType(TreeType.BROWN_MUSHROOM);

View File

@ -48,7 +48,7 @@ public abstract class PortalSizeMixin implements PortalSizeBridge {
@Shadow private int height;
@Shadow @Final private Direction rightDir;
@Shadow private int width;
@Shadow public static PortalInfo func_242963_a(ServerWorld p_242963_0_, TeleportationRepositioner.Result p_242963_1_, Direction.Axis p_242963_2_, Vector3d p_242963_3_, EntitySize p_242963_4_, Vector3d p_242963_5_, float p_242963_6_, float p_242963_7_) { return null; }
@Shadow public static PortalInfo func_242963_a(ServerWorld world, TeleportationRepositioner.Result result, Direction.Axis axis, Vector3d offsetVector, EntitySize size, Vector3d motion, float rotationYaw, float rotationPitch) { return null; }
// @formatter:on
List<BlockState> blocks = new ArrayList<>();
@ -93,15 +93,15 @@ public abstract class PortalSizeMixin implements PortalSizeBridge {
@SuppressWarnings("ConstantConditions")
@Redirect(method = "func_242963_a", at = @At(value = "NEW", target = "net/minecraft/block/PortalInfo"))
private static PortalInfo arclight$setPortalInfo(Vector3d p_i242042_1_, Vector3d p_i242042_2_, float p_i242042_3_, float p_i242042_4_, ServerWorld world) {
PortalInfo portalInfo = new PortalInfo(p_i242042_1_, p_i242042_2_, p_i242042_3_, p_i242042_4_);
private static PortalInfo arclight$setPortalInfo(Vector3d pos, Vector3d motion, float rotationYaw, float rotationPitch, ServerWorld world) {
PortalInfo portalInfo = new PortalInfo(pos, motion, rotationYaw, rotationPitch);
((PortalInfoBridge) portalInfo).bridge$setWorld(world);
((PortalInfoBridge) portalInfo).bridge$setPortalEventInfo(ArclightCaptures.getCraftPortalEvent());
return portalInfo;
}
private static PortalInfo a(ServerWorld p_242963_0_, TeleportationRepositioner.Result p_242963_1_, Direction.Axis p_242963_2_, Vector3d p_242963_3_, EntitySize p_242963_4_, Vector3d p_242963_5_, float p_242963_6_, float p_242963_7_, CraftPortalEvent event) {
private static PortalInfo a(ServerWorld world, TeleportationRepositioner.Result result, Direction.Axis axis, Vector3d offsetVector, EntitySize size, Vector3d motion, float rotationYaw, float rotationPitch, CraftPortalEvent event) {
ArclightCaptures.captureCraftPortalEvent(event);
return func_242963_a(p_242963_0_, p_242963_1_, p_242963_2_, p_242963_3_, p_242963_4_, p_242963_5_, p_242963_6_, p_242963_7_);
return func_242963_a(world, result, axis, offsetVector, size, motion, rotationYaw, rotationPitch);
}
}

View File

@ -29,7 +29,7 @@ import java.util.Random;
public abstract class RedstoneOreBlockMixin {
// @formatter:off
@Shadow private static void activate(BlockState p_196500_0_, World p_196500_1_, BlockPos p_196500_2_) { }
@Shadow private static void activate(BlockState state, World world, BlockPos pos) { }
// @formatter:on
private static transient Entity arclight$entity;

View File

@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class TripWireHookBlockMixin {
@Inject(method = "calculateState", cancellable = true, at = @At(value = "INVOKE", ordinal = 1, target = "Lnet/minecraft/block/TripWireHookBlock;playSound(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;ZZZZ)V"))
public void arclight$blockRedstone(World worldIn, BlockPos pos, BlockState hookState, boolean p_176260_4_, boolean p_176260_5_, int p_176260_6_, BlockState p_176260_7_, CallbackInfo ci) {
public void arclight$blockRedstone(World worldIn, BlockPos pos, BlockState hookState, boolean attaching, boolean shouldNotifyNeighbours, int searchRange, BlockState state, CallbackInfo ci) {
BlockRedstoneEvent event = new BlockRedstoneEvent(CraftBlock.at(worldIn, pos), 15, 0);
Bukkit.getPluginManager().callEvent(event);
if (event.getNewCurrent() > 0) {

View File

@ -21,12 +21,12 @@ public abstract class VineBlockMixin extends BlockMixin {
// @formatter:off
@Shadow public static BooleanProperty getPropertyFor(Direction side) { return null; }
@Shadow protected abstract boolean hasVineBelow(IBlockReader p_196539_1_, BlockPos p_196539_2_);
@Shadow public static boolean canAttachTo(IBlockReader p_196542_0_, BlockPos worldIn, Direction neighborPos) { return false; }
@Shadow protected abstract boolean hasVineBelow(IBlockReader blockReader, BlockPos pos);
@Shadow public static boolean canAttachTo(IBlockReader blockReader, BlockPos worldIn, Direction neighborPos) { return false; }
@Shadow @Final public static BooleanProperty UP;
@Shadow protected abstract boolean hasAttachment(IBlockReader p_196541_1_, BlockPos p_196541_2_, Direction p_196541_3_);
@Shadow protected abstract boolean isFacingCardinal(BlockState p_196540_1_);
@Shadow protected abstract BlockState func_196544_a(BlockState p_196544_1_, BlockState p_196544_2_, Random p_196544_3_);
@Shadow protected abstract boolean hasAttachment(IBlockReader blockReader, BlockPos pos, Direction direction);
@Shadow protected abstract boolean isFacingCardinal(BlockState state);
@Shadow protected abstract BlockState func_196544_a(BlockState state, BlockState state2, Random rand);
// @formatter:on
/**

View File

@ -37,7 +37,7 @@ public class WitherSkeletonSkullBlockMixin {
}
@Inject(method = "checkWitherSpawn", cancellable = true, at = @At(value = "INVOKE", shift = At.Shift.AFTER, target = "Lnet/minecraft/world/World;addEntity(Lnet/minecraft/entity/Entity;)Z"))
private static void arclight$returnIfFail(World worldIn, BlockPos blockPos, SkullTileEntity p_196298_2_, CallbackInfo ci) {
private static void arclight$returnIfFail(World worldIn, BlockPos blockPos, SkullTileEntity tileEntity, CallbackInfo ci) {
if (arclight$success) {
if (arclight$populator != null) {
for (BlockPos pos : arclight$populator.getBlocks()) {

View File

@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public class EntitySelectorMixin {
@Redirect(method = "checkPermission", at = @At(value = "INVOKE", target = "Lnet/minecraft/command/CommandSource;hasPermissionLevel(I)Z"))
private boolean arclight$stringPermission(CommandSource commandSource, int p_197034_1_) {
return ((CommandSourceBridge) commandSource).bridge$hasPermission(p_197034_1_, "minecraft.command.selector");
private boolean arclight$stringPermission(CommandSource commandSource, int level) {
return ((CommandSourceBridge) commandSource).bridge$hasPermission(level, "minecraft.command.selector");
}
}

View File

@ -18,7 +18,7 @@ public abstract class ReloadCommandMixin {
private static void reload(MinecraftServer minecraftserver) {
ResourcePackList resourcePackList = minecraftserver.getResourcePacks();
IServerConfiguration configuration = minecraftserver.func_240793_aU_();
IServerConfiguration configuration = minecraftserver.getServerConfiguration();
Collection<String> collection = resourcePackList.func_232621_d_();
Collection<String> collection2 = func_241058_a_(resourcePackList, configuration, collection);
minecraftserver.func_240780_a_(collection2);

View File

@ -12,21 +12,21 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(TimeCommand.class)
public class TimeCommandMixin {
@Redirect(method = "addTime", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;func_241114_a_(J)V"))
@Redirect(method = "addTime", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setDayTime(J)V"))
private static void arclight$addTimeEvent(ServerWorld serverWorld, long time) {
TimeSkipEvent event = new TimeSkipEvent(((ServerWorldBridge) serverWorld).bridge$getWorld(), TimeSkipEvent.SkipReason.COMMAND, time - serverWorld.getDayTime());
Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
serverWorld.func_241114_a_(serverWorld.getDayTime() + event.getSkipAmount());
serverWorld.setDayTime(serverWorld.getDayTime() + event.getSkipAmount());
}
}
@Redirect(method = "setTime", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;func_241114_a_(J)V"))
@Redirect(method = "setTime", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setDayTime(J)V"))
private static void arclight$setTimeEvent(ServerWorld serverWorld, long time) {
TimeSkipEvent event = new TimeSkipEvent(((ServerWorldBridge) serverWorld).bridge$getWorld(), TimeSkipEvent.SkipReason.COMMAND, time - serverWorld.getDayTime());
Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
serverWorld.func_241114_a_(serverWorld.getDayTime() + event.getSkipAmount());
serverWorld.setDayTime(serverWorld.getDayTime() + event.getSkipAmount());
}
}
}

View File

@ -108,12 +108,12 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
@Shadow protected abstract void updatePortal();
@Shadow public abstract boolean isImmuneToFire();
@Shadow public abstract boolean attackEntityFrom(DamageSource source, float amount);
@Shadow public abstract void setFire(int p_70015_1_);
@Shadow public abstract void setFire(int seconds);
@Shadow public boolean collidedHorizontally;
@Shadow protected abstract Vector3d getAllowedMovement(Vector3d p_213306_1_);
@Shadow protected abstract Vector3d getAllowedMovement(Vector3d vec);
@Shadow public abstract void remove();
@Shadow public int ticksExisted;
@Shadow public void setWorld(World p_70029_1_) { }
@Shadow public void setWorld(World worldIn) { }
@Shadow private Entity ridingEntity;
@Shadow @Final public List<Entity> passengers;
@Shadow @Nullable public abstract Entity getControllingPassenger();
@ -190,7 +190,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
@Shadow protected abstract void setDead();
@Shadow protected abstract Optional<TeleportationRepositioner.Result> func_241830_a(ServerWorld p_241830_1_, BlockPos p_241830_2_, boolean p_241830_3_);
@Shadow protected BlockPos field_242271_ac;
@Shadow protected abstract Vector3d func_241839_a(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_);
@Shadow protected abstract Vector3d func_241839_a(Direction.Axis axis, TeleportationRepositioner.Result result);
@Shadow public abstract EntitySize getSize(Pose poseIn);
@Shadow protected abstract boolean func_233566_aG_();
@Shadow public abstract boolean isInLava();

View File

@ -166,7 +166,7 @@ public abstract class LivingEntityMixin extends EntityMixin implements LivingEnt
@Shadow public abstract boolean isPotionApplicable(EffectInstance potioneffectIn);
@Shadow protected abstract void onNewPotionEffect(EffectInstance id);
@Shadow @Nullable public abstract EffectInstance removeActivePotionEffect(@Nullable Effect potioneffectin);
@Shadow protected abstract void createWitherRose(@Nullable LivingEntity p_226298_1_);
@Shadow protected abstract void createWitherRose(@Nullable LivingEntity entitySource);
@Shadow public abstract double getAttributeValue(Attribute attribute);
@Shadow public abstract void applyKnockback(float strength, double ratioX, double ratioZ);
@Shadow protected abstract void damageArmor(DamageSource damageSource, float damage);

View File

@ -16,8 +16,8 @@ public abstract class RangedAttributeMixin extends Attribute implements RangedAt
@Override @Accessor("maximumValue") public abstract void bridge$setMaximumValue(double maximumValue);
// @formatter:on
protected RangedAttributeMixin(String p_i231500_1_, double p_i231500_2_) {
super(p_i231500_1_, p_i231500_2_);
protected RangedAttributeMixin(String attributeName, double defaultValue) {
super(attributeName, defaultValue);
}
@Inject(method = "clampValue", cancellable = true, at = @At("HEAD"))

View File

@ -19,13 +19,13 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
public class BrainUtilMixin {
@Inject(method = "spawnItemNearEntity", cancellable = true, at = @At("HEAD"))
private static void arclight$noEmptyLoot(LivingEntity entity, ItemStack stack, Vector3d p_233865_2_, CallbackInfo ci) {
private static void arclight$noEmptyLoot(LivingEntity entity, ItemStack stack, Vector3d offset, CallbackInfo ci) {
if (stack.isEmpty()) ci.cancel();
}
@Inject(method = "spawnItemNearEntity", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD,
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;addEntity(Lnet/minecraft/entity/Entity;)Z"))
private static void arclight$entityDropItem(LivingEntity entity, ItemStack stack, Vector3d p_233865_2_, CallbackInfo ci, double d, ItemEntity itemEntity) {
private static void arclight$entityDropItem(LivingEntity entity, ItemStack stack, Vector3d offset, CallbackInfo ci, double d, ItemEntity itemEntity) {
EntityDropItemEvent event = new EntityDropItemEvent(((EntityBridge) entity).bridge$getBukkitEntity(), (Item) ((EntityBridge) itemEntity).bridge$getBukkitEntity());
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {

View File

@ -32,15 +32,13 @@ public class AssignProfessionTaskMixin {
worldIn.setEntityState(entityIn, (byte) 14);
if (entityIn.getVillagerData().getProfession() == VillagerProfession.NONE) {
MinecraftServer minecraftserver = worldIn.getServer();
Optional.ofNullable(minecraftserver.getWorld(globalpos.getDimension())).flatMap((p_241376_1_) -> {
return p_241376_1_.getPointOfInterestManager().getType(globalpos.getPos());
}).flatMap((p_220390_0_) -> {
return Registry.VILLAGER_PROFESSION.stream().filter((p_220389_1_) -> {
return p_220389_1_.getPointOfInterest() == p_220390_0_;
Optional.ofNullable(minecraftserver.getWorld(globalpos.getDimension())).flatMap((world) -> {
return world.getPointOfInterestManager().getType(globalpos.getPos());
}).flatMap((poiType) -> {
return Registry.VILLAGER_PROFESSION.stream().filter((profession) -> {
return profession.getPointOfInterest() == poiType;
}).findFirst();
}).ifPresent((p_220388_2_) -> {
VillagerData villagerData = entityIn.getVillagerData().withProfession(p_220388_2_);
VillagerProfession profession = villagerData.getProfession();
}).ifPresent((profession) -> {
VillagerCareerChangeEvent event = CraftEventFactory.callVillagerCareerChangeEvent(entityIn, CraftVillager.nmsToBukkitProfession(profession), VillagerCareerChangeEvent.ChangeReason.EMPLOYED);
if (!event.isCancelled()) {
VillagerData newData = entityIn.getVillagerData().withProfession(CraftVillager.bukkitToNmsProfession(event.getProfession()));

View File

@ -15,12 +15,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class FarmerWorkTaskMixin {
@Inject(method = "compost", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/ComposterBlock;empty(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;"))
private void arclight$captureVillager1(ServerWorld p_234016_1_, VillagerEntity p_234016_2_, GlobalPos p_234016_3_, BlockState p_234016_4_, CallbackInfo ci) {
ArclightCaptures.captureEntityChangeBlock(p_234016_2_);
private void arclight$captureVillager1(ServerWorld world, VillagerEntity villager, GlobalPos p_234016_3_, BlockState state, CallbackInfo ci) {
ArclightCaptures.captureEntityChangeBlock(villager);
}
@Inject(method = "compost", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/ComposterBlock;attemptFill(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;"))
private void arclight$captureVillager2(ServerWorld p_234016_1_, VillagerEntity p_234016_2_, GlobalPos p_234016_3_, BlockState p_234016_4_, CallbackInfo ci) {
ArclightCaptures.captureEntityChangeBlock(p_234016_2_);
private void arclight$captureVillager2(ServerWorld world, VillagerEntity villager, GlobalPos p_234016_3_, BlockState state, CallbackInfo ci) {
ArclightCaptures.captureEntityChangeBlock(villager);
}
}

View File

@ -36,7 +36,7 @@ public class FollowOwnerGoalMixin {
}
@Inject(method = "tryToTeleportToLocation", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/pathfinding/PathNavigator;clearPath()V"))
public void arclight$returnIfFail(int p_226328_1_, int p_226328_2_, int p_226328_3_, CallbackInfoReturnable<Boolean> cir) {
public void arclight$returnIfFail(int x, int y, int z, CallbackInfoReturnable<Boolean> cir) {
if (arclight$cancelled) {
cir.setReturnValue(false);
}

View File

@ -34,10 +34,10 @@ public abstract class WitherEntityMixin extends CreatureEntityMixin {
@Shadow public abstract void setInvulTime(int time);
@Shadow @Final private int[] nextHeadUpdate;
@Shadow @Final private int[] idleHeadUpdates;
@Shadow protected abstract void launchWitherSkullToCoords(int p_82209_1_, double x, double y, double z, boolean invulnerable);
@Shadow protected abstract void launchWitherSkullToCoords(int head, double x, double y, double z, boolean invulnerable);
@Shadow public abstract int getWatchedTargetId(int head);
@Shadow public abstract void updateWatchedTargetId(int targetOffset, int newId);
@Shadow protected abstract void launchWitherSkullToEntity(int p_82216_1_, LivingEntity p_82216_2_);
@Shadow protected abstract void launchWitherSkullToEntity(int head, LivingEntity target);
@Shadow @Final private static EntityPredicate ENEMY_CONDITION;
@Shadow private int blockBreakCounter;
@Shadow @Final public ServerBossInfo bossInfo;

View File

@ -80,7 +80,7 @@ public abstract class ArmorStandEntityMixin extends LivingEntityMixin {
}
@Inject(method = "damageArmorStand", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/item/ArmorStandEntity;remove()V"))
private void arclight$deathEvent2(DamageSource p_213817_1_, float p_213817_2_, CallbackInfo ci) {
private void arclight$deathEvent2(DamageSource source, float p_213817_2_, CallbackInfo ci) {
arclight$callEntityDeath();
}

View File

@ -40,7 +40,7 @@ public abstract class ItemEntityMixin extends EntityMixin {
// @formatter:on
@Inject(method = "func_213858_a", cancellable = true, at = @At("HEAD"))
private static void arclight$itemMerge(ItemEntity from, ItemStack p_213858_1_, ItemEntity to, ItemStack p_213858_3_, CallbackInfo ci) {
private static void arclight$itemMerge(ItemEntity from, ItemStack stack1, ItemEntity to, ItemStack stack2, CallbackInfo ci) {
if (CraftEventFactory.callItemMergeEvent(to, from).isCancelled()) {
ci.cancel();
}

View File

@ -20,7 +20,7 @@ public abstract class PaintingEntityMixin extends HangingEntityMixin {
@Shadow public PaintingType art;
@Inject(method = "<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V", at = @At("RETURN"))
private void arclight$init(EntityType<? extends PaintingEntity> p_i50221_1_, World p_i50221_2_, CallbackInfo ci) {
private void arclight$init(EntityType<? extends PaintingEntity> type, World worldIn, CallbackInfo ci) {
final List<PaintingType> list = Lists.newArrayList(ForgeRegistries.PAINTING_TYPES.getValues());
this.art = list.get(this.rand.nextInt(list.size()));
}

View File

@ -72,7 +72,7 @@ public abstract class AbstractMinecartEntityMixin extends EntityMixin {
public double maxSpeed = 0.4D;
@Inject(method = "<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V", at = @At("RETURN"))
private void arclight$init(EntityType<?> type, World p_i48538_2_, CallbackInfo ci) {
private void arclight$init(EntityType<?> type, World worldIn, CallbackInfo ci) {
slowWhenEmpty = true;
derailedX = 0.5;
derailedY = 0.5;

View File

@ -27,14 +27,14 @@ public abstract class ContainerMinecartEntityMixin extends AbstractMinecartEntit
@Shadow private NonNullList<ItemStack> minecartContainerItems;
@Inject(method = "<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V", at = @At("RETURN"))
private void arclight$init(EntityType<?> p_i48536_1_, World p_i48536_2_, CallbackInfo ci) {
private void arclight$init(EntityType<?> type, World world, CallbackInfo ci) {
this.minecartContainerItems = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY);
maxStack = MAX_STACK;
transaction = new ArrayList<>();
}
@Inject(method = "<init>(Lnet/minecraft/entity/EntityType;DDDLnet/minecraft/world/World;)V", at = @At("RETURN"))
private void arclight$init(EntityType<?> p_i48537_1_, double p_i48537_2_, double p_i48537_4_, double p_i48537_6_, World p_i48537_8_, CallbackInfo ci) {
private void arclight$init(EntityType<?> type, double x, double y, double z, World world, CallbackInfo ci) {
this.minecartContainerItems = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY);
maxStack = MAX_STACK;
transaction = new ArrayList<>();

View File

@ -15,8 +15,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public abstract class RavagerEntityMixin extends CreatureEntityMixin {
@Redirect(method = "livingTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;destroyBlock(Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/entity/Entity;)Z"))
private boolean arclight$entityChangeBlock(World world, BlockPos pos, boolean p_225521_2_, Entity entityIn) {
private boolean arclight$entityChangeBlock(World world, BlockPos pos, boolean dropBlock, Entity entityIn) {
return !CraftEventFactory.callEntityChangeBlockEvent((RavagerEntity) (Object) this, pos, Blocks.AIR.getDefaultState()).isCancelled()
&& world.destroyBlock(pos, p_225521_2_, entityIn);
&& world.destroyBlock(pos, dropBlock, entityIn);
}
}

View File

@ -38,7 +38,7 @@ public abstract class SheepEntityMixin extends AnimalEntityMixin {
}
@Inject(method = "createDyeColorCraftingInventory", locals = LocalCapture.CAPTURE_FAILHARD, at = @At("RETURN"))
private static void arclight$resultInv(DyeColor p_213611_0_, DyeColor p_213611_1_, CallbackInfoReturnable<CraftingInventory> cir, CraftingInventory craftingInventory) {
private static void arclight$resultInv(DyeColor color, DyeColor color1, CallbackInfoReturnable<CraftingInventory> cir, CraftingInventory craftingInventory) {
((CraftingInventoryBridge) craftingInventory).bridge$setResultInventory(new CraftResultInventory());
}
}

View File

@ -151,7 +151,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen
@Shadow public int currentWindowId;
@Shadow public abstract void getNextWindowId();
@Shadow(remap = false) private String language;
@Shadow public abstract void teleport(ServerWorld p_200619_1_, double x, double y, double z, float yaw, float pitch);
@Shadow public abstract void teleport(ServerWorld newWorld, double x, double y, double z, float yaw, float pitch);
@Shadow public abstract void giveExperiencePoints(int p_195068_1_);
@Shadow private RegistryKey<World> field_241137_cq_;
@Shadow @Nullable public abstract BlockPos func_241140_K_();
@ -480,7 +480,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen
PlayerList playerlist = this.server.getPlayerList();
/*
IWorldInfo iworldinfo = server.getWorldInfo();
this.connection.sendPacket(new SRespawnPacket(server.func_230315_m_(), server.getDimensionKey(), BiomeManager.func_235200_a_(server.getSeed()), this.interactionManager.getGameType(), this.interactionManager.func_241815_c_(), server.isDebug(), server.func_241109_A_(), true));
this.connection.sendPacket(new SRespawnPacket(server.getDimensionType(), server.getDimensionKey(), BiomeManager.getHashedSeed(server.getSeed()), this.interactionManager.getGameType(), this.interactionManager.func_241815_c_(), server.isDebug(), server.func_241109_A_(), true));
this.connection.sendPacket(new SServerDifficultyPacket(iworldinfo.getDifficulty(), iworldinfo.isDifficultyLocked()));
PlayerList playerlist = this.server.getPlayerList();
playerlist.updatePermissionLevel((ServerPlayerEntity) (Object) this);

View File

@ -30,7 +30,7 @@ public abstract class BeaconContainerMixin extends ContainerMixin {
private PlayerInventory playerInventory;
@Inject(method = "<init>(ILnet/minecraft/inventory/IInventory;Lnet/minecraft/util/IIntArray;Lnet/minecraft/util/IWorldPosCallable;)V", at = @At("RETURN"))
public void arclight$init(int p_i50100_1_, IInventory inventory, IIntArray p_i50100_3_, IWorldPosCallable p_i50100_4_, CallbackInfo ci) {
public void arclight$init(int id, IInventory inventory, IIntArray p_i50100_3_, IWorldPosCallable worldPosCallable, CallbackInfo ci) {
this.playerInventory = (PlayerInventory) inventory;
}

View File

@ -28,7 +28,7 @@ public abstract class BrewingStandContainerMixin extends ContainerMixin {
private PlayerInventory playerInventory;
@Inject(method = "<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/inventory/IInventory;Lnet/minecraft/util/IIntArray;)V", at = @At("RETURN"))
public void arclight$init(int p_i50096_1_, PlayerInventory playerInventory, IInventory p_i50096_3_, IIntArray p_i50096_4_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IInventory inventory, IIntArray p_i50096_4_, CallbackInfo ci) {
this.playerInventory = playerInventory;
}

View File

@ -33,7 +33,7 @@ public abstract class CartographyContainerMixin extends ContainerMixin implement
private Player player;
@Inject(method = "<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/util/IWorldPosCallable;)V", at = @At("RETURN"))
public void arclight$init(int p_i50094_1_, PlayerInventory playerInventory, IWorldPosCallable p_i50094_3_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IWorldPosCallable worldPosCallable, CallbackInfo ci) {
this.player = ((ServerPlayerEntityBridge) playerInventory.player).bridge$getBukkitEntity();
}

View File

@ -70,7 +70,7 @@ public abstract class EnchantmentContainerMixin extends ContainerMixin implement
private PlayerInventory playerInventory;
@Inject(method = "<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/util/IWorldPosCallable;)V", at = @At("RETURN"))
public void arclight$init(int p_i50086_1_, PlayerInventory playerInventory, IWorldPosCallable p_i50086_3_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IWorldPosCallable worldPosCallable, CallbackInfo ci) {
this.playerInventory = playerInventory;
}

View File

@ -27,7 +27,7 @@ public abstract class HopperContainerMixin extends ContainerMixin {
private PlayerInventory playerInventory;
@Inject(method = "<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/inventory/IInventory;)V", at = @At("RETURN"))
public void arclight$init(int p_i50079_1_, PlayerInventory playerInventory, IInventory p_i50079_3_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IInventory inventory, CallbackInfo ci) {
this.playerInventory = playerInventory;
}

View File

@ -26,7 +26,7 @@ public abstract class HorseInventoryContainerMixin extends ContainerMixin {
PlayerInventory playerInventory;
@Inject(method = "<init>", at = @At("RETURN"))
public void arclight$init(int p_i50077_1_, PlayerInventory playerInventory, IInventory p_i50077_3_, AbstractHorseEntity p_i50077_4_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IInventory horseInventory, AbstractHorseEntity horse, CallbackInfo ci) {
this.playerInventory = playerInventory;
}

View File

@ -31,7 +31,7 @@ public abstract class LoomContainerMixin extends ContainerMixin implements PosCo
private PlayerInventory playerInventory;
@Inject(method = "<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/util/IWorldPosCallable;)V", at = @At("RETURN"))
public void arclight$init(int p_i50074_1_, PlayerInventory playerInventory, IWorldPosCallable p_i50074_3_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IWorldPosCallable worldCallable, CallbackInfo ci) {
this.playerInventory = playerInventory;
}

View File

@ -25,7 +25,7 @@ public abstract class ShulkerBoxContainerMixin extends ContainerMixin {
private PlayerInventory playerInventory;
@Inject(method = "<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/inventory/IInventory;)V", at = @At("RETURN"))
public void arclight$init(int p_i50066_1_, PlayerInventory playerInventory, IInventory p_i50066_3_, CallbackInfo ci) {
public void arclight$init(int id, PlayerInventory playerInventory, IInventory inventory, CallbackInfo ci) {
this.playerInventory = playerInventory;
}

View File

@ -53,9 +53,9 @@ public abstract class WorkbenchContainerMixin extends ContainerMixin implements
if (!bridge$isCheckReachable()) cir.setReturnValue(true);
}
private static void a(int p_217066_0_, World p_217066_1_, PlayerEntity p_217066_2_, CraftingInventory p_217066_3_, CraftResultInventory p_217066_4_, Container container) {
private static void a(int id, World world, PlayerEntity player, CraftingInventory inventory, CraftResultInventory inventoryResult, Container container) {
ArclightCaptures.captureWorkbenchContainer(container);
updateCraftingResult(p_217066_0_, p_217066_1_, p_217066_2_, p_217066_3_, p_217066_4_);
updateCraftingResult(id, world, player, inventory, inventoryResult);
}
@Inject(method = "onCraftMatrixChanged", at = @At("HEAD"))

View File

@ -26,8 +26,8 @@ import org.spongepowered.asm.mixin.Shadow;
@Mixin(BowItem.class)
public abstract class BowItemMixin extends ShootableItem {
public BowItemMixin(Properties p_i50040_1_) {
super(p_i50040_1_);
public BowItemMixin(Properties builder) {
super(builder);
}
// @formatter:off

View File

@ -36,7 +36,7 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
public abstract class BucketItemMixin {
// @formatter:off
@Shadow public abstract boolean tryPlaceContainedLiquid(@javax.annotation.Nullable PlayerEntity player, World worldIn, BlockPos posIn, @javax.annotation.Nullable BlockRayTraceResult p_180616_4_);
@Shadow public abstract boolean tryPlaceContainedLiquid(@javax.annotation.Nullable PlayerEntity player, World worldIn, BlockPos posIn, @javax.annotation.Nullable BlockRayTraceResult rayTrace);
// @formatter:on
@Inject(method = "onItemRightClick", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/block/IBucketPickupHandler;pickupFluid(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/Fluid;"))
@ -95,7 +95,7 @@ public abstract class BucketItemMixin {
private transient ItemStack arclight$stack;
@Inject(method = "tryPlaceContainedLiquid", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/DimensionType;isUltrawarm()Z"))
private void arclight$bucketEmpty(PlayerEntity player, World worldIn, BlockPos posIn, BlockRayTraceResult p_180616_4_, CallbackInfoReturnable<Boolean> cir) {
private void arclight$bucketEmpty(PlayerEntity player, World worldIn, BlockPos posIn, BlockRayTraceResult rayTrace, CallbackInfoReturnable<Boolean> cir) {
if (player != null) {
PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((ServerWorld) worldIn, player, posIn, arclight$click, arclight$direction, arclight$stack);
if (event.isCancelled()) {

View File

@ -38,8 +38,8 @@ public class FishingRodItemMixin extends Item {
if (playerIn.fishingBobber != null) {
if (!worldIn.isRemote) {
int i = playerIn.fishingBobber.handleHookRetraction(itemstack);
itemstack.damageItem(i, playerIn, (p_220000_1_) -> {
p_220000_1_.sendBreakAnimation(handIn);
itemstack.damageItem(i, playerIn, (player) -> {
player.sendBreakAnimation(handIn);
});
}

View File

@ -20,7 +20,7 @@ import java.util.Optional;
public class SpawnEggItemMixin {
@Inject(method = "getChildToSpawn", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;func_242417_l(Lnet/minecraft/entity/Entity;)V"))
private void arclight$reason(PlayerEntity p_234809_1_, MobEntity p_234809_2_, EntityType<? extends MobEntity> p_234809_3_, ServerWorld world, Vector3d p_234809_5_, ItemStack p_234809_6_, CallbackInfoReturnable<Optional<MobEntity>> cir) {
private void arclight$reason(PlayerEntity player, MobEntity mob, EntityType<? extends MobEntity> entityType, ServerWorld world, Vector3d pos, ItemStack stack, CallbackInfoReturnable<Optional<MobEntity>> cir) {
((WorldBridge) world).bridge$pushAddEntityReason(CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
}
}

View File

@ -70,7 +70,7 @@ public abstract class RecipeManagerMixin implements RecipeManagerBridge {
LOGGER.info("Skipping loading recipe {} as it's serializer returned null", resourcelocation);
continue;
}
map.computeIfAbsent(irecipe.getType(), (p_223391_0_) -> new Object2ObjectLinkedOpenHashMap<>())
map.computeIfAbsent(irecipe.getType(), (recipeType) -> new Object2ObjectLinkedOpenHashMap<>())
.putAndMoveToFirst(resourcelocation, irecipe);
} catch (IllegalArgumentException | JsonParseException jsonparseexception) {
LOGGER.error("Parsing error loading recipe {}", resourcelocation, jsonparseexception);
@ -87,8 +87,8 @@ public abstract class RecipeManagerMixin implements RecipeManagerBridge {
*/
@Overwrite
public <C extends IInventory, T extends IRecipe<C>> Optional<T> getRecipe(IRecipeType<T> recipeTypeIn, C inventoryIn, World worldIn) {
Optional<T> optional = this.getRecipes(recipeTypeIn).values().stream().flatMap((p_215372_3_) -> {
return Util.streamOptional(recipeTypeIn.matches(p_215372_3_, worldIn, inventoryIn));
Optional<T> optional = this.getRecipes(recipeTypeIn).values().stream().flatMap((recipe) -> {
return Util.streamOptional(recipeTypeIn.matches(recipe, worldIn, inventoryIn));
}).findFirst();
((IInventoryBridge) inventoryIn).setCurrentRecipe(optional.orElse(null));
return optional;

View File

@ -27,7 +27,7 @@ public abstract class LootTableMixin implements LootTableBridge {
@Shadow @Final private static Logger LOGGER;
@Shadow public abstract List<ItemStack> generate(LootContext context);
@Shadow protected abstract List<Integer> getEmptySlotsRandomized(IInventory inventory, Random rand);
@Shadow protected abstract void shuffleItems(List<ItemStack> stacks, int p_186463_2_, Random rand);
@Shadow protected abstract void shuffleItems(List<ItemStack> stacks, int emptySlotsCount, Random rand);
// @formatter:on
@Eject(method = "fillInventory", at = @At(value = "INVOKE", target = "Lnet/minecraft/loot/LootTable;generate(Lnet/minecraft/loot/LootContext;)Ljava/util/List;"))

View File

@ -1631,7 +1631,7 @@ public abstract class ServerPlayNetHandlerMixin implements ServerPlayNetHandlerB
}
@Redirect(method = "processUpdateSign", at = @At(value = "INVOKE", target = "Lnet/minecraft/tileentity/SignTileEntity;setText(ILnet/minecraft/util/text/ITextComponent;)V"))
public void arclight$onSignChangePost(SignTileEntity signTileEntity, int line, ITextComponent p_212365_2_) {
public void arclight$onSignChangePost(SignTileEntity signTileEntity, int line, ITextComponent signText) {
if (arclight$lines != null) {
signTileEntity.setText(line, arclight$lines[line]);
if (line == arclight$lines.length - 1) {

View File

@ -117,7 +117,7 @@ public abstract class MinecraftServerMixin extends RecursiveEventLoop<TickDelaye
@Shadow public abstract ServerWorld func_241755_D_();
@Shadow @Final public Map<RegistryKey<World>, ServerWorld> worlds;
@Shadow protected abstract void func_240778_a_(IServerConfiguration p_240778_1_);
@Shadow protected IServerConfiguration field_240768_i_;
@Shadow protected IServerConfiguration serverConfig;
@Shadow private static void func_240786_a_(ServerWorld p_240786_0_, IServerWorldInfo p_240786_1_, boolean hasBonusChest, boolean p_240786_3_, boolean p_240786_4_) { }
@Shadow @Deprecated public abstract void markWorldsDirty();
// @formatter:on
@ -155,7 +155,7 @@ public abstract class MinecraftServerMixin extends RecursiveEventLoop<TickDelaye
}
@Inject(method = "<init>", at = @At("RETURN"))
public void arclight$loadOptions(Thread p_i232576_1_, DynamicRegistries.Impl p_i232576_2_, SaveFormat.LevelSave p_i232576_3_, IServerConfiguration p_i232576_4_, ResourcePackList p_i232576_5_, Proxy p_i232576_6_, DataFixer p_i232576_7_, DataPackRegistries p_i232576_8_, MinecraftSessionService p_i232576_9_, GameProfileRepository p_i232576_10_, PlayerProfileCache p_i232576_11_, IChunkStatusListenerFactory p_i232576_12_, CallbackInfo ci) {
public void arclight$loadOptions(Thread serverThread, DynamicRegistries.Impl p_i232576_2_, SaveFormat.LevelSave anvilConverterForAnvilFile, IServerConfiguration p_i232576_4_, ResourcePackList dataPacks, Proxy serverProxy, DataFixer dataFixer, DataPackRegistries dataRegistries, MinecraftSessionService sessionService, GameProfileRepository profileRepo, PlayerProfileCache profileCache, IChunkStatusListenerFactory chunkStatusListenerFactory, CallbackInfo ci) {
String[] arguments = ManagementFactory.getRuntimeMXBean().getInputArguments().toArray(new String[0]);
OptionParser parser = new BukkitOptionParser();
try {
@ -388,7 +388,7 @@ public abstract class MinecraftServerMixin extends RecursiveEventLoop<TickDelaye
func_240786_a_(serverWorld, worldInfo, generatorSettings.hasBonusChest(), flag, true);
worldInfo.setInitialized(true);
if (flag) {
this.func_240778_a_(this.field_240768_i_);
this.func_240778_a_(this.serverConfig);
}
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception initializing level");

View File

@ -82,10 +82,10 @@ public abstract class AbstractFurnaceTileEntityMixin extends LockableTileEntityM
* @reason
*/
@Overwrite
private void smelt(@Nullable IRecipe<?> p_214007_1_) {
if (p_214007_1_ != null && this.canSmelt(p_214007_1_)) {
private void smelt(@Nullable IRecipe<?> recipe) {
if (recipe != null && this.canSmelt(recipe)) {
ItemStack itemstack = this.items.get(0);
ItemStack itemstack1 = p_214007_1_.getRecipeOutput();
ItemStack itemstack1 = recipe.getRecipeOutput();
ItemStack itemstack2 = this.items.get(2);
CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
@ -112,7 +112,7 @@ public abstract class AbstractFurnaceTileEntityMixin extends LockableTileEntityM
}
if (!this.world.isRemote) {
this.setRecipeUsed(p_214007_1_);
this.setRecipeUsed(recipe);
}
if (itemstack.getItem() == Blocks.WET_SPONGE.asItem() && !this.items.get(1).isEmpty() && this.items.get(1).getItem() == Items.BUCKET) {

View File

@ -31,22 +31,22 @@ public interface IWorldPosCallableMixin extends IWorldPosCallableBridge {
* @reason
*/
@Overwrite
static IWorldPosCallable of(final World p_221488_0_, final BlockPos p_221488_1_) {
static IWorldPosCallable of(final World world, final BlockPos pos) {
class Anonymous implements IWorldPosCallable, IWorldPosCallableBridge {
@Override
public <T> Optional<T> apply(BiFunction<World, BlockPos, T> p_221484_1_) {
return Optional.of(p_221484_1_.apply(p_221488_0_, p_221488_1_));
public <T> Optional<T> apply(BiFunction<World, BlockPos, T> worldPosConsumer) {
return Optional.of(worldPosConsumer.apply(world, pos));
}
@Override
public World bridge$getWorld() {
return p_221488_0_;
return world;
}
@Override
public BlockPos bridge$getPosition() {
return p_221488_1_;
return pos;
}
}
return new Anonymous();

View File

@ -21,18 +21,18 @@ public class ColorMixin {
public TextFormatting format;
public void arclight$constructor(int p_i232573_1_) {
public void arclight$constructor(int color) {
throw new RuntimeException();
}
public void arclight$constructor(int p_i232573_1_, String p_i232573_2_, TextFormatting textFormatting) {
arclight$constructor(p_i232573_1_);
this.name = p_i232573_2_;
public void arclight$constructor(int color, String name, TextFormatting textFormatting) {
arclight$constructor(color);
this.name = name;
this.format = textFormatting;
}
@Inject(method = "<init>(ILjava/lang/String;)V", at = @At("RETURN"))
private void arclight$withFormat(int p_i232573_1_, String name, CallbackInfo ci) {
private void arclight$withFormat(int color, String name, CallbackInfo ci) {
this.format = TextFormatting.getValueByName(name);
}
}

View File

@ -76,7 +76,7 @@ public abstract class ExplosionMixin implements ExplosionBridge {
@Accessor("mode") public abstract Explosion.Mode bridge$getMode();
@Shadow @Final private boolean causesFire;
@Shadow @Final private Random random;
@Shadow private static void handleExplosionDrops(ObjectArrayList<Pair<ItemStack, BlockPos>> p_229976_0_, ItemStack p_229976_1_, BlockPos p_229976_2_) { }
@Shadow private static void handleExplosionDrops(ObjectArrayList<Pair<ItemStack, BlockPos>> dropPositionArray, ItemStack stack, BlockPos pos) { }
// @formatter:on
@Shadow @Final private ExplosionContext context;
@ -241,8 +241,8 @@ public abstract class ExplosionMixin implements ExplosionBridge {
lootcontext$builder.withParameter(LootParameters.EXPLOSION_RADIUS, 1.0F / yield);
}
blockstate.getDrops(lootcontext$builder).forEach((p_229977_2_) -> {
handleExplosionDrops(objectarraylist, p_229977_2_, blockpos1);
blockstate.getDrops(lootcontext$builder).forEach((stack) -> {
handleExplosionDrops(objectarraylist, stack, blockpos1);
});
}
@ -269,7 +269,7 @@ public abstract class ExplosionMixin implements ExplosionBridge {
}
@Inject(method = "handleExplosionDrops", cancellable = true, at = @At("HEAD"))
private static void arclight$fix(ObjectArrayList<Pair<ItemStack, BlockPos>> p_229976_0_, ItemStack stack, BlockPos p_229976_2_, CallbackInfo ci) {
private static void arclight$fix(ObjectArrayList<Pair<ItemStack, BlockPos>> dropPositionArray, ItemStack stack, BlockPos pos, CallbackInfo ci) {
if (stack.isEmpty()) ci.cancel();
}

View File

@ -20,7 +20,7 @@ public interface IBlockReaderMixin extends IBlockReaderBridge {
// @formatter:off
@Shadow BlockState getBlockState(BlockPos pos);
@Shadow FluidState getFluidState(BlockPos pos);
@Shadow @Nullable BlockRayTraceResult rayTraceBlocks(Vector3d p_217296_1_, Vector3d p_217296_2_, BlockPos p_217296_3_, VoxelShape p_217296_4_, BlockState p_217296_5_);
@Shadow @Nullable BlockRayTraceResult rayTraceBlocks(Vector3d startVec, Vector3d endVec, BlockPos pos, VoxelShape shape, BlockState state);
// @formatter:on
default BlockRayTraceResult rayTraceBlock(RayTraceContext context, BlockPos pos) {

View File

@ -32,9 +32,9 @@ import java.util.Optional;
public abstract class TeleporterMixin implements TeleporterBridge {
// @formatter:off
@Shadow public abstract Optional<TeleportationRepositioner.Result> makePortal(BlockPos p_242956_1_, Direction.Axis p_242956_2_);
@Shadow public abstract Optional<TeleportationRepositioner.Result> makePortal(BlockPos pos, Direction.Axis axis);
@Shadow @Final protected ServerWorld world;
@Shadow public abstract Optional<TeleportationRepositioner.Result> getExistingPortal(BlockPos p_242957_1_, boolean p_242957_2_);
@Shadow public abstract Optional<TeleportationRepositioner.Result> getExistingPortal(BlockPos pos, boolean isNether);
// @formatter:on
@ModifyVariable(method = "getExistingPortal", index = 4, at = @At(value = "INVOKE", target = "Lnet/minecraft/village/PointOfInterestManager;ensureLoadedAndValid(Lnet/minecraft/world/IWorldReader;Lnet/minecraft/util/math/BlockPos;I)V"))

View File

@ -76,22 +76,22 @@ public abstract class TrackedEntityMixin implements TrackedEntityBridge {
@Shadow @Final private boolean sendVelocityUpdates;
@Shadow private Vector3d velocity;
@Shadow private int encodedRotationYawHead;
@Shadow protected abstract void sendPacket(IPacket<?> p_219451_1_);
@Shadow protected abstract void sendPacket(IPacket<?> packet);
// @formatter:on
private Set<ServerPlayerEntity> trackedPlayers;
@Inject(method = "<init>", at = @At("RETURN"))
private void arclight$init(ServerWorld p_i50704_1_, Entity p_i50704_2_, int p_i50704_3_, boolean p_i50704_4_, Consumer<IPacket<?>> p_i50704_5_, CallbackInfo ci) {
private void arclight$init(ServerWorld serverWorld, Entity entity, int updateFrequency, boolean sendVelocityUpdates, Consumer<IPacket<?>> packetConsumer, CallbackInfo ci) {
trackedPlayers = new HashSet<>();
}
public void arclight$constructor(ServerWorld p_i50704_1_, Entity p_i50704_2_, int p_i50704_3_, boolean p_i50704_4_, Consumer<IPacket<?>> p_i50704_5_) {
public void arclight$constructor(ServerWorld serverWorld, Entity entity, int updateFrequency, boolean sendVelocityUpdates, Consumer<IPacket<?>> packetConsumer) {
throw new NullPointerException();
}
public void arclight$constructor(ServerWorld p_i50704_1_, Entity p_i50704_2_, int p_i50704_3_, boolean p_i50704_4_, Consumer<IPacket<?>> p_i50704_5_, Set<ServerPlayerEntity> set) {
arclight$constructor(p_i50704_1_, p_i50704_2_, p_i50704_3_, p_i50704_4_, p_i50704_5_);
public void arclight$constructor(ServerWorld serverWorld, Entity entity, int updateFrequency, boolean sendVelocityUpdates, Consumer<IPacket<?>> packetConsumer, Set<ServerPlayerEntity> set) {
arclight$constructor(serverWorld, entity, updateFrequency, sendVelocityUpdates, packetConsumer);
this.trackedPlayers = set;
}

View File

@ -74,19 +74,19 @@ public abstract class WorldMixin implements WorldBridge {
protected org.bukkit.World.Environment environment;
public org.spigotmc.SpigotWorldConfig spigotConfig;
public void arclight$constructor(ISpawnWorldInfo p_i241925_1_, RegistryKey<World> p_i241925_2_, final DimensionType p_i241925_3_, Supplier<IProfiler> p_i241925_4_, boolean p_i241925_5_, boolean p_i241925_6_, long p_i241925_7_) {
public void arclight$constructor(ISpawnWorldInfo worldInfo, RegistryKey<World> dimension, final DimensionType dimensionType, Supplier<IProfiler> profiler, boolean isRemote, boolean isDebug, long seed) {
throw new RuntimeException();
}
public void arclight$constructor(ISpawnWorldInfo p_i241925_1_, RegistryKey<World> p_i241925_2_, final DimensionType p_i241925_3_, Supplier<IProfiler> p_i241925_4_, boolean p_i241925_5_, boolean p_i241925_6_, long p_i241925_7_, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
arclight$constructor(p_i241925_1_, p_i241925_2_, p_i241925_3_, p_i241925_4_, p_i241925_5_, p_i241925_6_, p_i241925_7_);
public void arclight$constructor(ISpawnWorldInfo worldInfo, RegistryKey<World> dimension, final DimensionType dimensionType, Supplier<IProfiler> profiler, boolean isRemote, boolean isDebug, long seed, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
arclight$constructor(worldInfo, dimension, dimensionType, profiler, isRemote, isDebug, seed);
this.generator = gen;
this.environment = env;
bridge$getWorld();
}
@Inject(method = "<init>(Lnet/minecraft/world/storage/ISpawnWorldInfo;Lnet/minecraft/util/RegistryKey;Lnet/minecraft/world/DimensionType;Ljava/util/function/Supplier;ZZJ)V", at = @At("RETURN"))
private void arclight$init(ISpawnWorldInfo info, RegistryKey<World> p_i241925_2_, DimensionType dimType, Supplier<IProfiler> p_i241925_4_, boolean p_i241925_5_, boolean p_i241925_6_, long p_i241925_7_, CallbackInfo ci) {
private void arclight$init(ISpawnWorldInfo info, RegistryKey<World> dimension, DimensionType dimType, Supplier<IProfiler> profiler, boolean isRemote, boolean isDebug, long seed, CallbackInfo ci) {
this.spigotConfig = new SpigotWorldConfig(((IServerWorldInfo) info).getWorldName());
((WorldBorderBridge) this.worldBorder).bridge$setWorld((ServerWorld) (Object) this);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns();

View File

@ -151,7 +151,7 @@ public abstract class ChunkMixin implements ChunkBridge {
@Inject(method = "<init>(Lnet/minecraft/world/World;Lnet/minecraft/world/chunk/ChunkPrimer;)V",
at = @At("RETURN"))
public void arclight$setNeedsDecoration(World worldIn, ChunkPrimer p_i49947_2_, CallbackInfo ci) {
public void arclight$setNeedsDecoration(World worldIn, ChunkPrimer primer, CallbackInfo ci) {
this.needsDecoration = true;
}

View File

@ -53,6 +53,6 @@ public abstract class WorldGenRegionMixin implements WorldBridge {
*/
@Overwrite
public Stream<? extends StructureStart<?>> func_241827_a(SectionPos p_241827_1_, Structure<?> p_241827_2_) {
return this.world.func_241112_a_().func_241464_a_((WorldGenRegion) (Object) this).func_235011_a_(p_241827_1_, p_241827_2_);
return this.world.func_241112_a_().getStructureManager((WorldGenRegion) (Object) this).func_235011_a_(p_241827_1_, p_241827_2_);
}
}

View File

@ -406,13 +406,13 @@ public abstract class ServerWorldMixin extends WorldMixin implements ServerWorld
}
}
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;func_241114_a_(J)V"))
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setDayTime(J)V"))
private void arclight$timeSkip(ServerWorld world, long time) {
TimeSkipEvent event = new TimeSkipEvent(this.bridge$getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (time - time % 24000L) - this.getDayTime());
Bukkit.getPluginManager().callEvent(event);
arclight$timeSkipCancelled = event.isCancelled();
if (!event.isCancelled()) {
world.func_241114_a_(this.getDayTime() + event.getSkipAmount());
world.setDayTime(this.getDayTime() + event.getSkipAmount());
this.allPlayersSleeping = this.players.stream().allMatch(LivingEntity::isSleeping);
}
}

View File

@ -115,8 +115,8 @@ public class DelegateWorldInfo extends ServerWorldInfo {
}
@Override
public void setSpawnAngle(float p_241859_1_) {
derivedWorldInfo.setSpawnAngle(p_241859_1_);
public void setSpawnAngle(float angle) {
derivedWorldInfo.setSpawnAngle(angle);
}
@Override
@ -130,8 +130,8 @@ public class DelegateWorldInfo extends ServerWorldInfo {
}
@Override
public void setSpawn(BlockPos spawnPoint, float p_176143_2_) {
derivedWorldInfo.setSpawn(spawnPoint, p_176143_2_);
public void setSpawn(BlockPos spawnPoint, float angle) {
derivedWorldInfo.setSpawn(spawnPoint, angle);
}
@Override

View File

@ -42,7 +42,7 @@ configurations {
}
minecraft {
mappings channel: 'snapshot', version: "20200916-1.16.2"
mappings channel: 'snapshot', version: "20201028-1.16.3"
accessTransformer = project(':arclight-common').file('src/main/resources/META-INF/accesstransformer.cfg')
}