Skip to content

Commit

Permalink
more work on drill and sword proof of concept
Browse files Browse the repository at this point in the history
  • Loading branch information
Thepigcat76 committed Nov 17, 2024
1 parent 4c8038a commit 8df6179
Show file tree
Hide file tree
Showing 27 changed files with 986 additions and 172 deletions.
13 changes: 9 additions & 4 deletions src/main/java/com/leclowndu93150/carbort/Carbort.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import com.leclowndu93150.carbort.registries.*;
import com.mojang.logging.LogUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.neoforge.client.event.ModelEvent;
import net.neoforged.neoforge.event.tick.PlayerTickEvent;
import net.neoforged.neoforge.event.tick.ServerTickEvent;
import org.slf4j.Logger;
Expand All @@ -23,6 +26,7 @@ public class Carbort {

public Carbort(IEventBus modEventBus, ModContainer modContainer) {
new CBFoods();

CBTabs.CREATIVE_MODE_TABS.register(modEventBus);
CBItems.ITEMS.register(modEventBus);
CBBlocks.BLOCKS.register(modEventBus);
Expand All @@ -31,12 +35,13 @@ public Carbort(IEventBus modEventBus, ModContainer modContainer) {
CBMobEffects.POTIONS.register(modEventBus);
CBDataComponents.DATA_COMPONENTS.register(modEventBus);
CBMenus.MENUS.register(modEventBus);
modEventBus.addListener(this::commonSetup);

modEventBus.addListener(this::registerBakedModels);

modContainer.registerConfig(ModConfig.Type.COMMON, CarbortConfig.SPEC);
}


private void commonSetup(final FMLCommonSetupEvent event) {
LOGGER.info("I hope i did things right.");
private void registerBakedModels(ModelEvent.RegisterAdditional event) {
event.register(ModelResourceLocation.standalone(ResourceLocation.fromNamespaceAndPath(MODID, "block/bedrock_drill_head")));
}
}
21 changes: 21 additions & 0 deletions src/main/java/com/leclowndu93150/carbort/CarbortClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.leclowndu93150.carbort;

import com.leclowndu93150.carbort.client.renderer.blockentities.BedrockDrillBER;
import com.leclowndu93150.carbort.registries.CBBlockEntities;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;

@Mod(value = CarbortClient.MODID, dist = Dist.CLIENT)
public class CarbortClient {
public static final String MODID = "carbort";

public CarbortClient(IEventBus modEventBus) {
modEventBus.addListener(this::registerBERs);
}

private void registerBERs(EntityRenderersEvent.RegisterRenderers event) {
event.registerBlockEntityRenderer(CBBlockEntities.BEDROCK_DRILL.get(), BedrockDrillBER::new);
}
}
Loading

0 comments on commit 8df6179

Please sign in to comment.