Skip to content

Commit

Permalink
Append type to deferred data component class name
Browse files Browse the repository at this point in the history
  • Loading branch information
ApexModder committed Sep 5, 2024
1 parent 0f93b05 commit c92fc44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
/**
* Specialized DeferredRegister for {@link DataComponentType DataComponentTypes} that uses the specialized {@link DeferredDataComponentType} as the return type for {@link #register}.
*/
public class DeferredDataComponents extends DeferredRegister<DataComponentType<?>> {
protected DeferredDataComponents(String namespace) {
public class DeferredDataComponentTypes extends DeferredRegister<DataComponentType<?>> {
protected DeferredDataComponentTypes(String namespace) {
super(Registries.DATA_COMPONENT_TYPE, namespace);
}

Expand All @@ -41,7 +41,7 @@ public <TComponent> DeferredDataComponentType<TComponent> registerComponentType(
*
* @param namespace The namespace for all objects registered to this DeferredRegister
*/
public static DeferredDataComponents createDataComponents(String namespace) {
return new DeferredDataComponents(namespace);
public static DeferredDataComponentTypes createDataComponentTypes(String namespace) {
return new DeferredDataComponentTypes(namespace);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import net.neoforged.neoforge.event.server.ServerStartedEvent;
import net.neoforged.neoforge.registries.deferred.DeferredBlock;
import net.neoforged.neoforge.registries.deferred.DeferredBlocks;
import net.neoforged.neoforge.registries.deferred.DeferredDataComponents;
import net.neoforged.neoforge.registries.deferred.DeferredDataComponentTypes;
import net.neoforged.neoforge.registries.deferred.DeferredHolder;
import net.neoforged.neoforge.registries.deferred.DeferredItem;
import net.neoforged.neoforge.registries.deferred.DeferredItems;
Expand All @@ -45,7 +45,7 @@ public class DeferredRegistryTest {
private static final Logger LOGGER = LogManager.getLogger();

private static final DeferredBlocks BLOCKS = DeferredBlocks.createBlocks(MODID);
private static final DeferredDataComponents COMPONENTS = DeferredDataComponents.createDataComponents(MODID);
private static final DeferredDataComponentTypes COMPONENTS = DeferredDataComponentTypes.createDataComponentTypes(MODID);
private static final DeferredItems ITEMS = DeferredItems.createItems(MODID);
private static final ResourceKey<Registry<Custom>> CUSTOM_REGISTRY_KEY = ResourceKey.createRegistryKey(ResourceLocation.fromNamespaceAndPath(MODID, "test_registry"));
private static final DeferredRegister<Custom> CUSTOMS = DeferredRegister.create(CUSTOM_REGISTRY_KEY, MODID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
import net.neoforged.neoforge.fluids.SimpleFluidContent;
import net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple;
import net.neoforged.neoforge.registries.deferred.DeferredDataComponentType;
import net.neoforged.neoforge.registries.deferred.DeferredDataComponents;
import net.neoforged.neoforge.registries.deferred.DeferredDataComponentTypes;
import net.neoforged.neoforge.registries.deferred.DeferredItem;
import net.neoforged.neoforge.registries.deferred.DeferredItems;

@Mod(CustomFluidContainerTest.MODID)
public class CustomFluidContainerTest {
public static final String MODID = "custom_fluid_container_test";
public static final DeferredItems ITEMS = DeferredItems.createItems(MODID);
public static final DeferredDataComponents COMPONENT_TYPES = DeferredDataComponents.createDataComponents(MODID);
public static final DeferredDataComponentTypes COMPONENT_TYPES = DeferredDataComponentTypes.createDataComponentTypes(MODID);

public static final boolean ENABLED = true;

Expand Down

0 comments on commit c92fc44

Please sign in to comment.