Skip to content

Commit

Permalink
Fixed Dependancies (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeAlam1 authored Sep 12, 2024
1 parent 473ac15 commit 719f46c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
//compileOnly fg.deobf("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib_version}")
//runtimeOnly fg.deobf("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib_version}")
runtimeOnly "curse.maven:geckolib-388172:${geckolib_file}"
compileOnly "curse.maven:geckolib-388172:${geckolib_file}"
runtimeOnly fg.deobf("curse.maven:geckolib-388172:${geckolib_file}")
compileOnly fg.deobf("curse.maven:geckolib-388172:${geckolib_file}")
}

tasks.named('processResources', ProcessResources).configure {
Expand Down
12 changes: 8 additions & 4 deletions Forge/src/main/java/software/bluelib/BlueLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public class BlueLib {
*/
public static final String MODID = "bluelib";

public static final boolean EditorMode = false;

public static CommonProxy PROXY = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> CommonProxy::new);

// public static final Logger LOGGER = LogUtils.getLogger();
Expand All @@ -78,10 +80,12 @@ public BlueLib()
modEventBus.register(this);

if (isDeveloperMode()) {
ModEntities.register(modEventBus);
MinecraftForge.EVENT_BUS.register(ReloadHandler.class);
modEventBus.addListener(this::setupComplete);
modEventBus.addListener(this::setupClient);
if (EditorMode) {
ModEntities.register(modEventBus);
MinecraftForge.EVENT_BUS.register(ReloadHandler.class);
modEventBus.addListener(this::setupComplete);
modEventBus.addListener(this::setupClient);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
public class ClientEvents {

public static void registerRenderers() {
// Register the renderer for all the Entities
EntityRenderers.register(ModEntities.DRAGON.get(), DragonRender::new);
EntityRenderers.register(ModEntities.REX.get(), RexRender::new);
if (BlueLib.EditorMode) {
// Register the renderer for all the Entities
EntityRenderers.register(ModEntities.DRAGON.get(), DragonRender::new);
EntityRenderers.register(ModEntities.REX.get(), RexRender::new);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
public class CommonModEvent {
@SubscribeEvent
public static void onAttributeCreate(EntityAttributeCreationEvent pEvent) {
if (BlueLib.EditorMode) {
pEvent.put(ModEntities.DRAGON.get(), DragonEntity.createAttributes().build());
pEvent.put(ModEntities.REX.get(), RexEntity.createAttributes().build());
}
}
}

0 comments on commit 719f46c

Please sign in to comment.