Search in sources :

Example 1 with ForgeSolidCubePropertyStore

use of org.spongepowered.mod.data.ForgeSolidCubePropertyStore in project SpongeForge by SpongePowered.

the class SpongeForgeModuleRegistry method registerForgeData.

public static void registerForgeData() {
    SpongePropertyRegistry propertyRegistry = SpongeImpl.getPropertyRegistry();
    // Property registration
    propertyRegistry.register(LightEmissionProperty.class, new ForgeLightEmissionPropertyStore());
    propertyRegistry.register(MatterProperty.class, new ForgeMatterPropertyStore());
    propertyRegistry.register(SolidCubeProperty.class, new ForgeSolidCubePropertyStore());
    // Data registration
    DataUtil.registerDualProcessor(FluidTankData.class, SpongeFluidTankData.class, ImmutableFluidTankData.class, ImmutableSpongeFluidTankData.class, new ForgeFluidTankDataProcessor());
    // Value registration
    // Populator types
    PopulatorTypeRegistryModule populatorTypeModule = PopulatorTypeRegistryModule.getInstance();
    populatorTypeModule.customTypeFunction = (type) -> new SpongePopulatorType(type.getSimpleName(), StaticMixinForgeHelper.getModIdFromClass(type));
}
Also used : PopulatorTypeRegistryModule(org.spongepowered.common.registry.type.world.gen.PopulatorTypeRegistryModule) ForgeLightEmissionPropertyStore(org.spongepowered.mod.data.ForgeLightEmissionPropertyStore) ForgeFluidTankDataProcessor(org.spongepowered.mod.data.ForgeFluidTankDataProcessor) SpongePropertyRegistry(org.spongepowered.common.data.property.SpongePropertyRegistry) ForgeMatterPropertyStore(org.spongepowered.mod.data.ForgeMatterPropertyStore) ForgeSolidCubePropertyStore(org.spongepowered.mod.data.ForgeSolidCubePropertyStore) SpongePopulatorType(org.spongepowered.common.world.gen.SpongePopulatorType)

Aggregations

SpongePropertyRegistry (org.spongepowered.common.data.property.SpongePropertyRegistry)1 PopulatorTypeRegistryModule (org.spongepowered.common.registry.type.world.gen.PopulatorTypeRegistryModule)1 SpongePopulatorType (org.spongepowered.common.world.gen.SpongePopulatorType)1 ForgeFluidTankDataProcessor (org.spongepowered.mod.data.ForgeFluidTankDataProcessor)1 ForgeLightEmissionPropertyStore (org.spongepowered.mod.data.ForgeLightEmissionPropertyStore)1 ForgeMatterPropertyStore (org.spongepowered.mod.data.ForgeMatterPropertyStore)1 ForgeSolidCubePropertyStore (org.spongepowered.mod.data.ForgeSolidCubePropertyStore)1