Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.gradle
.settings
/.idea/
/tmp/
/.vscode/
/run/
/build/
Expand Down
28 changes: 19 additions & 9 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@

elytraModpackVersion {
// 在这配置的gtnh版本 用于自动拉取依赖版本
gtnhVersion = "2.8.4"
gtnhVersion = "2.9.0-beta-1"
// 是否不缓存拉取的依赖清单文件
manifestNoCache = false
// 是否自动为输出的jar添加 `gtnhVersion` 后缀
attachManifestVersionToJar = true
attachManifestVersionToJar = false
}

dependencies {
implementation(gtnhDev("GT5-Unofficial"))
implementation(gtnhDev("NewHorizonsCoreMod"))
implementation("com.github.GTNewHorizons:NewHorizonsCoreMod:2.8.284:dev")
implementation(gtnhDev("Mobs-Info"))
implementation(gtnhDev("Infernal-Mobs"))
implementation(gtnhDev("Galaxy-Space-GTNH"))
implementation(gtnhDev("SGCraft"))
implementation(gtnhDev("twilightforest"))
implementation(gtnhDev("AE2FluidCraft-Rework"))
implementation(gtnhDev("ae2stuff"))
implementation(gtnhDev("Avaritia"))
implementation(gtnhDev("Avaritiaddons"))
implementation(gtnhDev("neiaddons"))
Expand All @@ -31,31 +30,42 @@ dependencies {
implementation(gtnhDev("MagicBees"))
implementation(gtnhDev("NotEnoughItems"))
implementation(gtnhDev("OpenComputers"))
implementation(gtnhDev("supersolarpanels"))
implementation(gtnhDev("ThaumicEnergistics"))
implementation(gtnhDev("Universal-Singularities"))
implementation(gtnhDev("WitcheryExtras"))
implementation(gtnhDev("BetterQuesting"))
implementation(gtnhDev("supersolarpanels"))
implementation(rfg.deobf('curse.maven:advsolar-362768:2885953'))
implementation ("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
runtimeOnlyNonPublishable(rfg.deobf("curse.maven:BiomesOPlenty-220318:2499612"))
implementation(deobfCurse('witchery-69673:2234410'))
implementation(gtnhDev("WitcheryExtras"))

implementation('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
implementation("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
implementation('com.github.GTNewHorizons:worldedit-gtnh:v0.0.8:dev')

// runtime
runtimeOnlyNonPublishable(gtnhDev("BetterP2P"))
runtimeOnlyNonPublishable(gtnhDev("Chisel"))
runtimeOnlyNonPublishable rfg.deobf(files("libs/chisel-2.17.27-GTNH.jar"))
runtimeOnlyNonPublishable(gtnhDev("StructureLib"))
runtimeOnlyNonPublishable(gtnhDev("BlockRenderer6343")) { transitive = false }

annotationProcessor('com.google.auto.value:auto-value:1.10.1')
implementation('com.google.auto.value:auto-value-annotations:1.10.1')

// jvmDowngrader
compileOnly("javax.xml.bind:jaxb-api:2.3.1")
compileOnly("org.jetbrains:annotations:26.0.1")
compileOnly("org.projectlombok:lombok:1.18.42") { transitive = false }
annotationProcessor("org.projectlombok:lombok:1.18.42")


configurations.configureEach {
exclude group: 'com.github.GTNewHorizons', module: 'Baubles'
}

configurations.all {
resolutionStrategy {
force "com.github.GTNewHorizons:GTNHLib:0.7.10"
force "com.github.GTNewHorizons:GTNHLib:0.11.11"
}
}

Expand Down
33 changes: 30 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,33 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = NewMaa

# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = true
# Enables modern Java syntax support. Valid values:
# - false: No modern syntax, Java 8 only
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
# - modern: Native modern Java bytecode, no downgrading
enableModernJavaSyntax = jabel

# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
# and should *not* be used in most situations. -1 disables this.
# forceToolchainVersion = -1

# Target JVM version for JVM Downgrader bytecode downgrading.
# Only used when enableModernJavaSyntax = jvmDowngrader
# downgradeTargetVersion = 8

# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
# Classes will be available in META-INF/versions/N/ for each version N in this list.
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
# jvmDowngraderMultiReleaseVersions = 21,25

# Specifies how JVM Downgrader API stubs are provided. Options:
# - shade: Shade minimized stubs into the jar
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
# - external: Another dependency provides stubs (no constraint, no warning)
# - (empty): Warning reminding you to configure stubs
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
# jvmDowngraderStubsProvider =

# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
Expand Down Expand Up @@ -206,3 +230,6 @@ customArchiveBaseName = OTHTechnology
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true

# Non-GTNH properties
org.gradle.configuration-cache = true
org.gradle.parallel = true
20 changes: 10 additions & 10 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/faa12903720d410b387cc69ccafb1a74/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a4c09dd2e2d7079373d30e524bbc2829/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
toolchainVersion=25
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Binary file added libs/chisel-2.17.27-GTNH.jar
Binary file not shown.
10 changes: 5 additions & 5 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ pluginManagement {
repositories {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "https://nexus.gtnewhorizons.com/repository/public/"
name = "GTNH Maven"
url = uri("https://nexus.gtnewhorizons.com/repository/public/")
mavenContent {
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
Expand All @@ -12,8 +12,8 @@ pluginManagement {
gradlePluginPortal()
mavenCentral()
maven {
name "JitPack"
url "https://jitpack.io"
name = "JitPack"
url = uri("https://jitpack.io")
mavenContent {
includeGroupByRegex("com\\.github\\..+")
}
Expand All @@ -23,5 +23,5 @@ pluginManagement {
}

plugins {
id("com.gtnewhorizons.gtnhsettingsconvention") version("2.0.20")
id("com.gtnewhorizons.gtnhsettingsconvention") version("2.0.26")
}
4 changes: 4 additions & 0 deletions src/main/java/com/newmaa/othtech/OTHTechnology.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public static void registerRenderers() {}
// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
public void postInit(FMLPostInitializationEvent event) {
proxy.postInit(event);
LOG.info("The Isa Mill is invincible!");
MachineLoader.loadMachinePostInit();
// RecipeLoader.loadRecipesPostInit();
// 添加自定义配方
Expand All @@ -121,8 +122,11 @@ public void postInit(FMLPostInitializationEvent event) {

@Mod.EventHandler
public void completeInit(FMLLoadCompleteEvent event) {
LOG.info("completeInit: Starting recipe loading...");
RecipeLoader.loadRecipes();
LOG.info("completeInit: Recipe loading done, initializing OTHBeeyonds...");
new OTHBeeyonds();
LOG.info("completeInit: OTHBeeyonds done, FMLLoadComplete finished.");
// 添加自定义配方
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ public class OTHBeeyonds {
public static OTHItemCombs combs;

public OTHBeeyonds() {
GTMod.GT_FML_LOGGER.info("OTHBeeyonds: Creating OTHItemCombs...");
combs = new OTHItemCombs();
GTMod.GT_FML_LOGGER.info("OTHBeeyonds: Item created, initializing comb recipes...");
OTHItemCombs.initCombsRecipes();
GTMod.GT_FML_LOGGER.info("OTHBeeyonds: Comb recipes done, setting up alleles...");
setupOTHAlleles();
GTMod.GT_FML_LOGGER.info("OTHBeeyonds: Alleles done, initializing bees...");
OTHBeeDefinition.initBees();
GTMod.GT_FML_LOGGER.info("OTHBeeyonds: Bees initialized, constructor done.");
}

private static void setupOTHAlleles() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package com.newmaa.othtech.common.dimensions.gtoregen;

import galacticgreg.api.Enums;
import galacticgreg.api.ModDimensionDef;

public enum EnumDimensionDefOTH {

ROSS123B(new ModDimensionDef(
EnumDimensionDefOTH.DimNames.ROSS123B,
"newmaa.othtech.common.dimensions.ross123b.ChunkProviderRoss123b",
Enums.DimensionType.Planet,
EnumDimensionBlockMetaDefList.Ross123b.DBMDefList)),
ANTIMONIA(new ModDimensionDef(
EnumDimensionDefOTH.DimNames.ANTIMONIA,
"newmaa.othtech.common.dimensions.ross123b.ChunkProviderAntimonia",
Enums.DimensionType.Planet,
EnumDimensionBlockMetaDefList.Antimonia.DBMDefList));
;
/*
* ROSS123B(new ModDimensionDef(
* EnumDimensionDefOTH.DimNames.ROSS123B,
* "newmaa.othtech.common.dimensions.ross123b.ChunkProviderRoss123b",
* Enums.DimensionType.Planet,
* EnumDimensionBlockMetaDefList.Ross123b.DBMDefList)),
* ANTIMONIA(new ModDimensionDef(
* EnumDimensionDefOTH.DimNames.ANTIMONIA,
* "newmaa.othtech.common.dimensions.ross123b.ChunkProviderAntimonia",
* Enums.DimensionType.Planet,
* EnumDimensionBlockMetaDefList.Antimonia.DBMDefList));
*/

public static class DimNames {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static com.newmaa.othtech.common.dimensions.gtoregen.EnumDimensionDefOTH.DimNames.ANTIMONIA;
import static galacticgreg.api.enums.DimensionDef.*;

import galacticgreg.WorldgenOreLayerSpace;
import galacticgreg.WorldGeneratorSpace;
import gregtech.api.enums.Materials;
import gregtech.common.OreMixBuilder;
import gregtech.common.WorldgenGTOreLayer;
Expand Down Expand Up @@ -31,7 +31,7 @@ public WorldgenGTOreLayer addGTOreLayer() {
return new WorldgenGTOreLayer(this.oreMixBuilder);
}

public WorldgenOreLayerSpace addGaGregOreLayer() {
return new WorldgenOreLayerSpace(this.oreMixBuilder);
public WorldGeneratorSpace addGaGregOreLayer() {
return new WorldGeneratorSpace();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public boolean addComponentParts(World par1World, Random par2Random,
0,
0,
8,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
false);
this.fillWithMetadataBlocks(
Expand All @@ -143,9 +143,9 @@ public boolean addComponentParts(World par1World, Random par2Random,
6,
0,
8,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
false);
this.fillWithMetadataBlocks(
Expand All @@ -157,9 +157,9 @@ public boolean addComponentParts(World par1World, Random par2Random,
12,
0,
8,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
false);
this.fillWithMetadataBlocks(
Expand All @@ -171,9 +171,9 @@ public boolean addComponentParts(World par1World, Random par2Random,
11,
0,
0,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
false);
this.fillWithMetadataBlocks(
Expand All @@ -185,9 +185,9 @@ public boolean addComponentParts(World par1World, Random par2Random,
11,
0,
8,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
TungstensteelPlatedReinforcedStone.getBlock(),
TungstensteelPlatedReinforcedStone.block,
0,
false);
this.fillWithMetadataBlocks(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.newmaa.othtech.common.entity;

import static net.minecraft.util.StatCollector.translateToLocal;

import java.util.ArrayList;

import net.minecraft.entity.EntityCreature;
Expand All @@ -16,12 +18,13 @@
import com.newmaa.othtech.common.OTHItemList;
import com.newmaa.othtech.common.item.ItemLoader;

import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.item.food.BaseItemMetaFood;

public class EntityFakePlayer extends EntityCreature implements IMobInfoProvider {

private static final int DATAWATCHER_ID_SITTING = 20;
private int sitCooldown = 0;
public static BaseItemMetaFood itemMetaFood;

public EntityFakePlayer(World world) {
super(world);
Expand All @@ -36,7 +39,7 @@ protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier) {
}
int extraDrops = this.rand.nextInt(8 + lootingModifier);
for (int i = 0; i < extraDrops; ++i) {
this.dropItem(ModItems.itemMetaFood, 36);
this.dropItem(itemMetaFood, 36);
}
}

Expand Down Expand Up @@ -65,7 +68,7 @@ public void onLivingUpdate() {
// 每100 ticks(5秒)随机切换状态
if (!this.worldObj.isRemote && this.sitCooldown-- <= 0) {
if (this.rand.nextInt(5) == 0) { // 20%概率触发
sendMessageToAll("我在哪里?");
sendMessageToAll(translateToLocal("oth.clone.whereami"));
this.setSitting(!this.isSitting());
this.sitCooldown = 100 + this.rand.nextInt(100); // 5-10秒冷却
}
Expand All @@ -86,7 +89,7 @@ public void provideDropsInformation(@NotNull ArrayList<MobDrop> drops) {
.withChance(1.0d);
c1.clampChance();
drops.add(c1);
var c2 = MobDrop.create(new ItemStack(ModItems.itemMetaFood, 36, 0))
var c2 = MobDrop.create(new ItemStack(itemMetaFood, 36, 0))
.withType(MobDrop.DropType.Normal)
.withChance(0.8d);
c2.clampChance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public class BWLiquids implements Runnable {

@Override
public void run() {
for (var prefix : OrePrefixes.values()) {
for (OrePrefixes prefix : OrePrefixes.VALUES) {
gf.addPrefix(prefix);
}
gf.removePrefix(OrePrefixes.ore);
Expand Down
Loading