diff --git a/src/main/java/net/neoforged/neoforge/capabilities/BlockCapability.java b/src/main/java/net/neoforged/neoforge/capabilities/BlockCapability.java index d4a06ed33d0..0d8cbcc418b 100644 --- a/src/main/java/net/neoforged/neoforge/capabilities/BlockCapability.java +++ b/src/main/java/net/neoforged/neoforge/capabilities/BlockCapability.java @@ -126,7 +126,7 @@ public static BlockCapability createVoid(ResourceLocation name, Cla } // INTERNAL - private static final CapabilityRegistry> registry = new CapabilityRegistry(BlockCapability::new); + private static final CapabilityRegistry> registry = new CapabilityRegistry>(BlockCapability::new); private BlockCapability(ResourceLocation name, Class typeClass, Class contextClass) { super(name, typeClass, contextClass); diff --git a/src/main/java/net/neoforged/neoforge/capabilities/EntityCapability.java b/src/main/java/net/neoforged/neoforge/capabilities/EntityCapability.java index bee92bb5763..762b825a69f 100644 --- a/src/main/java/net/neoforged/neoforge/capabilities/EntityCapability.java +++ b/src/main/java/net/neoforged/neoforge/capabilities/EntityCapability.java @@ -84,7 +84,7 @@ public static EntityCapability createVoid(ResourceLocation name, Cl } // INTERNAL - private static final CapabilityRegistry> registry = new CapabilityRegistry(EntityCapability::new); + private static final CapabilityRegistry> registry = new CapabilityRegistry>(EntityCapability::new); private EntityCapability(ResourceLocation name, Class typeClass, Class contextClass) { super(name, typeClass, contextClass); diff --git a/src/main/java/net/neoforged/neoforge/capabilities/ItemCapability.java b/src/main/java/net/neoforged/neoforge/capabilities/ItemCapability.java index 4a235452147..1c383384d71 100644 --- a/src/main/java/net/neoforged/neoforge/capabilities/ItemCapability.java +++ b/src/main/java/net/neoforged/neoforge/capabilities/ItemCapability.java @@ -75,7 +75,7 @@ public static ItemCapability createVoid(ResourceLocation name, Clas } // INTERNAL - private static final CapabilityRegistry> registry = new CapabilityRegistry(ItemCapability::new); + private static final CapabilityRegistry> registry = new CapabilityRegistry>(ItemCapability::new); private ItemCapability(ResourceLocation name, Class typeClass, Class contextClass) { super(name, typeClass, contextClass); diff --git a/src/main/java/net/neoforged/neoforge/registries/DeferredRegister.java b/src/main/java/net/neoforged/neoforge/registries/DeferredRegister.java index 6fbbf15f2bc..cfc0fcd1023 100644 --- a/src/main/java/net/neoforged/neoforge/registries/DeferredRegister.java +++ b/src/main/java/net/neoforged/neoforge/registries/DeferredRegister.java @@ -156,8 +156,8 @@ public static DeferredRegister.Blocks createBlocks(String modid) { private final ResourceKey> registryKey; private final String namespace; - private final Map, Supplier> entries = new LinkedHashMap<>(); - private final Set> entriesView = Collections.unmodifiableSet(entries.keySet()); + private final Map, Supplier> entries = new LinkedHashMap<>(); + private final Set> entriesView = Collections.unmodifiableSet(entries.keySet()); private final Map aliases = new HashMap<>(); @Nullable @@ -292,7 +292,7 @@ public void register(IEventBus bus) { /** * @return The unmodifiable view of registered entries. Useful for bulk operations on all values. */ - public Collection> getEntries() { + public Collection> getEntries() { return entriesView; } @@ -340,7 +340,7 @@ private void addEntries(RegisterEvent event) { this.seenRegisterEvent = true; Registry registry = event.getRegistry(this.registryKey); this.aliases.forEach(registry::addAlias); - for (Entry, Supplier> e : entries.entrySet()) { + for (Entry, Supplier> e : entries.entrySet()) { event.register(this.registryKey, e.getKey().getId(), () -> e.getValue().get()); e.getKey().bind(false); }