Skip to content

Commit

Permalink
Tryna fix the server error thingy
Browse files Browse the repository at this point in the history
Signed-off-by: Type-32 <[email protected]>
  • Loading branch information
Type-32 committed Jun 4, 2024
1 parent b2200d8 commit aba9309
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ private void processIMC(final InterModProcessEvent event) {

private void clientSetup(final FMLClientSetupEvent event) {
// event.enqueueWork(() -> );
MenuScreens.register(ModContainers.DECOMPONENTALIZER.get(), DecomponentalizerScreen::new);
ItemBlockRenderTypes.setRenderLayer(ModBlocks.DECOMPONENTALIZER.get(), RenderType.translucent());
}

Expand All @@ -87,20 +86,4 @@ public void onServerStarting(ServerStartingEvent event) {
// Do something when the server starts
LOGGER.info("HELLO from server starting");
}

// You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
// Event bus for receiving Registry Events)
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
public static class RegistryEvents {
// @SubscribeEvent
// public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
// // Register a new block here
// LOGGER.info("HELLO from Register Block");
// }
//
// @SubscribeEvent
// public static void onItemsRegistry(final RegistryEvent.Register<Item> itemRegistryEvent) {
// LOGGER.info("M4A1 registry size {}; cast {}; blueprint {}", ModItems.M4A1.registry.size(), ModItems.M4A1.castsRegistry.size(), ModItems.M4A1.blueprintsRegistry.size());
// }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package cn.crtlprototypestudios.precisemanufacturing.foundation;

import cn.crtlprototypestudios.precisemanufacturing.foundation.client.gui.decomponentalizer.DecomponentalizerScreen;
import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;

@Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
public class ModContainerScreens {
@SubscribeEvent
public static void clientSetup(FMLClientSetupEvent evt) {
evt.enqueueWork(() -> MenuScreens.register(ModContainers.DECOMPONENTALIZER.get(), DecomponentalizerScreen::new));
}
}

0 comments on commit aba9309

Please sign in to comment.