From e58628c16ac36d489bac60f89dbc433d6d53b93c Mon Sep 17 00:00:00 2001 From: Matteo_fey Date: Sat, 1 Feb 2025 12:35:59 +0100 Subject: [PATCH] mainClass slight cleanup --- .../ugi/sculk_depths/SculkDepthsClient.java | 7 ++-- .../net/ugi/sculk_depths/SculkDepths.java | 36 ++++++++++++------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/client/java/net/ugi/sculk_depths/SculkDepthsClient.java b/src/client/java/net/ugi/sculk_depths/SculkDepthsClient.java index f1b66a8c..4f2ebdf9 100644 --- a/src/client/java/net/ugi/sculk_depths/SculkDepthsClient.java +++ b/src/client/java/net/ugi/sculk_depths/SculkDepthsClient.java @@ -35,8 +35,8 @@ public class SculkDepthsClient implements ClientModInitializer { public void onInitializeClient() { // This entrypoint is suitable for setting up client-specific logic, such as rendering. - SculkDepths.LOGGER.info("Registering tooltips for " + SculkDepths.MOD_ID); - //CrystalUpgrade.tooltipAdd(); +/* SculkDepths.LOGGER.info("Registering tooltips for " + SculkDepths.MOD_ID); + CrystalUpgrade.tooltipAdd();*/ SculkDepths.LOGGER.info("Registering clientSounds for " + SculkDepths.MOD_ID); ClientTickEvents.START_WORLD_TICK.register(new ConditionalSoundPlayerClient()); @@ -62,7 +62,7 @@ public void onInitializeClient() { CustomItemModels.QuazarithBootsModels(); - + SculkDepths.LOGGER.info("Registering EntityRenderers for " + SculkDepths.MOD_ID); EntityRendererRegistry.register(ModEntities.GLOMPER, GlomperRenderer::new); EntityRendererRegistry.register(ModEntities.LESTER, LesterRenderer::new); EntityRendererRegistry.register(ModEntities.CHOMPER_COLOSSUS, ChomperColossusRenderer::new); @@ -71,6 +71,7 @@ public void onInitializeClient() { EntityModelLayerRegistry.registerModelLayer(ModModelLayers.CHOMPER_COLOSSUS, ChomperColossusModel::getTexturedModelData); RenderLayer.getEntityTranslucent(GlomperRenderer.GLOMPER_TEXTURE,false); + SculkDepths.LOGGER.info("Cutting RenderLayers for " + SculkDepths.MOD_ID); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.VALTROX_SAPLING, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.POTTED_VALTROX_SAPLING, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.POTTED_PENEBRIUM_SHROOM, RenderLayer.getCutout()); diff --git a/src/main/java/net/ugi/sculk_depths/SculkDepths.java b/src/main/java/net/ugi/sculk_depths/SculkDepths.java index 92768864..8fa2893f 100644 --- a/src/main/java/net/ugi/sculk_depths/SculkDepths.java +++ b/src/main/java/net/ugi/sculk_depths/SculkDepths.java @@ -50,54 +50,64 @@ public static Identifier identifier(String path) { } @Override public void onInitialize() { - SpawnRestriction.register(ModEntities.LESTER, SpawnLocationTypes.ON_GROUND, null, (type, world, reason, pos, random) -> true); - SpawnRestriction.register(ModEntities.CHOMPER_COLOSSUS, SpawnLocationTypes.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, (type, world, reason, pos, random) -> true); SculkDepths.LOGGER.info("Loading Config for " + SculkDepths.MOD_ID); Config.loadConfig(); - SculkDepths.LOGGER.info("Registering Itemgroups for " + SculkDepths.MOD_ID); + + SculkDepths.LOGGER.info("Registering ItemGroups for " + SculkDepths.MOD_ID); ModItemGroup.registerItemgroups(); + SculkDepths.LOGGER.info("Registering items for " + SculkDepths.MOD_ID); ModItems.registerModItems(); + SculkDepths.LOGGER.info("Registering Blocks for " + SculkDepths.MOD_ID); ModBlocks.registerModBlocks(); -/* SculkDepths.LOGGER.info("Registering Portals for " + SculkDepths.MOD_ID); - Portals.registerModPortals();*/ + SculkDepths.LOGGER.info("Registering Sounds for " + SculkDepths.MOD_ID); ModSounds.registerModSounds(); + SculkDepths.LOGGER.info("Registering Effects for " + SculkDepths.MOD_ID); ModStatusEffects.init(); + + SculkDepths.LOGGER.info("Registering ServerTickEvents for " + SculkDepths.MOD_ID); ServerTickEvents.START_WORLD_TICK.register(new ConditionalSoundPlayer()); + ServerTickEvents.START_WORLD_TICK.register(new CheckInvForCrystalItems()); + ServerTickEvents.START_WORLD_TICK.register(new ModBiomeEffects()); + //SculkDepths.LOGGER.info("Registering LootTables for " + SculkDepths.MOD_ID); //ModLootTableModifiers.modifyLootTables(); + SculkDepths.LOGGER.info("Registering ModCauldronBehavior for " + SculkDepths.MOD_ID); ModCauldronBehavior.registerBehavior(); + //SculkDepths.LOGGER.info("Registering Recipes for " + SculkDepths.MOD_ID); //ModRecipes.register(); SculkDepths.LOGGER.info("Registering BlockEntities for " + SculkDepths.MOD_ID); ModBlockEntities.registerBlockEntities(); + SculkDepths.LOGGER.info("Registering Entities for " + SculkDepths.MOD_ID); + SpawnRestriction.register(ModEntities.LESTER, SpawnLocationTypes.ON_GROUND, null, (type, world, reason, pos, random) -> true); + SpawnRestriction.register(ModEntities.CHOMPER_COLOSSUS, SpawnLocationTypes.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, (type, world, reason, pos, random) -> true); FabricDefaultAttributeRegistry.register(ModEntities.GLOMPER, GlomperEntity.setAttributes()); FabricDefaultAttributeRegistry.register(ModEntities.LESTER, LesterEntity.createLesterAttributes()); FabricDefaultAttributeRegistry.register(ModEntities.CHOMPER_COLOSSUS, ChomperColossusEntity.createChomperColossusAttributes()); + SculkDepths.LOGGER.info("Registering Particles for " + SculkDepths.MOD_ID); ModParticleTypes.registerModParticles(); + SculkDepths.LOGGER.info("Registering ScreenHandlers for " + SculkDepths.MOD_ID); ModScreenHandlers.registerModScreenHandlers(); + + SculkDepths.LOGGER.info("Registering WorldGen for " + SculkDepths.MOD_ID); ModPlacementModifierType.init(); ModFeatures.init(); - - WorldGenerator.initWorldGen(); - - ServerTickEvents.START_WORLD_TICK.register(new CheckInvForCrystalItems()); - ServerTickEvents.START_WORLD_TICK.register(new ModBiomeEffects()); - + SculkDepths.LOGGER.info("Registering Components for " + SculkDepths.MOD_ID); ModComponentTypes.register(); + + SculkDepths.LOGGER.info("Registering POI's for " + SculkDepths.MOD_ID); POIs.register(); - //register(Registries.POINT_OF_INTEREST_TYPE, Q_LODESTONE, getStatesOfBlock(ModBlocks.QUAZARITH_LODESTONE), 0, 1); - //ServerTickEvents.START_WORLD_TICK.register(new ConditionalSoundPlayer()); CauldronFluidContent.registerCauldron(ModBlocks.KRYSLUM_FLUMROCK_CAULDRON, ModFluids.KRYSLUM_STILL, FluidConstants.BUCKET, ModProperties.KRYSLUM_LEVEL); //support for mods to see how much fluid is in it (doesn't work for create pipes)