Update mappings 20200916, 1.16.3 (#49)(#52)

Fix UUID not sent in chat packet, close #52.
This commit is contained in:
IzzelAliz 2020-09-18 09:21:59 +08:00
parent 8d0dad9e47
commit b7e47a47ed
35 changed files with 145 additions and 83 deletions

View File

@ -20,8 +20,8 @@ apply plugin: 'idea'
apply plugin: 'io.izzel.arclight' apply plugin: 'io.izzel.arclight'
ext { ext {
minecraftVersion = '1.16.2' minecraftVersion = '1.16.3'
forgeVersion = '33.0.22' forgeVersion = '34.0.8'
} }
arclight { arclight {
@ -36,7 +36,7 @@ arclight {
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
minecraft { minecraft {
mappings channel: 'snapshot', version: "20200820-1.16.1" mappings channel: 'snapshot', version: "20200916-1.16.2"
accessTransformer = project.file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = project.file('src/main/resources/META-INF/accesstransformer.cfg')
} }
@ -55,7 +55,7 @@ dependencies {
minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion" minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion"
compile "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT@jar" compile "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT@jar"
compile 'org.jetbrains:annotations:19.0.0' compile 'org.jetbrains:annotations:19.0.0'
compile 'org.spongepowered:mixin:0.8' compile 'org.spongepowered:mixin:0.8.1'
compile 'com.github.ArclightTeam:mixin-tools:1.0.0' compile 'com.github.ArclightTeam:mixin-tools:1.0.0'
compile 'jline:jline:2.12.1' compile 'jline:jline:2.12.1'
compile 'net.md-5:SpecialSource:1.8.6' compile 'net.md-5:SpecialSource:1.8.6'

View File

@ -11,5 +11,54 @@ net/minecraft/entity/monster/MonsterEntity net/minecraft/entity/monster/MonsterE
setAttackTarget (Lnet/minecraft/entity/LivingEntity;)V func_70624_b setAttackTarget (Lnet/minecraft/entity/LivingEntity;)V func_70624_b
net/minecraft/entity/passive/WolfEntity net/minecraft/entity/passive/WolfEntity net/minecraft/entity/passive/WolfEntity net/minecraft/entity/passive/WolfEntity
setHealth (F)V func_70606_j setHealth (F)V func_70606_j
heal (F)V func_70691_i
net/minecraft/block/BlockState net/minecraft/block/BlockState net/minecraft/block/BlockState net/minecraft/block/BlockState
get (Lnet/minecraft/state/Property;)Ljava/lang/Comparable; func_177229_b get (Lnet/minecraft/state/Property;)Ljava/lang/Comparable; func_177229_b
net/minecraft/entity/item/ArmorStandEntity net/minecraft/entity/item/ArmorStandEntity
remove ()V func_70106_y
setLocationAndAngles (DDDFF)V func_70012_b
net/minecraft/entity/merchant/villager/VillagerEntity net/minecraft/entity/merchant/villager/VillagerEntity
addPotionEffect (Lnet/minecraft/potion/EffectInstance;)Z func_195064_c
net/minecraft/entity/monster/SpiderEntity net/minecraft/entity/monster/SpiderEntity
addPotionEffect (Lnet/minecraft/potion/EffectInstance;)Z func_195064_c
net/minecraft/entity/monster/WitchEntity net/minecraft/entity/monster/WitchEntity
addPotionEffect (Lnet/minecraft/potion/EffectInstance;)Z func_195064_c
net/minecraft/entity/passive/ParrotEntity net/minecraft/entity/passive/ParrotEntity
addPotionEffect (Lnet/minecraft/potion/EffectInstance;)Z func_195064_c
net/minecraft/entity/monster/ZombieVillagerEntity net/minecraft/entity/monster/ZombieVillagerEntity
addPotionEffect (Lnet/minecraft/potion/EffectInstance;)Z func_195064_c
removePotionEffect (Lnet/minecraft/potion/Effect;)Z func_195063_d
net/minecraft/entity/MobEntity net/minecraft/entity/MobEntity
entityDropItem (Lnet/minecraft/util/IItemProvider;)Lnet/minecraft/entity/item/ItemEntity; func_199703_a
net/minecraft/entity/passive/ChickenEntity net/minecraft/entity/passive/ChickenEntity
entityDropItem (Lnet/minecraft/util/IItemProvider;)Lnet/minecraft/entity/item/ItemEntity; func_199703_a
net/minecraft/entity/passive/SheepEntity net/minecraft/entity/passive/SheepEntity
entityDropItem (Lnet/minecraft/util/IItemProvider;I)Lnet/minecraft/entity/item/ItemEntity; func_199702_a
net/minecraft/entity/passive/TurtleEntity net/minecraft/entity/passive/TurtleEntity
entityDropItem (Lnet/minecraft/util/IItemProvider;I)Lnet/minecraft/entity/item/ItemEntity; func_199702_a
net/minecraft/entity/monster/AbstractSkeletonEntity net/minecraft/entity/monster/AbstractSkeletonEntity
playSound (Lnet/minecraft/util/SoundEvent;FF)V func_184185_a
net/minecraft/entity/projectile/FishingBobberEntity net/minecraft/entity/projectile/FishingBobberEntity
playSound (Lnet/minecraft/util/SoundEvent;FF)V func_184185_a
net/minecraft/entity/monster/CreeperEntity net/minecraft/entity/monster/CreeperEntity
dataManager field_70180_af
net/minecraft/entity/passive/DolphinEntity net/minecraft/entity/passive/DolphinEntity
setItemStackToSlot (Lnet/minecraft/inventory/EquipmentSlotType;Lnet/minecraft/item/ItemStack;)V func_184201_a
net/minecraft/entity/monster/ShulkerEntity net/minecraft/entity/monster/ShulkerEntity
forceSetPosition (DDD)V func_226286_f_
net/minecraft/entity/passive/horse/AbstractHorseEntity net/minecraft/entity/passive/horse/AbstractHorseEntity
heal (F)V func_70691_i
net/minecraft/entity/player/ServerPlayerEntity net/minecraft/entity/player/ServerPlayerEntity
ticksExisted field_70173_aa
addPotionEffect (Lnet/minecraft/potion/EffectInstance;)Z func_195064_c
net/minecraft/entity/player/PlayerEntity net/minecraft/entity/player/PlayerEntity
rotationYaw field_70177_z
setFlag (IZ)V func_70052_a
net/minecraft/block/SweetBerryBushBlock net/minecraft/block/SweetBerryBushBlock
spawnAsEntity (Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;)V func_180635_a
net/minecraft/entity/passive/TameableEntity net/minecraft/entity/passive/TameableEntity
setLocationAndAngles (DDDFF)V func_70012_b
net/minecraft/entity/boss/dragon/EnderDragonEntity net/minecraft/entity/boss/dragon/EnderDragonEntity
setHealth (F)V func_70606_j
net/minecraft/entity/monster/AbstractRaiderEntity net/minecraft/entity/monster/AbstractRaiderEntity
setAttackTarget (Lnet/minecraft/entity/LivingEntity;)V func_70624_b

View File

@ -16,7 +16,7 @@ public class IceBlockMixin {
@Inject(method = "turnIntoWater", cancellable = true, at = @At("HEAD")) @Inject(method = "turnIntoWater", cancellable = true, at = @At("HEAD"))
public void arclight$blockFade(BlockState blockState, World world, BlockPos blockPos, CallbackInfo ci) { public void arclight$blockFade(BlockState blockState, World world, BlockPos blockPos, CallbackInfo ci) {
if (CraftEventFactory.callBlockFadeEvent(world, blockPos, world.func_230315_m_().func_236040_e_() if (CraftEventFactory.callBlockFadeEvent(world, blockPos, world.getDimensionType().isUltrawarm()
? Blocks.AIR.getDefaultState() : Blocks.WATER.getDefaultState()).isCancelled()) { ? Blocks.AIR.getDefaultState() : Blocks.WATER.getDefaultState()).isCancelled()) {
ci.cancel(); ci.cancel();
} }

View File

@ -19,7 +19,7 @@ public abstract class RedstoneWireBlockMixin {
@Shadow protected abstract int getStrongestSignal(World world, BlockPos pos); @Shadow protected abstract int getStrongestSignal(World world, BlockPos pos);
// @formatter:on // @formatter:on
@Redirect(method = "func_235547_a_", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/RedstoneWireBlock;getStrongestSignal(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I")) @Redirect(method = "updatePower", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/RedstoneWireBlock;getStrongestSignal(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I"))
public int arclight$blockRedstone(RedstoneWireBlock redstoneWireBlock, World world, BlockPos pos, World world1, BlockPos pos1, BlockState state) { public int arclight$blockRedstone(RedstoneWireBlock redstoneWireBlock, World world, BlockPos pos, World world1, BlockPos pos1, BlockState state) {
int i = this.getStrongestSignal(world, pos); int i = this.getStrongestSignal(world, pos);
int oldPower = state.get(RedstoneWireBlock.POWER); int oldPower = state.get(RedstoneWireBlock.POWER);

View File

@ -21,11 +21,11 @@ public abstract class VineBlockMixin extends BlockMixin {
// @formatter:off // @formatter:off
@Shadow public static BooleanProperty getPropertyFor(Direction side) { return null; } @Shadow public static BooleanProperty getPropertyFor(Direction side) { return null; }
@Shadow protected abstract boolean func_196539_a(IBlockReader p_196539_1_, BlockPos p_196539_2_); @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 public static boolean canAttachTo(IBlockReader p_196542_0_, BlockPos worldIn, Direction neighborPos) { return false; }
@Shadow @Final public static BooleanProperty UP; @Shadow @Final public static BooleanProperty UP;
@Shadow protected abstract boolean func_196541_a(IBlockReader p_196541_1_, BlockPos p_196541_2_, Direction p_196541_3_); @Shadow protected abstract boolean hasAttachment(IBlockReader p_196541_1_, BlockPos p_196541_2_, Direction p_196541_3_);
@Shadow protected abstract boolean func_196540_x(BlockState p_196540_1_); @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 BlockState func_196544_a(BlockState p_196544_1_, BlockState p_196544_2_, Random p_196544_3_);
// @formatter:on // @formatter:on
@ -40,7 +40,7 @@ public abstract class VineBlockMixin extends BlockMixin {
Direction direction = Direction.getRandomDirection(random); Direction direction = Direction.getRandomDirection(random);
BlockPos blockpos = pos.up(); BlockPos blockpos = pos.up();
if (direction.getAxis().isHorizontal() && !state.get(getPropertyFor(direction))) { if (direction.getAxis().isHorizontal() && !state.get(getPropertyFor(direction))) {
if (this.func_196539_a(worldIn, pos)) { if (this.hasVineBelow(worldIn, pos)) {
BlockPos blockpos4 = pos.offset(direction); BlockPos blockpos4 = pos.offset(direction);
BlockState blockstate4 = worldIn.getBlockState(blockpos4); BlockState blockstate4 = worldIn.getBlockState(blockpos4);
if (blockstate4.isAir(worldIn, blockpos4)) { if (blockstate4.isAir(worldIn, blockpos4)) {
@ -71,13 +71,13 @@ public abstract class VineBlockMixin extends BlockMixin {
} }
} else { } else {
if (direction == Direction.UP && pos.getY() < 255) { if (direction == Direction.UP && pos.getY() < 255) {
if (this.func_196541_a(worldIn, pos, direction)) { if (this.hasAttachment(worldIn, pos, direction)) {
worldIn.setBlockState(pos, state.with(UP, Boolean.TRUE), 2); worldIn.setBlockState(pos, state.with(UP, Boolean.TRUE), 2);
return; return;
} }
if (worldIn.isAirBlock(blockpos)) { if (worldIn.isAirBlock(blockpos)) {
if (!this.func_196539_a(worldIn, pos)) { if (!this.hasVineBelow(worldIn, pos)) {
return; return;
} }
@ -89,7 +89,7 @@ public abstract class VineBlockMixin extends BlockMixin {
} }
} }
if (this.func_196540_x(blockstate3)) { if (this.isFacingCardinal(blockstate3)) {
CraftEventFactory.handleBlockSpreadEvent(worldIn, pos, blockpos, blockstate3, 2); CraftEventFactory.handleBlockSpreadEvent(worldIn, pos, blockpos, blockstate3, 2);
} }
@ -103,7 +103,7 @@ public abstract class VineBlockMixin extends BlockMixin {
if (blockstate.isAir(worldIn, blockpos) || blockstate.isIn((Block) (Object) this)) { if (blockstate.isAir(worldIn, blockpos) || blockstate.isIn((Block) (Object) this)) {
BlockState blockstate1 = blockstate.isAir() ? this.getDefaultState() : blockstate; BlockState blockstate1 = blockstate.isAir() ? this.getDefaultState() : blockstate;
BlockState blockstate2 = this.func_196544_a(state, blockstate1, random); BlockState blockstate2 = this.func_196544_a(state, blockstate1, random);
if (blockstate1 != blockstate2 && this.func_196540_x(blockstate2)) { if (blockstate1 != blockstate2 && this.isFacingCardinal(blockstate2)) {
CraftEventFactory.handleBlockSpreadEvent(worldIn, pos, blockpos1, blockstate2, 2); CraftEventFactory.handleBlockSpreadEvent(worldIn, pos, blockpos1, blockstate2, 2);
} }
} }

View File

@ -35,7 +35,7 @@ public class FrostWalkerEnchantmentMixin {
if (blockstate1.isAir(worldIn, blockpos$mutable)) { if (blockstate1.isAir(worldIn, blockpos$mutable)) {
BlockState blockstate2 = worldIn.getBlockState(blockpos); BlockState blockstate2 = worldIn.getBlockState(blockpos);
boolean isFull = blockstate2.getBlock() == Blocks.WATER && blockstate2.get(FlowingFluidBlock.LEVEL) == 0; //TODO: Forge, modded waters? boolean isFull = blockstate2.getBlock() == Blocks.WATER && blockstate2.get(FlowingFluidBlock.LEVEL) == 0; //TODO: Forge, modded waters?
if (blockstate2.getMaterial() == Material.WATER && isFull && blockstate.isValidPosition(worldIn, blockpos) && worldIn.func_226663_a_(blockstate, blockpos, ISelectionContext.dummy()) && !net.minecraftforge.event.ForgeEventFactory.onBlockPlace(living, net.minecraftforge.common.util.BlockSnapshot.create(worldIn.getDimensionKey(), worldIn, blockpos), net.minecraft.util.Direction.UP)) { if (blockstate2.getMaterial() == Material.WATER && isFull && blockstate.isValidPosition(worldIn, blockpos) && worldIn.placedBlockCollides(blockstate, blockpos, ISelectionContext.dummy()) && !net.minecraftforge.event.ForgeEventFactory.onBlockPlace(living, net.minecraftforge.common.util.BlockSnapshot.create(worldIn.getDimensionKey(), worldIn, blockpos), net.minecraft.util.Direction.UP)) {
if (CraftEventFactory.handleBlockFormEvent(worldIn, blockpos, blockstate, living)) { if (CraftEventFactory.handleBlockFormEvent(worldIn, blockpos, blockstate, living)) {
worldIn.getPendingBlockTicks().scheduleTick(blockpos, Blocks.FROSTED_ICE, MathHelper.nextInt(living.getRNG(), 60, 120)); worldIn.getPendingBlockTicks().scheduleTick(blockpos, Blocks.FROSTED_ICE, MathHelper.nextInt(living.getRNG(), 60, 120));
} }

View File

@ -825,7 +825,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
Entity entity = this.getType().create(world); Entity entity = this.getType().create(world);
if (entity != null) { if (entity != null) {
entity.copyDataFromOld((Entity) (Object) this); entity.copyDataFromOld((Entity) (Object) this);
entity.setLocationAndAngles(portalinfo.pos.x, portalinfo.pos.y, portalinfo.pos.z, portalinfo.field_242960_c, entity.rotationPitch); entity.setLocationAndAngles(portalinfo.pos.x, portalinfo.pos.y, portalinfo.pos.z, portalinfo.rotationYaw, entity.rotationPitch);
entity.setMotion(portalinfo.motion); entity.setMotion(portalinfo.motion);
world.addFromAnotherDimension(entity); world.addFromAnotherDimension(entity);
if (((WorldBridge) world).bridge$getTypeKey() == DimensionType.THE_END) { if (((WorldBridge) world).bridge$getTypeKey() == DimensionType.THE_END) {
@ -876,7 +876,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
double d1 = Math.max(-2.9999872E7D, worldborder.minZ() + 16.0D); double d1 = Math.max(-2.9999872E7D, worldborder.minZ() + 16.0D);
double d2 = Math.min(2.9999872E7D, worldborder.maxX() - 16.0D); double d2 = Math.min(2.9999872E7D, worldborder.maxX() - 16.0D);
double d3 = Math.min(2.9999872E7D, worldborder.maxZ() - 16.0D); double d3 = Math.min(2.9999872E7D, worldborder.maxZ() - 16.0D);
double d4 = DimensionType.func_242715_a(this.world.func_230315_m_(), world.func_230315_m_()); double d4 = DimensionType.getCoordinateDifference(this.world.getDimensionType(), world.getDimensionType());
BlockPos blockpos1 = new BlockPos(MathHelper.clamp(this.getPosX() * d4, d0, d2), this.getPosY(), MathHelper.clamp(this.getPosZ() * d4, d1, d3)); BlockPos blockpos1 = new BlockPos(MathHelper.clamp(this.getPosX() * d4, d0, d2), this.getPosY(), MathHelper.clamp(this.getPosZ() * d4, d1, d3));
CraftPortalEvent event = this.callPortalEvent((Entity) (Object) this, world, blockpos1, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16); CraftPortalEvent event = this.callPortalEvent((Entity) (Object) this, world, blockpos1, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16);
@ -892,7 +892,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
Vector3d vector3d; Vector3d vector3d;
if (blockstate.hasProperty(BlockStateProperties.HORIZONTAL_AXIS)) { if (blockstate.hasProperty(BlockStateProperties.HORIZONTAL_AXIS)) {
direction$axis = blockstate.get(BlockStateProperties.HORIZONTAL_AXIS); direction$axis = blockstate.get(BlockStateProperties.HORIZONTAL_AXIS);
TeleportationRepositioner.Result teleportationrepositioner$result = TeleportationRepositioner.func_243676_a(this.field_242271_ac, direction$axis, 21, Direction.Axis.Y, 21, (p_242276_2_) -> { TeleportationRepositioner.Result teleportationrepositioner$result = TeleportationRepositioner.findLargestRectangle(this.field_242271_ac, direction$axis, 21, Direction.Axis.Y, 21, (p_242276_2_) -> {
return this.world.getBlockState(p_242276_2_) == blockstate; return this.world.getBlockState(p_242276_2_) == blockstate;
}); });
vector3d = this.func_241839_a(direction$axis, teleportationrepositioner$result); vector3d = this.func_241839_a(direction$axis, teleportationrepositioner$result);

View File

@ -18,12 +18,12 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(BrainUtil.class) @Mixin(BrainUtil.class)
public class BrainUtilMixin { public class BrainUtilMixin {
@Inject(method = "func_233865_a_", cancellable = true, at = @At("HEAD")) @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 p_233865_2_, CallbackInfo ci) {
if (stack.isEmpty()) ci.cancel(); if (stack.isEmpty()) ci.cancel();
} }
@Inject(method = "func_233865_a_", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, @Inject(method = "spawnItemNearEntity", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD,
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;addEntity(Lnet/minecraft/entity/Entity;)Z")) 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 p_233865_2_, CallbackInfo ci, double d, ItemEntity itemEntity) {
EntityDropItemEvent event = new EntityDropItemEvent(((EntityBridge) entity).bridge$getBukkitEntity(), (Item) ((EntityBridge) itemEntity).bridge$getBukkitEntity()); EntityDropItemEvent event = new EntityDropItemEvent(((EntityBridge) entity).bridge$getBukkitEntity(), (Item) ((EntityBridge) itemEntity).bridge$getBukkitEntity());

View File

@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(CreateBabyVillagerTask.class) @Mixin(CreateBabyVillagerTask.class)
public class CreateBabyVillagerTaskMixin { public class CreateBabyVillagerTaskMixin {
@Redirect(method = "func_242307_b", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/merchant/villager/VillagerEntity;func_241840_a(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/entity/AgeableEntity;)Lnet/minecraft/entity/merchant/villager/VillagerEntity;")) @Redirect(method = "createChild", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/merchant/villager/VillagerEntity;func_241840_a(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/entity/AgeableEntity;)Lnet/minecraft/entity/merchant/villager/VillagerEntity;"))
private VillagerEntity arclight$entityBreed(VillagerEntity lona, ServerWorld world, AgeableEntity anonymous) { private VillagerEntity arclight$entityBreed(VillagerEntity lona, ServerWorld world, AgeableEntity anonymous) {
VillagerEntity child = lona.func_241840_a(world, anonymous); VillagerEntity child = lona.func_241840_a(world, anonymous);
if (child != null && !CraftEventFactory.callEntityBreedEvent(child, lona, anonymous, null, null, 0).isCancelled()) { if (child != null && !CraftEventFactory.callEntityBreedEvent(child, lona, anonymous, null, null, 0).isCancelled()) {

View File

@ -14,12 +14,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(FarmerWorkTask.class) @Mixin(FarmerWorkTask.class)
public class FarmerWorkTaskMixin { public class FarmerWorkTaskMixin {
@Inject(method = "func_234016_a_", 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;")) @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) { 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_); ArclightCaptures.captureEntityChangeBlock(p_234016_2_);
} }
@Inject(method = "func_234016_a_", 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;")) @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) { 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_); ArclightCaptures.captureEntityChangeBlock(p_234016_2_);
} }

View File

@ -43,13 +43,13 @@ public abstract class InteractWithDoorTaskMixin {
BlockState blockstate = worldIn.getBlockState(blockpos); BlockState blockstate = worldIn.getBlockState(blockpos);
if (blockstate.isIn(BlockTags.WOODEN_DOORS)) { if (blockstate.isIn(BlockTags.WOODEN_DOORS)) {
DoorBlock doorblock = (DoorBlock) blockstate.getBlock(); DoorBlock doorblock = (DoorBlock) blockstate.getBlock();
if (!doorblock.func_242664_h(blockstate)) { if (!doorblock.isOpen(blockstate)) {
EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(((EntityBridge) entityIn).bridge$getBukkitEntity(), CraftBlock.at(entityIn.world, blockpos)); EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(((EntityBridge) entityIn).bridge$getBukkitEntity(), CraftBlock.at(entityIn.world, blockpos));
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {
return; return;
} }
doorblock.func_242663_a(worldIn, blockstate, blockpos, true); doorblock.openDoor(worldIn, blockstate, blockpos, true);
} }
this.func_242301_c(worldIn, entityIn, blockpos); this.func_242301_c(worldIn, entityIn, blockpos);
@ -59,14 +59,14 @@ public abstract class InteractWithDoorTaskMixin {
BlockState blockstate1 = worldIn.getBlockState(blockpos1); BlockState blockstate1 = worldIn.getBlockState(blockpos1);
if (blockstate1.isIn(BlockTags.WOODEN_DOORS)) { if (blockstate1.isIn(BlockTags.WOODEN_DOORS)) {
DoorBlock doorblock1 = (DoorBlock) blockstate1.getBlock(); DoorBlock doorblock1 = (DoorBlock) blockstate1.getBlock();
if (!doorblock1.func_242664_h(blockstate1)) { if (!doorblock1.isOpen(blockstate1)) {
// todo check this blockpos1 // todo check this blockpos1
EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(((EntityBridge) entityIn).bridge$getBukkitEntity(), CraftBlock.at(entityIn.world, blockpos1)); EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(((EntityBridge) entityIn).bridge$getBukkitEntity(), CraftBlock.at(entityIn.world, blockpos1));
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {
return; return;
} }
doorblock1.func_242663_a(worldIn, blockstate1, blockpos1, true); doorblock1.openDoor(worldIn, blockstate1, blockpos1, true);
this.func_242301_c(worldIn, entityIn, blockpos1); this.func_242301_c(worldIn, entityIn, blockpos1);
} }
} }

View File

@ -66,7 +66,7 @@ public abstract class ZombieEntityMixin extends CreatureEntityMixin {
} }
} }
@Eject(method = "func_241847_a", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/merchant/villager/VillagerEntity;func_233656_b_(Lnet/minecraft/entity/EntityType;Z)Lnet/minecraft/entity/MobEntity;")) @Eject(method = "func_241847_a", at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraft/entity/merchant/villager/VillagerEntity;func_233656_b_(Lnet/minecraft/entity/EntityType;Z)Lnet/minecraft/entity/MobEntity;"))
private <T extends MobEntity> T arclight$transform(VillagerEntity villagerEntity, EntityType<T> entityType, boolean flag, CallbackInfo ci) { private <T extends MobEntity> T arclight$transform(VillagerEntity villagerEntity, EntityType<T> entityType, boolean flag, CallbackInfo ci) {
T t = this.a(entityType, flag, EntityTransformEvent.TransformReason.INFECTION, CreatureSpawnEvent.SpawnReason.INFECTION); T t = this.a(entityType, flag, EntityTransformEvent.TransformReason.INFECTION, CreatureSpawnEvent.SpawnReason.INFECTION);
if (t == null) { if (t == null) {

View File

@ -30,7 +30,7 @@ public abstract class ZombieVillagerEntityMixin extends ZombieEntityMixin {
bridge$pushEffectCause(EntityPotionEffectEvent.Cause.CONVERSION); bridge$pushEffectCause(EntityPotionEffectEvent.Cause.CONVERSION);
} }
@Eject(method = "cureZombie", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/monster/ZombieVillagerEntity;func_233656_b_(Lnet/minecraft/entity/EntityType;Z)Lnet/minecraft/entity/MobEntity;")) @Eject(method = "cureZombie", at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraft/entity/monster/ZombieVillagerEntity;func_233656_b_(Lnet/minecraft/entity/EntityType;Z)Lnet/minecraft/entity/MobEntity;"))
private <T extends MobEntity> T arclight$cure(ZombieVillagerEntity zombieVillagerEntity, EntityType<T> entityType, boolean flag, CallbackInfo ci) { private <T extends MobEntity> T arclight$cure(ZombieVillagerEntity zombieVillagerEntity, EntityType<T> entityType, boolean flag, CallbackInfo ci) {
T t = this.a(entityType, flag, EntityTransformEvent.TransformReason.CURED, CreatureSpawnEvent.SpawnReason.CURED); T t = this.a(entityType, flag, EntityTransformEvent.TransformReason.CURED, CreatureSpawnEvent.SpawnReason.CURED);
if (t == null) { if (t == null) {

View File

@ -49,7 +49,7 @@ public abstract class PiglinTasksMixin {
} }
Item item = itemstack.getItem(); Item item = itemstack.getItem();
if (func_234480_a_(item)) { if (func_234480_a_(item)) {
piglinEntity.getBrain().removeMemory(MemoryModuleType.field_242310_O); piglinEntity.getBrain().removeMemory(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM);
func_241427_c_(piglinEntity, itemstack); func_241427_c_(piglinEntity, itemstack);
func_234501_d_(piglinEntity); func_234501_d_(piglinEntity);
} else if (func_234499_c_(item) && !func_234538_z_(piglinEntity)) { } else if (func_234499_c_(item) && !func_234538_z_(piglinEntity)) {

View File

@ -31,7 +31,7 @@ public abstract class CowEntityMixin extends AnimalEntityMixin {
if (event.isCancelled()) { if (event.isCancelled()) {
return ActionResultType.PASS; return ActionResultType.PASS;
} }
ItemStack itemstack1 = DrinkHelper.func_242398_a(itemstack, playerEntity, CraftItemStack.asNMSCopy(event.getItemStack())); ItemStack itemstack1 = DrinkHelper.fill(itemstack, playerEntity, CraftItemStack.asNMSCopy(event.getItemStack()));
playerEntity.setHeldItem(hand, itemstack1); playerEntity.setHeldItem(hand, itemstack1);
return ActionResultType.func_233537_a_(this.world.isRemote); return ActionResultType.func_233537_a_(this.world.isRemote);
} else { } else {

View File

@ -23,11 +23,11 @@ import java.util.List;
@Mixin(MooshroomEntity.class) @Mixin(MooshroomEntity.class)
public abstract class MooshroomEntityMixin extends AnimalEntityMixin { public abstract class MooshroomEntityMixin extends AnimalEntityMixin {
@Redirect(method = "onSheared", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/MooshroomEntity;remove()V")) @Redirect(method = "onSheared", remap = false, at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/MooshroomEntity;remove()V"))
private void arclight$animalTransformPre(MooshroomEntity mooshroomEntity) { private void arclight$animalTransformPre(MooshroomEntity mooshroomEntity) {
} }
@Inject(method = "onSheared", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;addEntity(Lnet/minecraft/entity/Entity;)Z")) @Inject(method = "onSheared", remap = false, cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;addEntity(Lnet/minecraft/entity/Entity;)Z"))
private void arclight$animalTransform(PlayerEntity player, ItemStack item, World world, BlockPos pos, int fortune, CallbackInfoReturnable<List<ItemStack>> cir, CowEntity cowEntity) { private void arclight$animalTransform(PlayerEntity player, ItemStack item, World world, BlockPos pos, int fortune, CallbackInfoReturnable<List<ItemStack>> cir, CowEntity cowEntity) {
if (CraftEventFactory.callEntityTransformEvent((MooshroomEntity) (Object) this, cowEntity, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) { if (CraftEventFactory.callEntityTransformEvent((MooshroomEntity) (Object) this, cowEntity, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) {
cir.setReturnValue(Collections.emptyList()); cir.setReturnValue(Collections.emptyList());

View File

@ -19,7 +19,7 @@ public abstract class ParrotEntityMixin extends AnimalEntityMixin {
bridge$pushEffectCause(EntityPotionEffectEvent.Cause.FOOD); bridge$pushEffectCause(EntityPotionEffectEvent.Cause.FOOD);
} }
@Redirect(method = "attackEntityFrom", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/ParrotEntity;func_233687_w_(Z)V")) @Redirect(method = "attackEntityFrom", at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraft/entity/passive/ParrotEntity;func_233687_w_(Z)V"))
private void arclight$handledInSuper(ParrotEntity parrotEntity, boolean p_233687_1_) { private void arclight$handledInSuper(ParrotEntity parrotEntity, boolean p_233687_1_) {
} }
} }

View File

@ -193,7 +193,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen
public final BlockPos getSpawnPoint(ServerWorld worldserver) { public final BlockPos getSpawnPoint(ServerWorld worldserver) {
BlockPos blockposition = worldserver.getSpawnPoint(); BlockPos blockposition = worldserver.getSpawnPoint();
if (worldserver.func_230315_m_().hasSkyLight() && worldserver.field_241103_E_.getGameType() != GameType.ADVENTURE) { if (worldserver.getDimensionType().hasSkyLight() && worldserver.field_241103_E_.getGameType() != GameType.ADVENTURE) {
long k; long k;
long l; long l;
int i = Math.max(0, this.server.getSpawnRadius(worldserver)); int i = Math.max(0, this.server.getSpawnRadius(worldserver));
@ -483,7 +483,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen
} }
Location enter = this.getBukkitEntity().getLocation(); Location enter = this.getBukkitEntity().getLocation();
Location exit = (exitWorld[0] == null) ? null : new Location(((WorldBridge) exitWorld[0]).bridge$getWorld(), portalinfo.pos.x, portalinfo.pos.y, portalinfo.pos.z, portalinfo.field_242960_c, portalinfo.field_242961_d); Location exit = (exitWorld[0] == null) ? null : new Location(((WorldBridge) exitWorld[0]).bridge$getWorld(), portalinfo.pos.x, portalinfo.pos.y, portalinfo.pos.z, portalinfo.rotationYaw, portalinfo.rotationPitch);
PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, cause); PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, cause);
Bukkit.getServer().getPluginManager().callEvent(tpEvent); Bukkit.getServer().getPluginManager().callEvent(tpEvent);
if (tpEvent.isCancelled() || tpEvent.getTo() == null) { if (tpEvent.isCancelled() || tpEvent.getTo() == null) {
@ -497,7 +497,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen
this.invulnerableDimensionChange = true; this.invulnerableDimensionChange = true;
IWorldInfo iworldinfo = exitWorld[0].getWorldInfo(); IWorldInfo iworldinfo = exitWorld[0].getWorldInfo();
this.connection.sendPacket(new SRespawnPacket(exitWorld[0].func_230315_m_(), exitWorld[0].getDimensionKey(), BiomeManager.func_235200_a_(exitWorld[0].getSeed()), this.interactionManager.getGameType(), this.interactionManager.func_241815_c_(), exitWorld[0].isDebug(), exitWorld[0].func_241109_A_(), true)); this.connection.sendPacket(new SRespawnPacket(exitWorld[0].getDimensionType(), exitWorld[0].getDimensionKey(), BiomeManager.getHashedSeed(exitWorld[0].getSeed()), this.interactionManager.getGameType(), this.interactionManager.func_241815_c_(), exitWorld[0].isDebug(), exitWorld[0].func_241109_A_(), true));
this.connection.sendPacket(new SServerDifficultyPacket(iworldinfo.getDifficulty(), iworldinfo.isDifficultyLocked())); this.connection.sendPacket(new SServerDifficultyPacket(iworldinfo.getDifficulty(), iworldinfo.isDifficultyLocked()));
playerlist.updatePermissionLevel((ServerPlayerEntity) (Object) this); playerlist.updatePermissionLevel((ServerPlayerEntity) (Object) this);
serverworld.removeEntity((ServerPlayerEntity) (Object) this, true); //Forge: the player entity is moved to the new world, NOT cloned. So keep the data alive with no matching invalidate call. serverworld.removeEntity((ServerPlayerEntity) (Object) this, true); //Forge: the player entity is moved to the new world, NOT cloned. So keep the data alive with no matching invalidate call.
@ -571,7 +571,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen
private Either<PlayerEntity.SleepResult, Unit> getBedResult(BlockPos blockposition, Direction enumdirection) { private Either<PlayerEntity.SleepResult, Unit> getBedResult(BlockPos blockposition, Direction enumdirection) {
if (!this.isSleeping() && this.isAlive()) { if (!this.isSleeping() && this.isAlive()) {
if (!this.world.func_230315_m_().func_236043_f_()) { if (!this.world.getDimensionType().isNatural()) {
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_HERE); return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_HERE);
} }
if (!this.func_241147_a_(blockposition, enumdirection)) { if (!this.func_241147_a_(blockposition, enumdirection)) {

View File

@ -5,15 +5,18 @@ import io.izzel.arclight.common.mixin.core.entity.EntityMixin;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.projectile.ShulkerBulletEntity; import net.minecraft.entity.projectile.ShulkerBulletEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.math.EntityRayTraceResult; import net.minecraft.util.math.EntityRayTraceResult;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.bukkit.craftbukkit.v.event.CraftEventFactory;
import org.bukkit.event.entity.EntityPotionEffectEvent; import org.bukkit.event.entity.EntityPotionEffectEvent;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; 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 javax.annotation.Nullable; import javax.annotation.Nullable;
@ -36,6 +39,13 @@ public abstract class ShulkerBulletEntityMixin extends EntityMixin {
((LivingEntityBridge) result.getEntity()).bridge$pushEffectCause(EntityPotionEffectEvent.Cause.ATTACK); ((LivingEntityBridge) result.getEntity()).bridge$pushEffectCause(EntityPotionEffectEvent.Cause.ATTACK);
} }
@Inject(method = "attackEntityFrom", cancellable = true, at = @At("HEAD"))
private void arclight$damageBullet(DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
if (CraftEventFactory.handleNonLivingEntityDamageEvent((ShulkerBulletEntity) (Object) this, source, amount, false)) {
cir.setReturnValue(false);
}
}
public Entity getTarget() { public Entity getTarget() {
return this.target; return this.target;
} }

View File

@ -84,7 +84,7 @@ public abstract class BlockItemMixin {
protected boolean canPlace(BlockItemUseContext context, BlockState state) { protected boolean canPlace(BlockItemUseContext context, BlockState state) {
PlayerEntity playerentity = context.getPlayer(); PlayerEntity playerentity = context.getPlayer();
ISelectionContext iselectioncontext = playerentity == null ? ISelectionContext.dummy() : ISelectionContext.forEntity(playerentity); ISelectionContext iselectioncontext = playerentity == null ? ISelectionContext.dummy() : ISelectionContext.forEntity(playerentity);
boolean original = (!this.checkPosition() || state.isValidPosition(context.getWorld(), context.getPos())) && context.getWorld().func_226663_a_(state, context.getPos(), iselectioncontext); boolean original = (!this.checkPosition() || state.isValidPosition(context.getWorld(), context.getPos())) && context.getWorld().placedBlockCollides(state, context.getPos(), iselectioncontext);
Player player = (context.getPlayer() instanceof ServerPlayerEntityBridge) ? ((ServerPlayerEntityBridge) context.getPlayer()).bridge$getBukkitEntity() : null; Player player = (context.getPlayer() instanceof ServerPlayerEntityBridge) ? ((ServerPlayerEntityBridge) context.getPlayer()).bridge$getBukkitEntity() : null;
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getWorld(), context.getPos()), player, CraftBlockData.fromData(state), original); BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getWorld(), context.getPos()), player, CraftBlockData.fromData(state), original);

View File

@ -72,7 +72,7 @@ public abstract class BucketItemMixin {
private transient org.bukkit.inventory.@Nullable ItemStack arclight$captureItem; private transient org.bukkit.inventory.@Nullable ItemStack arclight$captureItem;
@ModifyArg(method = "onItemRightClick", index = 2, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/DrinkHelper;func_242398_a(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;")) @ModifyArg(method = "onItemRightClick", index = 2, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/DrinkHelper;fill(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;"))
private ItemStack arclight$useEventItem(ItemStack itemStack) { private ItemStack arclight$useEventItem(ItemStack itemStack) {
return arclight$captureItem == null ? itemStack : CraftItemStack.asNMSCopy(arclight$captureItem); return arclight$captureItem == null ? itemStack : CraftItemStack.asNMSCopy(arclight$captureItem);
} }
@ -94,7 +94,7 @@ public abstract class BucketItemMixin {
private transient BlockPos arclight$click; private transient BlockPos arclight$click;
private transient ItemStack arclight$stack; private transient ItemStack arclight$stack;
@Inject(method = "tryPlaceContainedLiquid", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/DimensionType;func_236040_e_()Z")) @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 p_180616_4_, CallbackInfoReturnable<Boolean> cir) {
if (player != null) { if (player != null) {
PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((ServerWorld) worldIn, player, posIn, arclight$click, arclight$direction, arclight$stack); PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((ServerWorld) worldIn, player, posIn, arclight$click, arclight$direction, arclight$stack);

View File

@ -37,7 +37,7 @@ public class MerchantOfferMixin implements MerchantOfferBridge {
return asBukkit(); return asBukkit();
} }
@Inject(method = "func_222205_b", at = @At("HEAD")) @Inject(method = "getDiscountedBuyingStackFirst", at = @At("HEAD"))
private void arclight$fix(CallbackInfoReturnable<ItemStack> cir) { private void arclight$fix(CallbackInfoReturnable<ItemStack> cir) {
if (this.buyingStackFirst.getCount() <= 0) { if (this.buyingStackFirst.getCount() <= 0) {
cir.setReturnValue(ItemStack.EMPTY); cir.setReturnValue(ItemStack.EMPTY);

View File

@ -19,7 +19,7 @@ import java.util.Optional;
@Mixin(SpawnEggItem.class) @Mixin(SpawnEggItem.class)
public class SpawnEggItemMixin { public class SpawnEggItemMixin {
@Inject(method = "func_234809_a_", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;func_242417_l(Lnet/minecraft/entity/Entity;)V")) @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 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) {
((WorldBridge) world).bridge$pushAddEntityReason(CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); ((WorldBridge) world).bridge$pushAddEntityReason(CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
} }

View File

@ -11,15 +11,15 @@ import org.spongepowered.asm.mixin.Shadow;
public abstract class LootEntry_SerializerMixin<T extends LootEntry> { public abstract class LootEntry_SerializerMixin<T extends LootEntry> {
// @formatter:off // @formatter:off
@Shadow public abstract void func_230424_a_(JsonObject p_230424_1_, T p_230424_2_, JsonSerializationContext p_230424_3_); @Shadow public abstract void serialize(JsonObject p_230424_1_, T p_230424_2_, JsonSerializationContext p_230424_3_);
@Shadow public abstract T func_230423_a_(JsonObject p_230423_1_, JsonDeserializationContext p_230423_2_); @Shadow public abstract T deserialize(JsonObject p_230423_1_, JsonDeserializationContext p_230423_2_);
// @formatter:on // @formatter:on
public final void a(JsonObject object, T t0, JsonSerializationContext context) { public final void a(JsonObject object, T t0, JsonSerializationContext context) {
this.func_230424_a_(object, t0, context); this.serialize(object, t0, context);
} }
public final T a(JsonObject object, JsonDeserializationContext context) { public final T a(JsonObject object, JsonDeserializationContext context) {
return this.func_230423_a_(object, context); return this.deserialize(object, context);
} }
} }

View File

@ -11,6 +11,7 @@ import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import java.io.IOException; import java.io.IOException;
import java.util.UUID;
@Mixin(SChatPacket.class) @Mixin(SChatPacket.class)
public class SChatPacketMixin { public class SChatPacketMixin {
@ -18,6 +19,7 @@ public class SChatPacketMixin {
// @formatter:off // @formatter:off
@Shadow private ITextComponent chatComponent; @Shadow private ITextComponent chatComponent;
@Shadow private ChatType type; @Shadow private ChatType type;
@Shadow private UUID field_240809_c_;
// @formatter:on // @formatter:on
public BaseComponent[] components; public BaseComponent[] components;
@ -34,5 +36,6 @@ public class SChatPacketMixin {
buf.writeTextComponent(this.chatComponent); buf.writeTextComponent(this.chatComponent);
} }
buf.writeByte(this.type.getId()); buf.writeByte(this.type.getId());
buf.writeUniqueId(this.field_240809_c_);
} }
} }

View File

@ -19,7 +19,7 @@ public class SWorldBorderPacketMixin {
@Inject(method = "<init>(Lnet/minecraft/world/border/WorldBorder;Lnet/minecraft/network/play/server/SWorldBorderPacket$Action;)V", at = @At("RETURN")) @Inject(method = "<init>(Lnet/minecraft/world/border/WorldBorder;Lnet/minecraft/network/play/server/SWorldBorderPacket$Action;)V", at = @At("RETURN"))
private void arclight$nether(WorldBorder border, SWorldBorderPacket.Action actionIn, CallbackInfo ci) { private void arclight$nether(WorldBorder border, SWorldBorderPacket.Action actionIn, CallbackInfo ci) {
this.centerX = border.getCenterX() * (((WorldBorderBridge) border).bridge$getWorld().func_230315_m_().func_242724_f()); this.centerX = border.getCenterX() * (((WorldBorderBridge) border).bridge$getWorld().getDimensionType().getCoordinateScale());
this.centerZ = border.getCenterZ() * (((WorldBorderBridge) border).bridge$getWorld().func_230315_m_().func_242724_f()); this.centerZ = border.getCenterZ() * (((WorldBorderBridge) border).bridge$getWorld().getDimensionType().getCoordinateScale());
} }
} }

View File

@ -332,7 +332,7 @@ public abstract class MinecraftServerMixin extends RecursiveEventLoop<TickDelaye
public void loadInitialChunks(IChunkStatusListener listener) { public void loadInitialChunks(IChunkStatusListener listener) {
ServerWorld serverworld = this.func_241755_D_(); ServerWorld serverworld = this.func_241755_D_();
this.forceTicks = true; this.forceTicks = true;
LOGGER.info("Preparing start region for dimension {}", serverworld.getDimensionKey().func_240901_a_()); LOGGER.info("Preparing start region for dimension {}", serverworld.getDimensionKey().getLocation());
BlockPos blockpos = serverworld.getSpawnPoint(); BlockPos blockpos = serverworld.getSpawnPoint();
listener.start(new ChunkPos(blockpos)); listener.start(new ChunkPos(blockpos));
ServerChunkProvider serverchunkprovider = serverworld.getChunkProvider(); ServerChunkProvider serverchunkprovider = serverworld.getChunkProvider();
@ -405,7 +405,7 @@ public abstract class MinecraftServerMixin extends RecursiveEventLoop<TickDelaye
if (!((WorldBridge) serverWorld).bridge$getWorld().getKeepSpawnInMemory()) { if (!((WorldBridge) serverWorld).bridge$getWorld().getKeepSpawnInMemory()) {
return; return;
} }
LOGGER.info("Preparing start region for dimension {}", serverWorld.getDimensionKey().func_240901_a_()); LOGGER.info("Preparing start region for dimension {}", serverWorld.getDimensionKey().getLocation());
BlockPos blockpos = serverWorld.getSpawnPoint(); BlockPos blockpos = serverWorld.getSpawnPoint();
listener.start(new ChunkPos(blockpos)); listener.start(new ChunkPos(blockpos));
ServerChunkProvider serverchunkprovider = serverWorld.getChunkProvider(); ServerChunkProvider serverchunkprovider = serverWorld.getChunkProvider();

View File

@ -313,7 +313,7 @@ public abstract class PlayerListMixin implements PlayerListBridge {
playerIn.setPosition(playerIn.getPosX(), playerIn.getPosY() + 1.0, playerIn.getPosZ()); playerIn.setPosition(playerIn.getPosX(), playerIn.getPosY() + 1.0, playerIn.getPosZ());
} }
IWorldInfo worlddata = serverWorld.getWorldInfo(); IWorldInfo worlddata = serverWorld.getWorldInfo();
playerIn.connection.sendPacket(new SRespawnPacket(serverWorld.func_230315_m_(), serverWorld.getDimensionKey(), BiomeManager.func_235200_a_(serverWorld.getSeed()), playerIn.interactionManager.getGameType(), playerIn.interactionManager.func_241815_c_(), serverWorld.isDebug(), serverWorld.func_241109_A_(), flag)); playerIn.connection.sendPacket(new SRespawnPacket(serverWorld.getDimensionType(), serverWorld.getDimensionKey(), BiomeManager.getHashedSeed(serverWorld.getSeed()), playerIn.interactionManager.getGameType(), playerIn.interactionManager.func_241815_c_(), serverWorld.isDebug(), serverWorld.func_241109_A_(), flag));
playerIn.connection.sendPacket(new SUpdateViewDistancePacket(((WorldBridge) serverWorld).bridge$spigotConfig().viewDistance)); playerIn.connection.sendPacket(new SUpdateViewDistancePacket(((WorldBridge) serverWorld).bridge$spigotConfig().viewDistance));
playerIn.setWorld(serverWorld); playerIn.setWorld(serverWorld);
playerIn.revive(); playerIn.revive();
@ -460,7 +460,7 @@ public abstract class PlayerListMixin implements PlayerListBridge {
} }
IWorldInfo iworldinfo = serverplayerentity.world.getWorldInfo(); IWorldInfo iworldinfo = serverplayerentity.world.getWorldInfo();
serverplayerentity.connection.sendPacket(new SRespawnPacket(serverplayerentity.world.func_230315_m_(), serverplayerentity.world.getDimensionKey(), BiomeManager.func_235200_a_(serverplayerentity.getServerWorld().getSeed()), serverplayerentity.interactionManager.getGameType(), serverplayerentity.interactionManager.func_241815_c_(), serverplayerentity.getServerWorld().isDebug(), serverplayerentity.getServerWorld().func_241109_A_(), conqueredEnd)); serverplayerentity.connection.sendPacket(new SRespawnPacket(serverplayerentity.world.getDimensionType(), serverplayerentity.world.getDimensionKey(), BiomeManager.getHashedSeed(serverplayerentity.getServerWorld().getSeed()), serverplayerentity.interactionManager.getGameType(), serverplayerentity.interactionManager.func_241815_c_(), serverplayerentity.getServerWorld().isDebug(), serverplayerentity.getServerWorld().func_241109_A_(), conqueredEnd));
serverplayerentity.connection.sendPacket(new SUpdateViewDistancePacket(((WorldBridge) serverWorld).bridge$spigotConfig().viewDistance)); serverplayerentity.connection.sendPacket(new SUpdateViewDistancePacket(((WorldBridge) serverWorld).bridge$spigotConfig().viewDistance));
serverplayerentity.setWorld(serverWorld); serverplayerentity.setWorld(serverWorld);
((ServerPlayNetHandlerBridge) serverplayerentity.connection).bridge$teleport(new Location(((WorldBridge) serverWorld).bridge$getWorld(), serverplayerentity.getPosX(), serverplayerentity.getPosY(), serverplayerentity.getPosZ(), serverplayerentity.rotationYaw, serverplayerentity.rotationPitch)); ((ServerPlayNetHandlerBridge) serverplayerentity.connection).bridge$teleport(new Location(((WorldBridge) serverWorld).bridge$getWorld(), serverplayerentity.getPosX(), serverplayerentity.getPosY(), serverplayerentity.getPosZ(), serverplayerentity.rotationYaw, serverplayerentity.rotationPitch));

View File

@ -16,7 +16,7 @@ import javax.annotation.Nullable;
public class ColorMixin { public class ColorMixin {
// @formatter:off // @formatter:off
@Shadow @Final @Mutable @Nullable public String field_240741_d_; @Shadow @Final @Mutable @Nullable public String name;
// @formatter:on // @formatter:on
public TextFormatting format; public TextFormatting format;
@ -27,7 +27,7 @@ public class ColorMixin {
public void arclight$constructor(int p_i232573_1_, String p_i232573_2_, TextFormatting textFormatting) { public void arclight$constructor(int p_i232573_1_, String p_i232573_2_, TextFormatting textFormatting) {
arclight$constructor(p_i232573_1_); arclight$constructor(p_i232573_1_);
this.field_240741_d_ = p_i232573_2_; this.name = p_i232573_2_;
this.format = textFormatting; this.format = textFormatting;
} }

View File

@ -76,10 +76,10 @@ public abstract class ExplosionMixin implements ExplosionBridge {
@Accessor("mode") public abstract Explosion.Mode bridge$getMode(); @Accessor("mode") public abstract Explosion.Mode bridge$getMode();
@Shadow @Final private boolean causesFire; @Shadow @Final private boolean causesFire;
@Shadow @Final private Random random; @Shadow @Final private Random random;
@Shadow private static void func_229976_a_(ObjectArrayList<Pair<ItemStack, BlockPos>> p_229976_0_, ItemStack p_229976_1_, BlockPos p_229976_2_) { } @Shadow private static void handleExplosionDrops(ObjectArrayList<Pair<ItemStack, BlockPos>> p_229976_0_, ItemStack p_229976_1_, BlockPos p_229976_2_) { }
// @formatter:on // @formatter:on
@Shadow @Final private ExplosionContext field_234893_k_; @Shadow @Final private ExplosionContext context;
@Inject(method = "<init>(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;DDDFZLnet/minecraft/world/Explosion$Mode;)V", @Inject(method = "<init>(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;DDDFZLnet/minecraft/world/Explosion$Mode;)V",
at = @At("RETURN")) at = @At("RETURN"))
@ -119,12 +119,12 @@ public abstract class ExplosionMixin implements ExplosionBridge {
BlockPos blockpos = new BlockPos(d4, d6, d8); BlockPos blockpos = new BlockPos(d4, d6, d8);
BlockState blockstate = this.world.getBlockState(blockpos); BlockState blockstate = this.world.getBlockState(blockpos);
FluidState fluidstate = this.world.getFluidState(blockpos); FluidState fluidstate = this.world.getFluidState(blockpos);
Optional<Float> optional = this.field_234893_k_.getExplosionResistance((Explosion) (Object) this, this.world, blockpos, blockstate, fluidstate); Optional<Float> optional = this.context.getExplosionResistance((Explosion) (Object) this, this.world, blockpos, blockstate, fluidstate);
if (optional.isPresent()) { if (optional.isPresent()) {
f -= (optional.get() + 0.3F) * 0.3F; f -= (optional.get() + 0.3F) * 0.3F;
} }
if (f > 0.0F && this.field_234893_k_.canExplosionDestroyBlock((Explosion) (Object) this, this.world, blockpos, blockstate, f)) { if (f > 0.0F && this.context.canExplosionDestroyBlock((Explosion) (Object) this, this.world, blockpos, blockstate, f)) {
set.add(blockpos); set.add(blockpos);
} }
@ -242,7 +242,7 @@ public abstract class ExplosionMixin implements ExplosionBridge {
} }
blockstate.getDrops(lootcontext$builder).forEach((p_229977_2_) -> { blockstate.getDrops(lootcontext$builder).forEach((p_229977_2_) -> {
func_229976_a_(objectarraylist, p_229977_2_, blockpos1); handleExplosionDrops(objectarraylist, p_229977_2_, blockpos1);
}); });
} }
@ -268,7 +268,7 @@ public abstract class ExplosionMixin implements ExplosionBridge {
} }
} }
@Inject(method = "func_229976_a_", cancellable = true, at = @At("HEAD")) @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>> p_229976_0_, ItemStack stack, BlockPos p_229976_2_, CallbackInfo ci) {
if (stack.isEmpty()) ci.cancel(); if (stack.isEmpty()) ci.cancel();
} }

View File

@ -32,12 +32,12 @@ import java.util.Optional;
public abstract class TeleporterMixin implements TeleporterBridge { public abstract class TeleporterMixin implements TeleporterBridge {
// @formatter:off // @formatter:off
@Shadow public abstract Optional<TeleportationRepositioner.Result> func_242956_a(BlockPos p_242956_1_, Direction.Axis p_242956_2_); @Shadow public abstract Optional<TeleportationRepositioner.Result> makePortal(BlockPos p_242956_1_, Direction.Axis p_242956_2_);
@Shadow @Final protected ServerWorld world; @Shadow @Final protected ServerWorld world;
@Shadow public abstract Optional<TeleportationRepositioner.Result> func_242957_a(BlockPos p_242957_1_, boolean p_242957_2_); @Shadow public abstract Optional<TeleportationRepositioner.Result> getExistingPortal(BlockPos p_242957_1_, boolean p_242957_2_);
// @formatter:on // @formatter:on
@ModifyVariable(method = "func_242957_a", index = 4, at = @At(value = "INVOKE", target = "Lnet/minecraft/village/PointOfInterestManager;ensureLoadedAndValid(Lnet/minecraft/world/IWorldReader;Lnet/minecraft/util/math/BlockPos;I)V")) @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"))
private int arclight$useSearchRadius(int i) { private int arclight$useSearchRadius(int i) {
return this.arclight$searchRadius == -1 ? i : this.arclight$searchRadius; return this.arclight$searchRadius == -1 ? i : this.arclight$searchRadius;
} }
@ -47,7 +47,7 @@ public abstract class TeleporterMixin implements TeleporterBridge {
public Optional<TeleportationRepositioner.Result> findPortal(BlockPos pos, int searchRadius) { public Optional<TeleportationRepositioner.Result> findPortal(BlockPos pos, int searchRadius) {
this.arclight$searchRadius = searchRadius; this.arclight$searchRadius = searchRadius;
try { try {
return this.func_242957_a(pos, false); return this.getExistingPortal(pos, false);
} finally { } finally {
this.arclight$searchRadius = -1; this.arclight$searchRadius = -1;
} }
@ -58,12 +58,12 @@ public abstract class TeleporterMixin implements TeleporterBridge {
return findPortal(pos, searchRadius); return findPortal(pos, searchRadius);
} }
@ModifyArg(method = "func_242956_a", index = 1, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/BlockPos;func_243514_a(Lnet/minecraft/util/math/BlockPos;ILnet/minecraft/util/Direction;Lnet/minecraft/util/Direction;)Ljava/lang/Iterable;")) @ModifyArg(method = "makePortal", index = 1, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/BlockPos;func_243514_a(Lnet/minecraft/util/math/BlockPos;ILnet/minecraft/util/Direction;Lnet/minecraft/util/Direction;)Ljava/lang/Iterable;"))
private int arclight$changeRadius(int i) { private int arclight$changeRadius(int i) {
return this.arclight$createRadius == -1 ? i : this.arclight$createRadius; return this.arclight$createRadius == -1 ? i : this.arclight$createRadius;
} }
@Redirect(method = "func_242956_a", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z")) @Redirect(method = "makePortal", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z"))
private boolean arclight$captureBlocks1(ServerWorld serverWorld, BlockPos pos, BlockState state) { private boolean arclight$captureBlocks1(ServerWorld serverWorld, BlockPos pos, BlockState state) {
if (this.arclight$populator == null) { if (this.arclight$populator == null) {
this.arclight$populator = new BlockStateListPopulator(serverWorld); this.arclight$populator = new BlockStateListPopulator(serverWorld);
@ -71,7 +71,7 @@ public abstract class TeleporterMixin implements TeleporterBridge {
return this.arclight$populator.setBlockState(pos, state, 3); return this.arclight$populator.setBlockState(pos, state, 3);
} }
@Redirect(method = "func_242956_a", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)Z")) @Redirect(method = "makePortal", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)Z"))
private boolean arclight$captureBlocks2(ServerWorld serverWorld, BlockPos pos, BlockState state, int flags) { private boolean arclight$captureBlocks2(ServerWorld serverWorld, BlockPos pos, BlockState state, int flags) {
if (this.arclight$populator == null) { if (this.arclight$populator == null) {
this.arclight$populator = new BlockStateListPopulator(serverWorld); this.arclight$populator = new BlockStateListPopulator(serverWorld);
@ -80,7 +80,7 @@ public abstract class TeleporterMixin implements TeleporterBridge {
} }
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings({"unchecked", "rawtypes"})
@Inject(method = "func_242956_a", at = @At("RETURN")) @Inject(method = "makePortal", at = @At("RETURN"))
private void arclight$portalCreate(BlockPos pos, Direction.Axis axis, CallbackInfoReturnable<Optional<TeleportationRepositioner.Result>> cir) { private void arclight$portalCreate(BlockPos pos, Direction.Axis axis, CallbackInfoReturnable<Optional<TeleportationRepositioner.Result>> cir) {
CraftWorld craftWorld = ((WorldBridge) this.world).bridge$getWorld(); CraftWorld craftWorld = ((WorldBridge) this.world).bridge$getWorld();
List<org.bukkit.block.BlockState> blockStates; List<org.bukkit.block.BlockState> blockStates;
@ -105,7 +105,7 @@ public abstract class TeleporterMixin implements TeleporterBridge {
this.arclight$entity = entity; this.arclight$entity = entity;
this.arclight$createRadius = createRadius; this.arclight$createRadius = createRadius;
try { try {
return this.func_242956_a(pos, axis); return this.makePortal(pos, axis);
} finally { } finally {
this.arclight$entity = null; this.arclight$entity = null;
this.arclight$createRadius = -1; this.arclight$createRadius = -1;

View File

@ -94,7 +94,7 @@ public abstract class WorldMixin implements WorldBridge {
this.ticksPerWaterSpawns = this.getServer().getTicksPerWaterSpawns(); this.ticksPerWaterSpawns = this.getServer().getTicksPerWaterSpawns();
this.ticksPerWaterAmbientSpawns = this.getServer().getTicksPerWaterAmbientSpawns(); this.ticksPerWaterAmbientSpawns = this.getServer().getTicksPerWaterAmbientSpawns();
this.ticksPerAmbientSpawns = this.getServer().getTicksPerAmbientSpawns(); this.ticksPerAmbientSpawns = this.getServer().getTicksPerAmbientSpawns();
this.typeKey = this.getServer().getHandle().getServer().func_244267_aX().func_230520_a_().func_230519_c_(dimensionType) this.typeKey = this.getServer().getHandle().getServer().func_244267_aX().func_230520_a_().getOptionalKey(dimensionType)
.orElseThrow(() -> new IllegalStateException("Unregistered dimension type: " + dimType)); .orElseThrow(() -> new IllegalStateException("Unregistered dimension type: " + dimType));
} }

View File

@ -129,17 +129,17 @@ public class BukkitRegistry {
public static void registerEnvironments() { public static void registerEnvironments() {
int i = World.Environment.values().length; int i = World.Environment.values().length;
List<World.Environment> newTypes = new ArrayList<>(); List<World.Environment> newTypes = new ArrayList<>();
Registry<DimensionType> registry = ArclightServer.getMinecraftServer().func_244267_aX().func_243612_b(Registry.DIMENSION_TYPE_KEY); Registry<DimensionType> registry = ArclightServer.getMinecraftServer().func_244267_aX().getRegistry(Registry.DIMENSION_TYPE_KEY);
for (Map.Entry<RegistryKey<DimensionType>, DimensionType> entry : registry.getEntries()) { for (Map.Entry<RegistryKey<DimensionType>, DimensionType> entry : registry.getEntries()) {
RegistryKey<DimensionType> key = entry.getKey(); RegistryKey<DimensionType> key = entry.getKey();
World.Environment environment = DIM_MAP.get(key); World.Environment environment = DIM_MAP.get(key);
if (environment == null) { if (environment == null) {
String name = ResourceLocationUtil.standardize(key.func_240901_a_()); String name = ResourceLocationUtil.standardize(key.getLocation());
environment = EnumHelper.makeEnum(World.Environment.class, name, i, ENV_CTOR, ImmutableList.of(i - 1)); environment = EnumHelper.makeEnum(World.Environment.class, name, i, ENV_CTOR, ImmutableList.of(i - 1));
newTypes.add(environment); newTypes.add(environment);
ENVIRONMENT_MAP.put(i - 1, environment); ENVIRONMENT_MAP.put(i - 1, environment);
DIM_MAP.put(key, environment); DIM_MAP.put(key, environment);
ArclightMod.LOGGER.debug("Registered {} as environment {}", key.func_240901_a_(), environment); ArclightMod.LOGGER.debug("Registered {} as environment {}", key.getLocation(), environment);
i++; i++;
} }
} }

View File

@ -45,8 +45,8 @@ public class DelegateWorldInfo extends ServerWorldInfo {
} }
@Override @Override
public float func_241860_d() { public float getSpawnAngle() {
return derivedWorldInfo.func_241860_d(); return derivedWorldInfo.getSpawnAngle();
} }
@Override @Override
@ -115,8 +115,8 @@ public class DelegateWorldInfo extends ServerWorldInfo {
} }
@Override @Override
public void func_241859_a(float p_241859_1_) { public void setSpawnAngle(float p_241859_1_) {
derivedWorldInfo.func_241859_a(p_241859_1_); derivedWorldInfo.setSpawnAngle(p_241859_1_);
} }
@Override @Override

View File

@ -20,8 +20,8 @@ apply plugin: 'idea'
apply plugin: 'io.izzel.arclight' apply plugin: 'io.izzel.arclight'
ext { ext {
minecraftVersion = '1.16.2' minecraftVersion = '1.16.3'
forgeVersion = '33.0.22' forgeVersion = '34.0.8'
} }
arclight { arclight {
@ -41,7 +41,7 @@ configurations {
} }
minecraft { minecraft {
mappings channel: 'snapshot', version: "20200813-1.16.1" mappings channel: 'snapshot', version: "20200916-1.16.2"
accessTransformer = project(':arclight-common').file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = project(':arclight-common').file('src/main/resources/META-INF/accesstransformer.cfg')
} }
@ -59,7 +59,7 @@ repositories {
maven { url = 'https://jitpack.io/' } maven { url = 'https://jitpack.io/' }
} }
def embedLibs = ['org.spongepowered:mixin:0.8', 'org.ow2.asm:asm-util:8.0.1', def embedLibs = ['org.spongepowered:mixin:0.8.1', 'org.ow2.asm:asm-util:8.0.1',
'org.ow2.asm:asm-analysis:8.0.1', 'org.yaml:snakeyaml:1.26', 'org.ow2.asm:asm-analysis:8.0.1', 'org.yaml:snakeyaml:1.26',
'org.xerial:sqlite-jdbc:3.32.3', 'mysql:mysql-connector-java:5.1.49', 'org.xerial:sqlite-jdbc:3.32.3', 'mysql:mysql-connector-java:5.1.49',
'commons-lang:commons-lang:2.6', 'com.googlecode.json-simple:json-simple:1.1.1', 'commons-lang:commons-lang:2.6', 'com.googlecode.json-simple:json-simple:1.1.1',