mirror of
https://github.com/FatherToast/SpecialMobs.git
synced 2025-04-24 22:34:58 +00:00
Lol
This commit is contained in:
parent
682cdb6063
commit
0dd7bcc158
2 changed files with 32 additions and 1 deletions
|
@ -4,7 +4,9 @@ import fathertoast.specialmobs.common.bestiary.MobFamily;
|
|||
import fathertoast.specialmobs.common.config.Config;
|
||||
import fathertoast.specialmobs.common.core.register.SMEntities;
|
||||
import fathertoast.specialmobs.common.core.register.SMItems;
|
||||
import fathertoast.specialmobs.common.event.BiomeEvents;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
|
@ -101,7 +103,8 @@ public class SpecialMobs {
|
|||
//packetHandler.registerMessages();
|
||||
|
||||
//MinecraftForge.EVENT_BUS.register( new SMEventListener() );
|
||||
|
||||
MinecraftForge.EVENT_BUS.register( new BiomeEvents() );
|
||||
|
||||
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
|
||||
eventBus.addListener( SMEntities::createAttributes );
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package fathertoast.specialmobs.common.event;
|
||||
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.MobSpawnInfo;
|
||||
import net.minecraftforge.common.world.MobSpawnInfoBuilder;
|
||||
import net.minecraftforge.event.world.BiomeLoadingEvent;
|
||||
import net.minecraftforge.eventbus.api.EventPriority;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
public class BiomeEvents {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGH)
|
||||
public void onBiomeLoad(BiomeLoadingEvent event) {
|
||||
// Vanilla biome weirdness. Registry name can be null
|
||||
if (event.getName() == null)
|
||||
return;
|
||||
|
||||
// TODO - This is the place to add spawns to biomes if needed, rather than replacing
|
||||
|
||||
//MobSpawnInfoBuilder spawnInfoBuilder = event.getSpawns();
|
||||
|
||||
//for (EntityType<?> entityType : spawnInfoBuilder.getEntityTypes()) {
|
||||
// if (Thing.hasMobVariant(entityType)) {
|
||||
// spawnInfoBuilder.addSpawn(entityType.getCategory(), new MobSpawnInfo.Spawners(woah, ohMan, aaaugh, HAAAAUGGHHH));
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue