Skip to content

Commit

Permalink
Stop the server crashing on load (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramidzkh authored May 27, 2022
1 parent 2a06108 commit fad4296
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/appbot/ABItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static appbot.AppliedBotanics.id;

import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
import net.minecraft.Util;
import net.minecraft.core.Registry;
import net.minecraft.world.entity.player.Player;
Expand Down Expand Up @@ -106,7 +105,6 @@ public void openChestGui(Player player, IChestOrDrive chest, ICellHandler cellHa

for (var tier : Tier.values()) {
var cell = get(tier);
ColorProviderRegistry.ITEM.register(BasicStorageCell::getColor, cell);
StorageCellModels.registerModel(cell, id("block/drive/cells/" + Registry.ITEM.getKey(cell).getPath()));
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/appbot/client/AppliedBotanicsClient.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
package appbot.client;

import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;

import appbot.ABItems;
import appbot.ABMenus;
import appbot.ae2.ManaKey;
import appbot.ae2.ManaKeyType;

import appeng.api.client.AEStackRendering;
import appeng.client.gui.me.common.MEStorageScreen;
import appeng.init.client.InitScreens;
import appeng.items.storage.BasicStorageCell;
import appeng.menu.me.common.MEStorageMenu;

public interface AppliedBotanicsClient {

static void initialize() {
AEStackRendering.register(ManaKeyType.TYPE, ManaKey.class, new ManaRenderer());

for (var tier : ABItems.Tier.values()) {
ColorProviderRegistry.ITEM.register(BasicStorageCell::getColor, ABItems.get(tier));
}

InitScreens.<MEStorageMenu, MEStorageScreen<MEStorageMenu>>register(ABMenus.PORTABLE_MANA_CELL_TYPE,
MEStorageScreen::new, "/screens/terminals/portable_mana_cell.json");
}
Expand Down

0 comments on commit fad4296

Please sign in to comment.