21w07a - Fairly major mappings update

This commit is contained in:
modmuss50 2021-02-17 19:11:45 +00:00
parent 2a1dabb6d4
commit 40e100eb8e
14 changed files with 24 additions and 24 deletions
build.gradle
fabric-lifecycle-events-v1
build.gradle
src/main/java/net/fabricmc/fabric/mixin/event/lifecycle
fabric-networking-api-v1
build.gradle
src/main/java/net/fabricmc/fabric
api/networking/v1
mixin/networking/accessor
fabric-networking-blockentity-v0
build.gradle
src/main/java/net/fabricmc/fabric/mixin/networking/blockentity
fabric-object-builder-api-v1
build.gradle
src/testmod/java/net/fabricmc/fabric/test/object/builder
fabric-screen-handler-api-v1
build.gradle
src/testmod/java/net/fabricmc/fabric/test/screenhandler/item

View file

@ -19,8 +19,8 @@ plugins {
def ENV = System.getenv()
class Globals {
static def baseVersion = "0.30.4"
static def mcVersion = "21w06a"
static def baseVersion = "0.30.5"
static def mcVersion = "21w07a"
static def yarnVersion = "+build.1"
static def loaderVersion = "0.10.5+build.213"
static def preRelease = true

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-lifecycle-events-v1"
version = getSubprojectVersion(project, "1.4.2")
version = getSubprojectVersion(project, "1.4.3")
moduleDependencies(project, [
'fabric-api-base'

View file

@ -28,7 +28,7 @@ import net.minecraft.server.world.ServerWorld;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
@Mixin(targets = "net/minecraft/server/world/ServerWorld$EntityLoader")
@Mixin(targets = "net/minecraft/server/world/ServerWorld$ServerEntityHandler")
abstract class ServerWorldEntityLoaderMixin {
// final synthetic Lnet/minecraft/server/world/ServerWorld; field_26936
@SuppressWarnings("ShadowTarget")
@ -36,12 +36,12 @@ abstract class ServerWorldEntityLoaderMixin {
@Final
private ServerWorld field_26936;
@Inject(method = "onLoadEntity(Lnet/minecraft/entity/Entity;)V", at = @At("TAIL"))
@Inject(method = "startTracking(Lnet/minecraft/entity/Entity;)V", at = @At("TAIL"))
private void invokeEntityLoadEvent(Entity entity, CallbackInfo ci) {
ServerEntityEvents.ENTITY_LOAD.invoker().onLoad(entity, this.field_26936);
}
@Inject(method = "onUnloadEntity(Lnet/minecraft/entity/Entity;)V", at = @At("HEAD"))
@Inject(method = "stopTracking(Lnet/minecraft/entity/Entity;)V", at = @At("HEAD"))
private void invokeEntityUnloadEvent(Entity entity, CallbackInfo info) {
ServerEntityEvents.ENTITY_UNLOAD.invoker().onUnload(entity, this.field_26936);
}

View file

@ -31,7 +31,7 @@ import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientEntityEvents;
@Environment(EnvType.CLIENT)
@Mixin(targets = "net/minecraft/client/world/ClientWorld$EntityLoader")
@Mixin(targets = "net/minecraft/client/world/ClientWorld$ClientEntityHandler")
abstract class ClientWorldEntityLoaderMixin {
// final synthetic Lnet/minecraft/client/world/ClientWorld; field_27735
@SuppressWarnings("ShadowTarget")
@ -40,13 +40,13 @@ abstract class ClientWorldEntityLoaderMixin {
private ClientWorld field_27735;
// Call our load event after vanilla has loaded the entity
@Inject(method = "onLoadEntity(Lnet/minecraft/entity/Entity;)V", at = @At("TAIL"))
@Inject(method = "startTracking(Lnet/minecraft/entity/Entity;)V", at = @At("TAIL"))
private void invokeLoadEntity(Entity entity, CallbackInfo ci) {
ClientEntityEvents.ENTITY_LOAD.invoker().onLoad(entity, this.field_27735);
}
// Call our unload event before vanilla does.
@Inject(method = "onUnloadEntity(Lnet/minecraft/entity/Entity;)V", at = @At("HEAD"))
@Inject(method = "stopTracking(Lnet/minecraft/entity/Entity;)V", at = @At("HEAD"))
private void invokeUnloadEntity(Entity entity, CallbackInfo ci) {
ClientEntityEvents.ENTITY_UNLOAD.invoker().onUnload(entity, this.field_27735);
}

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-networking-api-v1"
version = getSubprojectVersion(project, "1.0.3")
version = getSubprojectVersion(project, "1.0.4")
moduleDependencies(project, [
'fabric-api-base'

View file

@ -33,7 +33,7 @@ import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3i;
import net.minecraft.world.chunk.ChunkManager;
import net.minecraft.class_5629;
import net.minecraft.server.world.EntityTrackingListener;
import net.fabricmc.fabric.mixin.networking.accessor.EntityTrackerAccessor;
import net.fabricmc.fabric.mixin.networking.accessor.ThreadedAnvilChunkStorageAccessor;
@ -118,7 +118,7 @@ public final class PlayerLookup {
// return an immutable collection to guard against accidental removals.
if (tracker != null) {
return Collections.unmodifiableCollection(tracker.getPlayersTracking()
.stream().map(class_5629::method_32311).collect(Collectors.toSet()));
.stream().map(EntityTrackingListener::getPlayer).collect(Collectors.toSet()));
}
return Collections.emptySet();

View file

@ -21,10 +21,10 @@ import java.util.Set;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import net.minecraft.class_5629;
import net.minecraft.server.world.EntityTrackingListener;
@Mixin(targets = "net/minecraft/server/world/ThreadedAnvilChunkStorage$EntityTracker")
public interface EntityTrackerAccessor {
@Accessor
Set<class_5629> getPlayersTracking();
@Accessor("listeners")
Set<EntityTrackingListener> getPlayersTracking();
}

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-networking-blockentity-v0"
version = getSubprojectVersion(project, "0.2.8")
version = getSubprojectVersion(project, "0.2.9")
moduleDependencies(project, [
'fabric-api-base'

View file

@ -64,7 +64,7 @@ public abstract class MixinBlockEntity {
}
}
@Inject(at = @At("RETURN"), method = "toInitialChunkDataTag", cancellable = true)
@Inject(at = @At("RETURN"), method = "toInitialChunkDataNbt", cancellable = true)
public void toInitialChunkDataTag(CallbackInfoReturnable<CompoundTag> info) {
Object self = this;

View file

@ -69,12 +69,12 @@ public class MixinClientPlayNetworkHandler {
}
}
@Redirect(method = "onChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;fromTag(Lnet/minecraft/nbt/CompoundTag;)V"))
@Redirect(method = "onChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/CompoundTag;)V"))
public void deserializeBlockEntityChunkData(BlockEntity blockEntity, CompoundTag tag) {
if (blockEntity instanceof BlockEntityClientSerializable) {
((BlockEntityClientSerializable) blockEntity).fromClientTag(tag);
} else {
blockEntity.fromTag(tag);
blockEntity.readNbt(tag);
}
}
}

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-object-builder-api-v1"
version = getSubprojectVersion(project, "1.10.4")
version = getSubprojectVersion(project, "1.10.5")
dependencies {
testmodCompile project(path: ':fabric-command-api-v1', configuration: 'dev')

View file

@ -32,6 +32,6 @@ class SimpleTradeFactory implements TradeOffers.Factory {
@Override
public TradeOffer create(Entity entity, Random random) {
// ALWAYS supply a copy of the offer.
return new TradeOffer(this.offer.toTag());
return new TradeOffer(this.offer.toNbt());
}
}

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-screen-handler-api-v1"
version = getSubprojectVersion(project, "1.1.5")
version = getSubprojectVersion(project, "1.1.6")
minecraft {
accessWidener = file('src/main/resources/fabric-screen-handler-api-v1.accesswidener')

View file

@ -30,7 +30,7 @@ final class BagInventory implements ImplementedInventory {
CompoundTag tag = stack.getSubTag("Items");
if (tag != null) {
Inventories.fromTag(tag, items);
Inventories.readNbt(tag, items);
}
}
@ -42,6 +42,6 @@ final class BagInventory implements ImplementedInventory {
@Override
public void markDirty() {
CompoundTag tag = stack.getOrCreateSubTag("Items");
Inventories.toTag(tag, items);
Inventories.writeNbt(tag, items);
}
}