Skip to content

Commit

Permalink
A lot to change in the comming versions
Browse files Browse the repository at this point in the history
  • Loading branch information
RealYusufIsmail committed Dec 19, 2023
1 parent 13c9907 commit 64b1033
Show file tree
Hide file tree
Showing 93 changed files with 2,838 additions and 1,176 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.16.5-2.0.0.beta.1] - 19/12/2023

### Added a ben ten Table and this mod now requires RealYusufIsmail core which stores some important code for all my mods. It also means the mods size has been reduced. Reduced the size of the mod, and some big fixes. Added some 1.17 deesplate ores for my ores in my mod. I am preparing for 1.17. Unusable right now. That's it for this update.
### Restarting work on 1.16.5 version of this mod. A lot to change in the coming versions.

## [1.16.5-1.17] - 19/06/2021

Expand Down
102 changes: 69 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
import net.darkhax.curseforgegradle.TaskPublishCurseForge

buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://maven.parchmentmc.org' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath("org.parchmentmc:librarian:1.+")
}
}

plugins {
id 'java'
id "com.diffplug.spotless" version "6.10.0"
id 'net.darkhax.curseforgegradle' version '1.1.17'
}

apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.parchmentmc.librarian.forgegradle'


version = "${mod_version}"
group = 'com.yusuf'
archivesBaseName = mod_id
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

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 {

mappings channel: 'official', version: "${mc_version}"
mappings channel: 'parchment', version: "2022.03.06-1.16.5"

runs {
client {
Expand Down Expand Up @@ -71,10 +86,6 @@ minecraft {
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
def gpr_creds = {
username = property('gpr.username')
password = property('gpr.token')
}

repositories {
maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
Expand All @@ -87,27 +98,17 @@ repositories {
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
maven {
url = uri("https://maven.pkg.github.com/realyusufismail/realyusufismail-core")
credentials gpr_creds
url = "https://modmaven.dev"
}

}

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 fg.deobf("net.yusuf:realyusufismailcore:${ryic_version}") {
exclude module: "forge"
}


implementation "io.github.realyusufismail:realyusufismailcore:${ryc_version}"
}

jar {
Expand All @@ -124,16 +125,51 @@ jar {
}
}

jar.finalizedBy('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
spotless {
java {
// Excludes build folder since it contains generated java classes.
targetExclude("build/**")
palantirJavaFormat()
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
licenseHeader(
"""/*
* Copyright 2023 RealYusufIsmail.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
*
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ """)
}
}

tasks.register('publishCurseForge', TaskPublishCurseForge) {
group = "CurseForge"
dependsOn("build")
disableVersionDetection()

var token = project.hasProperty('curseforge.token') ? project.property('curseforge.token') as String : ""
apiToken = token

final var jar = file("build/libs/${base.archivesName.get()}-${project.version}.jar")

final var mainFile = upload(projectId, jar)
mainFile.changelog = file("CHANGELOG.md").getText()
mainFile.changelogType = "markdown"
mainFile.releaseType = "release"
mainFile.addJavaVersion("Java 8")
mainFile.addModLoader("Forge")
mainFile.addGameVersion(mcVersion)
}
19 changes: 12 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
jei_version=7.7.0.106
ryic_version=1.16.5-4.6
patchouli_version=1.16.4-53.1

jei_version=7.8.0.1009
ryc_version=1.16.5-5.0.1
patchouli_version=1.16.4-53.3
geckolib_version=1.16.5:3.0.46
forge_version=1.16.5-36.2.0
mc_version=1.16.5
forge_version=1.16.5-36.2.34


jei_mc_version=1.16.5

mcVersion = 1.16.5
mod_id=bentenmod
mod_version=1.16.5-1.19.2
repoName=ben-10-mod
mod_version=1.16.5-2.0.0.beta.1
repoName=ben-10-mod
projectId = 459985
24 changes: 21 additions & 3 deletions src/main/java/com/yusuf/bentenmod/BenTenMod.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Copyright 2023 RealYusufIsmail.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
*
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yusuf.bentenmod;

import com.yusuf.bentenmod.core.init.*;
Expand All @@ -9,15 +27,13 @@
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import software.bernie.example.GeckoLibMod;
import software.bernie.geckolib3.GeckoLib;

@Mod("bentenmod")
@Mod.EventBusSubscriber(modid = BenTenMod.MOD_ID, bus = Bus.MOD)
public class BenTenMod {
// Directly reference a log4j logger.
public static final Logger LOGGER = LogManager.getLogger();
Expand All @@ -39,6 +55,8 @@ public BenTenMod() {
MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, OreGenerationInit::addOres);
MinecraftForge.EVENT_BUS.addListener(this::onBiomeLoad);
MinecraftForge.EVENT_BUS.register(this);

bus.register(this);
}

public static ModResourceLocation getId(String path) {
Expand All @@ -52,4 +70,4 @@ public static ModResourceLocation getId(String path) {
public void onBiomeLoad(BiomeLoadingEvent event) {
EntitySpawingInit.onBiomesLoad(event);
}
}
}
7 changes: 0 additions & 7 deletions src/main/java/com/yusuf/bentenmod/CommonListener.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
/*
* Copyright 2023 RealYusufIsmail.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
*
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yusuf.bentenmod.client;

import com.yusuf.bentenmod.BenTenMod;
import com.yusuf.bentenmod.client.renderer.KraabRenderer;
import com.yusuf.bentenmod.client.renderer.VilgaxRenderer;
import com.yusuf.bentenmod.core.init.ContainerInit;
import com.yusuf.bentenmod.core.init.EntityTypesInit;
import com.yusuf.bentenmod.core.keybind.Keybindings;
import com.yusuf.bentenmod.entity.KraabBoltEntity;
import net.minecraft.client.gui.ScreenManager;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.util.ResourceLocation;
Expand All @@ -16,25 +33,24 @@
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.yusuf.realyusufismailcore.client.Keybindings;
import org.lwjgl.glfw.GLFW;

@EventBusSubscriber(modid = BenTenMod.MOD_ID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ClientModEventSubscriber {

@SubscribeEvent
public static void onClientSetup(final FMLClientSetupEvent event) {
Keybindings.RELOAD = new KeyBinding("key." + BenTenMod.MOD_ID + ".reload", GLFW.GLFW_KEY_R,
"key.categories." + BenTenMod.MOD_ID);
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;
}
});

RenderingRegistry.registerEntityRenderingHandler(
EntityTypesInit.KRAAB_BOLT_ENTITY.get(), m -> new EntityRenderer<KraabBoltEntity>(m) {
@Override
public ResourceLocation getTextureLocation(KraabBoltEntity entity) {
return null;
}
});
}
}
}
Loading

0 comments on commit 64b1033

Please sign in to comment.