diff --git a/build.gradle b/build.gradle index fa385fac8..76b72eb24 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ def ENV = System.getenv() class Globals { static def baseVersion = "0.20.0" static def mcVersion = "1.16.2" - static def yarnVersion = "+build.1" + static def yarnVersion = "+build.46" } version = Globals.baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local") + "-" + getBranch() diff --git a/fabric-particles-v1/build.gradle b/fabric-particles-v1/build.gradle index a3065c1fb..b5dd08d14 100644 --- a/fabric-particles-v1/build.gradle +++ b/fabric-particles-v1/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-particles-v1" -version = getSubprojectVersion(project, "0.2.1") +version = getSubprojectVersion(project, "0.2.2") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-particles-v1/src/main/java/net/fabricmc/fabric/api/particle/v1/FabricParticleTypes.java b/fabric-particles-v1/src/main/java/net/fabricmc/fabric/api/particle/v1/FabricParticleTypes.java index d164e3896..2dd8eb250 100644 --- a/fabric-particles-v1/src/main/java/net/fabricmc/fabric/api/particle/v1/FabricParticleTypes.java +++ b/fabric-particles-v1/src/main/java/net/fabricmc/fabric/api/particle/v1/FabricParticleTypes.java @@ -78,7 +78,7 @@ public final class FabricParticleTypes { public static <T extends ParticleEffect> ParticleType<T> complex(boolean alwaysSpawn, ParticleEffect.Factory<T> factory) { return new ParticleType<T>(alwaysSpawn, factory) { @Override - public Codec<T> method_29138() { + public Codec<T> getCodec() { //TODO fix me return null; } diff --git a/fabric-registry-sync-v0/build.gradle b/fabric-registry-sync-v0/build.gradle index 3e3557441..0eada7951 100644 --- a/fabric-registry-sync-v0/build.gradle +++ b/fabric-registry-sync-v0/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-registry-sync-v0" -version = getSubprojectVersion(project, "0.4.3") +version = getSubprojectVersion(project, "0.4.4") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinBootstrap.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinBootstrap.java index 9809d36d6..6424ec661 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinBootstrap.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinBootstrap.java @@ -28,7 +28,7 @@ import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluids; import net.minecraft.item.Items; import net.minecraft.util.registry.Registry; -import net.minecraft.world.biome.BuiltInBiomes; +import net.minecraft.world.biome.BiomeKeys; import net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager; import net.fabricmc.fabric.impl.registry.sync.trackers.StateIdTracker; @@ -44,7 +44,7 @@ public class MixinBootstrap { // static initializer is called, to register vanilla-provided blocks // and items from the respective classes - otherwise, they would // duplicate our calls from below. - Object oBiome = BuiltInBiomes.THE_END; + Object oBiome = BiomeKeys.THE_END; Object oBlock = Blocks.AIR; Object oFluid = Fluids.EMPTY; Object oItem = Items.AIR; diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinIdRegistry.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinIdRegistry.java index 8919da3c9..3e532299d 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinIdRegistry.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync/MixinIdRegistry.java @@ -62,16 +62,16 @@ import net.fabricmc.fabric.impl.registry.sync.RemappableRegistry; public abstract class MixinIdRegistry<T> implements RemappableRegistry, ListenableRegistry { @Shadow @Final - private ObjectList<T> field_26682; + private ObjectList<T> rawIdToEntry; @Shadow @Final - private Object2IntMap<T> field_26683; + private Object2IntMap<T> entryToRawId; @Shadow @Final - private BiMap<Identifier, T> entriesById; + private BiMap<Identifier, T> idToEntry; @Shadow @Final - private BiMap<RegistryKey<T>, T> entriesByKey; + private BiMap<RegistryKey<T>, T> keyToEntry; @Shadow private int nextId; @Unique @@ -137,19 +137,19 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab @SuppressWarnings({"unchecked", "ConstantConditions"}) @Inject(method = "set", at = @At("HEAD")) public void setPre(int id, RegistryKey<T> registryId, Object object, Lifecycle lifecycle, CallbackInfoReturnable info) { - int indexedEntriesId = field_26683.getInt((T) object); + int indexedEntriesId = entryToRawId.getInt((T) object); if (indexedEntriesId >= 0) { throw new RuntimeException("Attempted to register object " + object + " twice! (at raw IDs " + indexedEntriesId + " and " + id + " )"); } - if (!entriesById.containsKey(registryId.getValue())) { + if (!idToEntry.containsKey(registryId.getValue())) { fabric_isObjectNew = true; } else { - T oldObject = entriesById.get(registryId.getValue()); + T oldObject = idToEntry.get(registryId.getValue()); if (oldObject != null && oldObject != object) { - int oldId = field_26683.getInt(oldObject); + int oldId = entryToRawId.getInt(oldObject); if (oldId != id) { throw new RuntimeException("Attempted to register ID " + registryId + " at different raw IDs (" + oldId + ", " + id + ")! If you're trying to override an item, use .set(), not .register()!"); @@ -184,7 +184,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab List<String> strings = null; for (Identifier remoteId : remoteIndexedEntries.keySet()) { - if (!entriesById.keySet().contains(remoteId)) { + if (!idToEntry.keySet().contains(remoteId)) { if (strings == null) { strings = new ArrayList<>(); } @@ -206,11 +206,11 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab break; } case EXACT: { - if (!entriesById.keySet().equals(remoteIndexedEntries.keySet())) { + if (!idToEntry.keySet().equals(remoteIndexedEntries.keySet())) { List<String> strings = new ArrayList<>(); for (Identifier remoteId : remoteIndexedEntries.keySet()) { - if (!entriesById.keySet().contains(remoteId)) { + if (!idToEntry.keySet().contains(remoteId)) { strings.add(" - " + remoteId + " (missing on local)"); } } @@ -242,7 +242,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab // compatibility. if (fabric_prevIndexedEntries == null) { fabric_prevIndexedEntries = new Object2IntOpenHashMap<>(); - fabric_prevEntries = HashBiMap.create(entriesById); + fabric_prevEntries = HashBiMap.create(idToEntry); for (Object o : registry) { fabric_prevIndexedEntries.put(registry.getId(o), registry.getRawId(o)); @@ -297,8 +297,8 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab } // note: indexedEntries cannot be safely remove()d from - entriesById.keySet().removeAll(droppedIds); - entriesByKey.keySet().removeIf(registryKey -> droppedIds.contains(registryKey.getValue())); + idToEntry.keySet().removeAll(droppedIds); + keyToEntry.keySet().removeIf(registryKey -> droppedIds.contains(registryKey.getValue())); break; } @@ -306,7 +306,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab Int2IntMap idMap = new Int2IntOpenHashMap(); - for (Object o : field_26682) { + for (Object o : rawIdToEntry) { Identifier id = registry.getId(o); int rid = registry.getRawId(o); @@ -317,8 +317,8 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab } // entries was handled above, if it was necessary. - field_26682.clear(); - field_26683.clear(); + rawIdToEntry.clear(); + entryToRawId.clear(); nextId = 0; List<Identifier> orderedRemoteEntries = new ArrayList<>(remoteIndexedEntries.keySet()); @@ -326,7 +326,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab for (Identifier identifier : orderedRemoteEntries) { int id = remoteIndexedEntries.getInt(identifier); - T object = entriesById.get(identifier); + T object = idToEntry.get(identifier); // Warn if an object is missing from the local registry. // This should only happen in AUTHORITATIVE mode, and as such we @@ -342,9 +342,9 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab } // Add the new object, increment nextId to match. - field_26682.size(Math.max(this.field_26682.size(), id + 1)); - field_26682.set(id, object); - field_26683.put(object, id); + rawIdToEntry.size(Math.max(this.rawIdToEntry.size(), id + 1)); + rawIdToEntry.set(id, object); + entryToRawId.put(object, id); if (nextId <= id) { nextId = id + 1; @@ -362,26 +362,26 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab // Emit AddObject events for previously culled objects. for (Identifier id : fabric_prevEntries.keySet()) { - if (!entriesById.containsKey(id)) { + if (!idToEntry.containsKey(id)) { assert fabric_prevIndexedEntries.containsKey(id); addedIds.add(id); } } - entriesById.clear(); - entriesByKey.clear(); + idToEntry.clear(); + keyToEntry.clear(); - entriesById.putAll(fabric_prevEntries); + idToEntry.putAll(fabric_prevEntries); for (Map.Entry<Identifier, T> entry : fabric_prevEntries.entrySet()) { //noinspection unchecked - entriesByKey.put(RegistryKey.of(RegistryKey.ofRegistry(((Registry) Registry.REGISTRIES).getId(this)), entry.getKey()), entry.getValue()); + keyToEntry.put(RegistryKey.of(RegistryKey.ofRegistry(((Registry) Registry.REGISTRIES).getId(this)), entry.getKey()), entry.getValue()); } remap(name, fabric_prevIndexedEntries, RemapMode.AUTHORITATIVE); for (Identifier id : addedIds) { - fabric_getAddObjectEvent().invoker().onEntryAdded(field_26683.getInt(entriesById.get(id)), id, entriesById.get(id)); + fabric_getAddObjectEvent().invoker().onEntryAdded(entryToRawId.getInt(idToEntry.get(id)), id, idToEntry.get(id)); } fabric_prevIndexedEntries = null; diff --git a/fabric-rendering-fluids-v1/build.gradle b/fabric-rendering-fluids-v1/build.gradle index aa3d4c4cb..423d9dc81 100644 --- a/fabric-rendering-fluids-v1/build.gradle +++ b/fabric-rendering-fluids-v1/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-rendering-fluids-v1" -version = getSubprojectVersion(project, "0.1.10") +version = getSubprojectVersion(project, "0.1.11") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/impl/client/rendering/fluid/FluidRenderHandlerRegistryImpl.java b/fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/impl/client/rendering/fluid/FluidRenderHandlerRegistryImpl.java index 3c63d9db0..e3cff30a3 100644 --- a/fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/impl/client/rendering/fluid/FluidRenderHandlerRegistryImpl.java +++ b/fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/impl/client/rendering/fluid/FluidRenderHandlerRegistryImpl.java @@ -27,14 +27,14 @@ import net.minecraft.fluid.Fluids; import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.world.BlockRenderView; -import net.minecraft.world.biome.BuiltInBiomes; +import net.minecraft.world.biome.BiomeKeys; import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandler; import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry; public class FluidRenderHandlerRegistryImpl implements FluidRenderHandlerRegistry { public static final FluidRenderHandlerRegistryImpl INSTANCE = new FluidRenderHandlerRegistryImpl(); - private static final int DEFAULT_WATER_COLOR = BuiltinRegistries.BIOME.get(BuiltInBiomes.OCEAN).getWaterColor(); + private static final int DEFAULT_WATER_COLOR = BuiltinRegistries.BIOME.get(BiomeKeys.OCEAN).getWaterColor(); private final Map<Fluid, FluidRenderHandler> handlers = new IdentityHashMap<>(); private final Map<Fluid, FluidRenderHandler> modHandlers = new IdentityHashMap<>(); diff --git a/fabric-structure-api-v1/build.gradle b/fabric-structure-api-v1/build.gradle index 94fe96077..0ba052e4e 100644 --- a/fabric-structure-api-v1/build.gradle +++ b/fabric-structure-api-v1/build.gradle @@ -1,2 +1,2 @@ archivesBaseName = "fabric-structure-api-v1" -version = getSubprojectVersion(project, "1.0.0") +version = getSubprojectVersion(project, "1.0.1") diff --git a/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/api/structure/v1/FabricStructureBuilder.java b/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/api/structure/v1/FabricStructureBuilder.java index dc957adb5..1d6603be5 100644 --- a/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/api/structure/v1/FabricStructureBuilder.java +++ b/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/api/structure/v1/FabricStructureBuilder.java @@ -193,7 +193,7 @@ public final class FabricStructureBuilder<FC extends FeatureConfig, S extends St if (adjustsSurface) { StructureFeatureAccessor.setSurfaceAdjustingStructures(ImmutableList.<StructureFeature<?>>builder() - .addAll(StructureFeature.field_24861) + .addAll(StructureFeature.JIGSAW_STRUCTURES) .add(structure) .build()); } diff --git a/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/mixin/structure/StructureFeatureAccessor.java b/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/mixin/structure/StructureFeatureAccessor.java index 4f6dcf1ae..9c553bec4 100644 --- a/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/mixin/structure/StructureFeatureAccessor.java +++ b/fabric-structure-api-v1/src/main/java/net/fabricmc/fabric/mixin/structure/StructureFeatureAccessor.java @@ -28,7 +28,7 @@ import net.minecraft.world.gen.feature.StructureFeature; @Mixin(StructureFeature.class) public interface StructureFeatureAccessor { - @Accessor("field_24861") + @Accessor("JIGSAW_STRUCTURES") @Mutable static void setSurfaceAdjustingStructures(List<StructureFeature<?>> surfaceAdjustingStructures) { throw new AssertionError("Untransformed accessor");