Skip to content

Commit

Permalink
Further fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
apple502j committed Aug 29, 2024
1 parent d894af2 commit 3e72cd2
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@

package net.fabricmc.fabric.test.lookup;

import net.minecraft.block.Block;
import net.minecraft.registry.RegistryKey;

import net.minecraft.registry.RegistryKeys;

import org.jetbrains.annotations.NotNull;

import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.Direction;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public WorldgenProvider(FabricDataOutput output, CompletableFuture<RegistryWrapp

@Override
protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) {
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.BIOME));
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE));
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.CONFIGURED_FEATURE));
entries.addAll(registries.getOrThrow(RegistryKeys.BIOME));
entries.addAll(registries.getOrThrow(RegistryKeys.PLACED_FEATURE));
entries.addAll(registries.getOrThrow(RegistryKeys.CONFIGURED_FEATURE));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@

package net.fabricmc.fabric.test.object.builder;

import net.minecraft.block.Block;
import net.minecraft.registry.RegistryKey;

import net.minecraft.registry.RegistryKeys;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.minecraft.block.Block;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;

public final class ObjectBuilderTestConstants {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package net.fabricmc.fabric.test.renderer;

import java.util.function.Function;

import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
Expand All @@ -24,14 +26,11 @@
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;

import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;

import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;

import java.util.function.Function;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;

public final class Registration {
public static final FrameBlock FRAME_BLOCK = register("frame", FrameBlock::new, AbstractBlock.Settings.copy(Blocks.IRON_BLOCK).nonOpaque());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
public class RecipeManagerMixin extends SinglePreparationResourceReloaderMixin {
@Shadow
@Final
private RegistryWrapper.WrapperLookup registryLookup;
private RegistryWrapper.WrapperLookup registries;

@Override
protected @Nullable RegistryOps.RegistryInfoGetter fabric_getRegistryLookup() {
return new RegistryOps.CachedRegistryInfoGetter(registryLookup);
return new RegistryOps.CachedRegistryInfoGetter(registries);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
public class ServerAdvancementLoaderMixin extends SinglePreparationResourceReloaderMixin {
@Shadow
@Final
private RegistryWrapper.WrapperLookup registryLookup;
private RegistryWrapper.WrapperLookup registries;

@Override
protected @Nullable RegistryOps.RegistryInfoGetter fabric_getRegistryLookup() {
return new RegistryOps.CachedRegistryInfoGetter(this.registryLookup);
return new RegistryOps.CachedRegistryInfoGetter(this.registries);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private RegistryWrapper.WrapperLookup getWrapperLookup(List<ResourceReloader> li

for (ResourceReloader resourceReloader : listeners) {
if (resourceReloader instanceof RecipeManager recipeManager) {
return recipeManager.registryLookup;
return recipeManager.registries;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ accessible method net/minecraft/resource/NamespaceResourceManager getMetadataPat
accessible method net/minecraft/resource/NamespaceResourceManager loadMetadata (Lnet/minecraft/resource/InputSupplier;)Lnet/minecraft/resource/metadata/ResourceMetadata;
accessible field net/minecraft/resource/FileResourcePackProvider source Lnet/minecraft/resource/ResourcePackSource;
accessible field net/minecraft/resource/ResourcePackManager providers Ljava/util/Set;
accessible field net/minecraft/recipe/RecipeManager registryLookup Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;
accessible field net/minecraft/recipe/RecipeManager registries Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;

0 comments on commit 3e72cd2

Please sign in to comment.