20w14infinite

This commit is contained in:
modmuss50 2020-04-01 17:14:44 +01:00
parent b50ffc7bfb
commit f0156552fb
19 changed files with 33 additions and 71 deletions
build.gradle
fabric-biomes-v1
fabric-particles-v1
build.gradle
src/main
java/net/fabricmc/fabric/api/particle/v1
resources
fabric-registry-sync-v0
build.gradle
src/main
java/net/fabricmc/fabric/mixin/registry/sync
resources
fabric-renderer-indigo
src/main/resources

View file

@ -12,8 +12,8 @@ plugins {
def ENV = System.getenv() def ENV = System.getenv()
class Globals { class Globals {
static def baseVersion = "0.5.6" static def baseVersion = "0.5.7"
static def mcVersion = "20w13a" static def mcVersion = "20w14infinite"
static def yarnVersion = "+build.1" static def yarnVersion = "+build.1"
} }

View file

@ -1,2 +1,2 @@
archivesBaseName = "fabric-biomes-v1" archivesBaseName = "fabric-biomes-v1"
version = getSubprojectVersion(project, "0.2.1") version = getSubprojectVersion(project, "0.3.0")

View file

@ -18,8 +18,6 @@ package net.fabricmc.fabric.api.biomes.v1;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.fabricmc.fabric.impl.biome.InternalBiomeData;
/** /**
* API that exposes the internals of Minecraft's nether biome code. * API that exposes the internals of Minecraft's nether biome code.
*/ */
@ -35,6 +33,7 @@ public final class NetherBiomes {
*/ */
@Deprecated @Deprecated
public static void addNetherBiome(Biome biome) { public static void addNetherBiome(Biome biome) {
InternalBiomeData.addNetherBiome(biome); // Not working, as the april fools version broke it, but I want to ensure that most mods can run on this version.
// If this was a normal version I would have removed this api if it couldnt have been fixed.
} }
} }

View file

@ -1,40 +0,0 @@
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.fabricmc.fabric.mixin.biome;
import java.util.HashSet;
import java.util.Set;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.dimension.TheNetherDimension;
import net.fabricmc.fabric.impl.biome.InternalBiomeData;
@Mixin(TheNetherDimension.class)
public class MixinTheNetherDimension {
@ModifyArg(method = "createChunkGenerator", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/biome/source/MultiNoiseBiomeSourceConfig;withBiomes(Ljava/util/Set;)Lnet/minecraft/world/biome/source/MultiNoiseBiomeSourceConfig;"))
protected Set<Biome> modifyNetherBiomes(Set<Biome> set) {
// the provided set is immutable, so we construct our own
Set<Biome> newSet = new HashSet<>(set);
newSet.addAll(InternalBiomeData.getNetherBiomes());
return newSet;
}
}

View file

@ -8,7 +8,6 @@
"MixinAddRiversLayer", "MixinAddRiversLayer",
"MixinBiomeSource", "MixinBiomeSource",
"MixinSetBaseBiomesLayer", "MixinSetBaseBiomesLayer",
"MixinTheNetherDimension",
"MixinVanillaLayeredBiomeSource" "MixinVanillaLayeredBiomeSource"
], ],
"injectors": { "injectors": {

View file

@ -17,7 +17,7 @@
], ],
"depends": { "depends": {
"fabricloader": ">=0.4.0", "fabricloader": ">=0.4.0",
"minecraft": ">=1.16-alpha.20.10.a" "minecraft": "1.16-20.w.14"
}, },
"description": "Hooks for adding biomes to the default world generator.", "description": "Hooks for adding biomes to the default world generator.",
"mixins": [ "mixins": [

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-particles-v1" archivesBaseName = "fabric-particles-v1"
version = getSubprojectVersion(project, "0.1.1") version = getSubprojectVersion(project, "0.1.2")
dependencies { dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev') compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -76,6 +76,6 @@ public final class FabricParticleTypes {
* @param factory A factory for serializing packet data and string command parameters into a particle effect. * @param factory A factory for serializing packet data and string command parameters into a particle effect.
*/ */
public static <T extends ParticleEffect> ParticleType<T> complex(boolean alwaysSpawn, ParticleEffect.Factory<T> factory) { public static <T extends ParticleEffect> ParticleType<T> complex(boolean alwaysSpawn, ParticleEffect.Factory<T> factory) {
return new ParticleType<T>(alwaysSpawn, factory) { }; return new ParticleType<T>(alwaysSpawn, factory, (random, tParticleType) -> (T) tParticleType) { };
} }
} }

View file

@ -4,7 +4,8 @@
"version": "${version}", "version": "${version}",
"license": "Apache-2.0", "license": "Apache-2.0",
"depends": { "depends": {
"fabricloader": ">=0.4.0" "fabricloader": ">=0.4.0",
"minecraft": "1.16-20.w.14"
}, },
"mixins": [ "mixins": [
"fabric-particles-v1.mixins.json" "fabric-particles-v1.mixins.json"

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-registry-sync-v0" archivesBaseName = "fabric-registry-sync-v0"
version = getSubprojectVersion(project, "0.2.9") version = getSubprojectVersion(project, "0.3.0")
dependencies { dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev') compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -40,7 +40,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.collection.Int2ObjectBiMap;
import net.minecraft.util.registry.SimpleRegistry; import net.minecraft.util.registry.SimpleRegistry;
import net.fabricmc.fabric.api.event.Event; import net.fabricmc.fabric.api.event.Event;
@ -56,7 +55,9 @@ import net.fabricmc.fabric.impl.registry.sync.RemappableRegistry;
@Mixin(SimpleRegistry.class) @Mixin(SimpleRegistry.class)
public abstract class MixinIdRegistry<T> implements RemappableRegistry, ListenableRegistry { public abstract class MixinIdRegistry<T> implements RemappableRegistry, ListenableRegistry {
@Shadow @Shadow
protected Int2ObjectBiMap<T> indexedEntries; protected Int2ObjectMap<T> indexedEntries;
@Shadow
protected Object2IntMap<T> field_23632;
@Shadow @Shadow
protected BiMap<Identifier, T> entries; protected BiMap<Identifier, T> entries;
@Shadow @Shadow
@ -124,7 +125,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab
@SuppressWarnings({"unchecked", "ConstantConditions"}) @SuppressWarnings({"unchecked", "ConstantConditions"})
@Inject(method = "set", at = @At("HEAD")) @Inject(method = "set", at = @At("HEAD"))
public void setPre(int id, Identifier identifier, Object object, CallbackInfoReturnable info) { public void setPre(int id, Identifier identifier, Object object, CallbackInfoReturnable info) {
int indexedEntriesId = indexedEntries.getId((T) object); int indexedEntriesId = field_23632.getOrDefault((T) object, -1);
if (indexedEntriesId >= 0) { if (indexedEntriesId >= 0) {
throw new RuntimeException("Attempted to register object " + object + " twice! (at raw IDs " + indexedEntriesId + " and " + id + " )"); throw new RuntimeException("Attempted to register object " + object + " twice! (at raw IDs " + indexedEntriesId + " and " + id + " )");
@ -136,7 +137,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab
T oldObject = entries.get(identifier); T oldObject = entries.get(identifier);
if (oldObject != null && oldObject != object) { if (oldObject != null && oldObject != object) {
int oldId = indexedEntries.getId(oldObject); int oldId = field_23632.getInt(oldObject);
if (oldId != id) { if (oldId != id) {
throw new RuntimeException("Attempted to register ID " + identifier + " at different raw IDs (" + oldId + ", " + id + ")! If you're trying to override an item, use .set(), not .register()!"); throw new RuntimeException("Attempted to register ID " + identifier + " at different raw IDs (" + oldId + ", " + id + ")! If you're trying to override an item, use .set(), not .register()!");
@ -292,7 +293,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab
Int2IntMap idMap = new Int2IntOpenHashMap(); Int2IntMap idMap = new Int2IntOpenHashMap();
for (Object o : indexedEntries) { for (Object o : indexedEntries.values()) {
Identifier id = registry.getId(o); Identifier id = registry.getId(o);
int rid = registry.getRawId(o); int rid = registry.getRawId(o);
@ -327,7 +328,8 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab
} }
// Add the new object, increment nextId to match. // Add the new object, increment nextId to match.
indexedEntries.put(object, id); indexedEntries.put(id, object);
field_23632.put(object, id);
if (nextId <= id) { if (nextId <= id) {
nextId = id + 1; nextId = id + 1;
@ -357,7 +359,7 @@ public abstract class MixinIdRegistry<T> implements RemappableRegistry, Listenab
remap(name, fabric_prevIndexedEntries, RemapMode.AUTHORITATIVE); remap(name, fabric_prevIndexedEntries, RemapMode.AUTHORITATIVE);
for (Identifier id : addedIds) { for (Identifier id : addedIds) {
fabric_getAddObjectEvent().invoker().onEntryAdded(indexedEntries.getId(entries.get(id)), id, entries.get(id)); fabric_getAddObjectEvent().invoker().onEntryAdded(field_23632.getInt(entries.get(id)), id, entries.get(id));
} }
fabric_prevIndexedEntries = null; fabric_prevIndexedEntries = null;

View file

@ -18,7 +18,8 @@
"depends": { "depends": {
"fabricloader": ">=0.4.0", "fabricloader": ">=0.4.0",
"fabric-api-base": "*", "fabric-api-base": "*",
"fabric-networking-v0": "*" "fabric-networking-v0": "*",
"minecraft": "1.16-20.w.14"
}, },
"description": "Syncs registry mappings.", "description": "Syncs registry mappings.",
"mixins": [ "mixins": [

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-renderer-indigo" archivesBaseName = "fabric-renderer-indigo"
version = getSubprojectVersion(project, "0.2.27") version = getSubprojectVersion(project, "0.2.28")
dependencies { dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev') compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -25,10 +25,10 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.WorldRenderer;
import net.minecraft.client.util.math.Matrix4f; import net.minecraft.util.math.Matrix4f;
import net.minecraft.client.util.math.Vector3f; import net.minecraft.client.util.math.Vector3f;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.client.util.math.Matrix3f; import net.minecraft.util.math.Matrix3f;
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext.QuadTransform; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext.QuadTransform;
import net.fabricmc.fabric.impl.client.indigo.renderer.aocalc.AoCalculator; import net.fabricmc.fabric.impl.client.indigo.renderer.aocalc.AoCalculator;

View file

@ -18,8 +18,8 @@ package net.fabricmc.fabric.impl.client.indigo.renderer.render;
import it.unimi.dsi.fastutil.objects.ObjectArrayList; import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.minecraft.client.util.math.Matrix4f; import net.minecraft.util.math.Matrix4f;
import net.minecraft.client.util.math.Matrix3f; import net.minecraft.util.math.Matrix3f;
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;

View file

@ -26,8 +26,8 @@ import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.WorldRenderer;
import net.minecraft.client.render.block.BlockModelRenderer; import net.minecraft.client.render.block.BlockModelRenderer;
import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.util.math.Matrix4f; import net.minecraft.util.math.Matrix4f;
import net.minecraft.client.util.math.Matrix3f; import net.minecraft.util.math.Matrix3f;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockRenderView; import net.minecraft.world.BlockRenderView;

View file

@ -33,7 +33,7 @@ import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.BakedQuad; import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.client.render.model.json.ModelTransformation; import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.render.model.json.ModelTransformation.Mode; import net.minecraft.client.render.model.json.ModelTransformation.Mode;
import net.minecraft.client.util.math.Matrix4f; import net.minecraft.util.math.Matrix4f;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.client.util.math.Vector3f; import net.minecraft.client.util.math.Vector3f;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -24,12 +24,12 @@ import net.minecraft.client.render.chunk.ChunkBuilder.ChunkData;
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk; import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk;
import net.minecraft.client.render.chunk.ChunkRendererRegion; import net.minecraft.client.render.chunk.ChunkRendererRegion;
import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.util.math.Matrix4f; import net.minecraft.util.math.Matrix4f;
import net.minecraft.util.crash.CrashException; import net.minecraft.util.crash.CrashException;
import net.minecraft.util.crash.CrashReport; import net.minecraft.util.crash.CrashReport;
import net.minecraft.util.crash.CrashReportSection; import net.minecraft.util.crash.CrashReportSection;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.client.util.math.Matrix3f; import net.minecraft.util.math.Matrix3f;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;

View file

@ -17,7 +17,7 @@
], ],
"depends": { "depends": {
"fabricloader": ">=0.7.8", "fabricloader": ">=0.7.8",
"minecraft": "~1.16-alpha.20.10.a" "minecraft": "1.16-20.w.14"
}, },
"description": "Core API module providing key hooks and intercompatibility features." "description": "Core API module providing key hooks and intercompatibility features."
} }