Skip to content

Commit

Permalink
still having issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RealYusufIsmail committed Dec 20, 2023
1 parent 5a70b31 commit a943c22
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 229 deletions.
91 changes: 49 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ buildscript {

plugins {
id 'java'
id 'eclipse'
id "com.diffplug.spotless" version "6.10.0"
id 'net.darkhax.curseforgegradle' version '1.1.17'
}
Expand All @@ -24,91 +25,97 @@ apply plugin: 'org.parchmentmc.librarian.forgegradle'

version = "${mod_version}"
group = 'io.github.realyusufismail'
base.archivesName.set("${mod_id}")


final var modId = mod_id
final var mcVersion = mcVersion
final var projectId = projectId
project.version = mod_version
base.archivesName.set(modId)

java.toolchain.languageVersion = JavaLanguageVersion.of(8)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {

minecraft {
mappings channel: 'parchment', version: '2022.03.06-1.16.5'

runs {
client {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
mods {
bentenmod {
source sourceSets.main
}
}

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
}

server {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
}

gameTestServer {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

mods {
bentenmod {
source sourceSets.main
}
}

mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }
}

data {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
args '--mod', 'bentenmod', '--all',
'--existing', file('src/main/resources').toString(),
'--existing', file('src/generated/resources').toString(),
'--output', file('src/generated/resources/')

args '--mod', archivesBaseName, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

mods {
bentenmod {
source sourceSets.main
}
mods { create(base.archivesName.get()) { source(sourceSets["main"]) } }

}
// 'runData' is renamed to 'runDataGenerator' to make it more clear what it does.
taskName("runDataGenerator")
}
}
}

sourceSets.main.resources {
srcDir 'src/generated/resources'
}

repositories {
maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
maven { url 'https://maven.blamejared.com' }
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
}
maven { url = 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
maven { url = 'https://maven.blamejared.com' }
maven { url = 'https://dvs1.progwml6.com/files/maven/' }
maven { url = 'https://modmaven.dev' }
mavenCentral()
}

dependencies {
minecraft "net.minecraftforge:forge:${forge_version}"
implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${geckolib_version}")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}")
compileOnly fg.deobf("mezz.jei:jei-${jei_mc_version}:${jei_version}:api")
runtimeOnly fg.deobf("mezz.jei:jei-${jei_mc_version}:${jei_version}")
implementation "io.github.realyusufismail:realyusufismailcore:${ryc_version}"
implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${geckolib_version}")
implementation group: 'io.github.realyusufismail', name: 'realyusufismailcore', version: ryc_version
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}")
//compileOnly "mezz.jei:jei-${jei_mc_version}:${jei_version}:api"
//runtimeOnly "mezz.jei:jei-${jei_mc_version}:${jei_version}"
}

jar {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

jei_version=7.8.0.1009
ryc_version=1.16.5-5.0.1
ryc_version=1.16.5-5.0.2
patchouli_version=1.16.4-53.3
geckolib_version=1.16.5:3.0.46
geckolib_version=1.16.5:3.0.106
forge_version=1.16.5-36.2.34


Expand Down
29 changes: 28 additions & 1 deletion src/main/java/io/github/realyusufismail/bentenmod/BenTenMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,30 @@
*/
package io.github.realyusufismail.bentenmod;

import io.github.realyusufismail.bentenmod.client.renderer.KraabRenderer;
import io.github.realyusufismail.bentenmod.client.renderer.VilgaxRenderer;
import io.github.realyusufismail.bentenmod.core.init.*;
import io.github.realyusufismail.bentenmod.core.keybind.Keybindings;
import io.github.realyusufismail.bentenmod.core.util.ModResourceLocation;
import io.github.realyusufismail.bentenmod.data.DataGenerators;
import io.github.realyusufismail.bentenmod.entity.KraabBoltEntity;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.BiomeLoadingEvent;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.glfw.GLFW;
import software.bernie.example.GeckoLibMod;
import software.bernie.geckolib3.GeckoLib;

Expand All @@ -47,11 +58,12 @@ public BenTenMod() {
TileEntityInit.TILE_ENTITY.register(bus);
ContainerInit.CONTAINERS.register(bus);

GeckoLibMod.DISABLE_IN_DEV = true;
GeckoLib.initialize();

bus.addGenericListener(IRecipeSerializer.class, RegisterRecipeInit::registerRecipes);
bus.addListener(DataGenerators::gatherData);
bus.addListener(this::onClientSetup);

MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, OreGenerationInit::addOres);
MinecraftForge.EVENT_BUS.addListener(this::onBiomeLoad);
MinecraftForge.EVENT_BUS.register(this);
Expand All @@ -67,4 +79,19 @@ public static ModResourceLocation getId(String path) {
public void onBiomeLoad(BiomeLoadingEvent event) {
EntitySpawingInit.onBiomesLoad(event);
}

public void onClientSetup(final FMLClientSetupEvent event) {
Keybindings.RELOAD = new KeyBinding(
"key." + BenTenMod.MOD_ID + ".reload", GLFW.GLFW_KEY_R, "key.categories." + BenTenMod.MOD_ID);
ClientRegistry.registerKeyBinding(Keybindings.RELOAD);
RenderingRegistry.registerEntityRenderingHandler(EntityTypesInit.VILGAX_ENTITY.get(), VilgaxRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(EntityTypesInit.KRAAB_ENTITY.get(), KraabRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(
EntityTypesInit.KRAAB_BOLT_ENTITY.get(), m -> new EntityRenderer<KraabBoltEntity>(m) {
@Override
public ResourceLocation getTextureLocation(KraabBoltEntity entity) {
return null;
}
});
}
}

This file was deleted.

Loading

0 comments on commit a943c22

Please sign in to comment.