Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Dec 4, 2023
1 parent 8947701 commit ce87dc7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ private static void addItemsToTabs(BuildCreativeModeTabContentsEvent event) {
});
}


private static void onAddReloadListeners(AddReloadListenerEvent event) {
RegisterReloadListenerEvent.EVENT.invoke(new RegisterReloadListenerEvent((id, listener) -> event.addListener(listener)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.faboslav.friendsandfoes.FriendsAndFoes;
import com.faboslav.friendsandfoes.FriendsAndFoesClient;
import com.faboslav.friendsandfoes.events.lifecycle.RegisterReloadListenerEvent;
import com.faboslav.friendsandfoes.init.FriendsAndFoesEntityTypes;
import com.faboslav.friendsandfoes.init.FriendsAndFoesStructurePoolElements;
import com.faboslav.friendsandfoes.network.neoforge.PacketHandler;
Expand All @@ -26,6 +27,7 @@
import net.neoforged.fml.javafmlmod.FMLJavaModLoadingContext;
import net.neoforged.fml.loading.FMLEnvironment;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.AddReloadListenerEvent;
import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent;
import net.neoforged.neoforge.event.entity.EntityAttributeCreationEvent;
import net.neoforged.neoforge.event.level.LevelEvent;
Expand Down Expand Up @@ -71,6 +73,7 @@ public FriendsAndFoesNeoForge() {
var neoForgeBus = NeoForge.EVENT_BUS;
neoForgeBus.addListener(FriendsAndFoesNeoForge::initSpawners);
neoForgeBus.addListener(FriendsAndFoesNeoForge::onServerAboutToStartEvent);
neoForgeBus.addListener(FriendsAndFoesNeoForge::onAddReloadListeners);
}

private static void init(final FMLCommonSetupEvent event) {
Expand Down Expand Up @@ -119,6 +122,10 @@ private static void addItemsToTabs(BuildCreativeModeTabContentsEvent event) {
});
}

private static void onAddReloadListeners(AddReloadListenerEvent event) {
RegisterReloadListenerEvent.EVENT.invoke(new RegisterReloadListenerEvent((id, listener) -> event.addListener(listener)));
}

private static void initSpawners(final LevelEvent.Load event) {
if (
event.getLevel().isClient()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"type": "forge:add_spawns",
"biomes": "#friendsandfoes:has_less_mooblooms",
"biomes": "#friendsandfoes:has_moobloom/any",
"spawners": {
"type": "friendsandfoes:moobloom",
"minCount": 2,
"maxCount": 4,
"weight": 2
"weight": 4
},
"category": "creature"
}

This file was deleted.

0 comments on commit ce87dc7

Please sign in to comment.