Class EntityConfig<T extends net.minecraft.world.entity.Entity>
java.lang.Object
org.cyclops.cyclopscore.config.extendedconfig.ExtendedConfig<C,I>
org.cyclops.cyclopscore.config.extendedconfig.ExtendedConfigForge<EntityConfig<T>,net.minecraft.world.entity.EntityType<T>>
org.cyclops.cyclopscore.config.extendedconfig.EntityConfig<T>
- Type Parameters:
T
- The entity type
- All Implemented Interfaces:
Comparable<ExtendedConfig<EntityConfig<T>,
net.minecraft.world.entity.EntityType<T>>>
public abstract class EntityConfig<T extends net.minecraft.world.entity.Entity>
extends ExtendedConfigForge<EntityConfig<T>,net.minecraft.world.entity.EntityType<T>>
Config for entities.
- See Also:
-
Field Summary
Fields inherited from class org.cyclops.cyclopscore.config.extendedconfig.ExtendedConfig
configProperties
-
Constructor Summary
ConstructorDescriptionEntityConfig
(ModBase mod, String namedId, Function<EntityConfig<T>, net.minecraft.world.entity.EntityType.Builder<T>> elementConstructor) EntityConfig
(ModBase mod, String namedId, Function<EntityConfig<T>, net.minecraft.world.entity.EntityType.Builder<T>> elementConstructor, BiFunction<EntityConfig<T>, Supplier<net.minecraft.world.entity.EntityType<T>>, ItemConfig> spawnEggItemConstructor) -
Method Summary
Modifier and TypeMethodDescriptionReturn the configurable type for which this config holds datastatic <T extends net.minecraft.world.entity.Mob>
BiFunction<EntityConfig<T>,Supplier<net.minecraft.world.entity.EntityType<T>>, ItemConfig> getDefaultSpawnEggItemConfigConstructor
(ModBase mod, String itemName, int primaryColorIn, int secondaryColorIn) static <T extends net.minecraft.world.entity.Mob>
BiFunction<EntityConfig<T>,Supplier<net.minecraft.world.entity.EntityType<T>>, ItemConfig> getDefaultSpawnEggItemConfigConstructor
(ModBase mod, String itemName, int primaryColorIn, int secondaryColorIn, Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.Properties> itemPropertiesModifier) net.minecraftforge.registries.IForgeRegistry<net.minecraft.world.entity.EntityType<?>>
abstract net.minecraft.client.renderer.entity.EntityRenderer<? super T>
getRender
(net.minecraft.client.renderer.entity.EntityRendererProvider.Context renderContext, net.minecraft.client.renderer.entity.ItemRenderer renderItem) Get the render for this configurable.Get the unlocalized name (must be unique!) for this configurable.void
Overridable method that is called after the element of this config is fully registered, after theFMLCommonSetupEvent
.void
setSpawnEggItemConfig
(ItemConfig spawnEggItemConfig) Methods inherited from class org.cyclops.cyclopscore.config.extendedconfig.ExtendedConfigForge
getResourceKey
Methods inherited from class org.cyclops.cyclopscore.config.extendedconfig.ExtendedConfig
compareTo, downCast, getConfigPropertyPrefix, getFullTranslationKey, getInstance, getSubUniqueName, initializeInstance, onConfigPropertyReload, onForgeRegistered, save, showDoubleInitError
-
Constructor Details
-
EntityConfig
-
EntityConfig
public EntityConfig(ModBase mod, String namedId, Function<EntityConfig<T>, net.minecraft.world.entity.EntityType.Builder<T>> elementConstructor, @Nullable BiFunction<EntityConfig<T>, Supplier<net.minecraft.world.entity.EntityType<T>>, ItemConfig> spawnEggItemConstructor)
-
-
Method Details
-
getDefaultSpawnEggItemConfigConstructor
public static <T extends net.minecraft.world.entity.Mob> BiFunction<EntityConfig<T>,Supplier<net.minecraft.world.entity.EntityType<T>>, getDefaultSpawnEggItemConfigConstructorItemConfig> (ModBase mod, String itemName, int primaryColorIn, int secondaryColorIn) -
getDefaultSpawnEggItemConfigConstructor
public static <T extends net.minecraft.world.entity.Mob> BiFunction<EntityConfig<T>,Supplier<net.minecraft.world.entity.EntityType<T>>, getDefaultSpawnEggItemConfigConstructorItemConfig> (ModBase mod, String itemName, int primaryColorIn, int secondaryColorIn, @Nullable Function<net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.Properties> itemPropertiesModifier) -
getTranslationKey
Description copied from class:ExtendedConfig
Get the unlocalized name (must be unique!) for this configurable.- Specified by:
getTranslationKey
in classExtendedConfig<EntityConfig<T extends net.minecraft.world.entity.Entity>,
net.minecraft.world.entity.EntityType<T extends net.minecraft.world.entity.Entity>> - Returns:
- The unlocalized name.
-
getConfigurableType
Description copied from class:ExtendedConfig
Return the configurable type for which this config holds data- Specified by:
getConfigurableType
in classExtendedConfig<EntityConfig<T extends net.minecraft.world.entity.Entity>,
net.minecraft.world.entity.EntityType<T extends net.minecraft.world.entity.Entity>> - Returns:
- the type of the configurable to where the config belongs
-
onRegistered
public void onRegistered()Description copied from class:ExtendedConfig
Overridable method that is called after the element of this config is fully registered, after theFMLCommonSetupEvent
.- Overrides:
onRegistered
in classExtendedConfig<EntityConfig<T extends net.minecraft.world.entity.Entity>,
net.minecraft.world.entity.EntityType<T extends net.minecraft.world.entity.Entity>>
-
getRender
public abstract net.minecraft.client.renderer.entity.EntityRenderer<? super T> getRender(net.minecraft.client.renderer.entity.EntityRendererProvider.Context renderContext, net.minecraft.client.renderer.entity.ItemRenderer renderItem) Get the render for this configurable.- Parameters:
renderContext
- The render context.renderItem
- The render item instance.- Returns:
- Get the render.
-
getRegistry
public net.minecraftforge.registries.IForgeRegistry<net.minecraft.world.entity.EntityType<?>> getRegistry()- Specified by:
getRegistry
in classExtendedConfigForge<EntityConfig<T extends net.minecraft.world.entity.Entity>,
net.minecraft.world.entity.EntityType<T extends net.minecraft.world.entity.Entity>> - Returns:
- The registry in which this should be registered.
-
setSpawnEggItemConfig
-