ChoiceIsMe

EntityTypeInit

Aug 3rd, 2021
35
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package io.github.choiceisme.core.init;
  2.  
  3. import io.github.choiceisme.WeatherMod;
  4. import io.github.choiceisme.common.entity.ExampleEntity;
  5. import net.minecraft.entity.EntityClassification;
  6. import net.minecraft.entity.EntityType;
  7. import net.minecraft.util.ResourceLocation;
  8. import net.minecraftforge.fml.RegistryObject;
  9. import net.minecraftforge.registries.DeferredRegister;
  10. import net.minecraftforge.registries.ForgeRegistries;
  11.  
  12. public class EntityTypeInit {
  13.  
  14. public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, WeatherMod.MOD_ID);
  15.  
  16. public static final RegistryObject<EntityType<ExampleEntity>> EXAMPLE = ENTITY_TYPES.register("example",
  17. () -> EntityType.Builder.of(ExampleEntity::new, EntityClassification.MONSTER).sized(1.0f, 1.0f)
  18. .build(new ResourceLocation(WeatherMod.MOD_ID, "example").toString()));
  19.  
  20.  
  21. }
  22.  
  23.  
RAW Paste Data