Skip to content

Commit

Permalink
Merge remote-tracking branch 'GTNH/optimize_world_update_light' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
  • Loading branch information
Dream-Master committed Jan 5, 2023
2 parents 048f6b7 + 6dfe97b commit 3c87a29
Show file tree
Hide file tree
Showing 5 changed files with 717 additions and 6 deletions.
25 changes: 19 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1668274302
//version: 1671313514
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -31,7 +31,7 @@ buildscript {
url 'https://maven.minecraftforge.net'
}
maven {
// GTNH ForgeGradle Fork
// GTNH ForgeGradle and ASM Fork
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
Expand All @@ -45,7 +45,9 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.11'
//Overwrite the current ASM version to fix shading newer than java 8 applicatations.
classpath 'org.ow2.asm:asm-debug-all-custom:5.0.3'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.13'
}
}
plugins {
Expand Down Expand Up @@ -278,7 +280,9 @@ minecraft {
runDir = 'run'

if (replaceGradleTokenInFile) {
replaceIn replaceGradleTokenInFile
for (f in replaceGradleTokenInFile.split(',')) {
replaceIn f
}
if (gradleTokenModId) {
replace gradleTokenModId, modId
}
Expand Down Expand Up @@ -330,6 +334,12 @@ repositories {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
if (usesMixinDebug.toBoolean()) {
maven {
name = "Fabric Maven"
url = "https://maven.fabricmc.net/"
}
}
}
}

Expand All @@ -338,10 +348,13 @@ dependencies {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
annotationProcessor('com.google.guava:guava:24.1.1-jre')
annotationProcessor('com.google.code.gson:gson:2.8.6')
annotationProcessor('org.spongepowered:mixin:0.8.5-GTNH:processor')
annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.3:processor')
if (usesMixinDebug.toBoolean()) {
runtimeOnly('org.jetbrains:intellij-fernflower:1.2.1.16')
}
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
compile('com.gtnewhorizon:gtnhmixins:2.0.2')
compile('com.gtnewhorizon:gtnhmixins:2.1.3')
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/mitchej123/hodgepodge/LoadingConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public class LoadingConfig {
public boolean optimizeASMDataTable;
public boolean optimizeIc2ReactorInventoryAccess;
public boolean optimizeTileentityRemoval;
public boolean optimizeWorldUpdateLight;
public boolean preventPickupLoot;
public boolean removeUpdateChecks;
public boolean speedupAnimations;
Expand Down Expand Up @@ -215,6 +216,7 @@ public LoadingConfig(File file) {
optimizeASMDataTable = config.get(Category.SPEEDUPS.toString(), "optimizeASMDataTable", true, "Optimize ASMDataTable getAnnotationsFor for faster startup").getBoolean();
optimizeIc2ReactorInventoryAccess = config.get(Category.FIXES.toString(), "optimizeIc2ReactorInventoryAccess", true, "Optimize inventory access to IC2 nuclear reactor").getBoolean();
optimizeTileentityRemoval = config.get(Category.SPEEDUPS.toString(), "optimizeTileentityRemoval", true, "Optimize tileEntity removal in World.class").getBoolean();
optimizeWorldUpdateLight = config.get(Category.FIXES.toString(), "optimizeWorldUpdateLight", true, "Fix too early light initialization").getBoolean();
particleLimit = Math.max(Math.min(config.get(Category.TWEAKS.toString(), "particleLimit", 8000, "Particle limit [4000-16000]").getInt(), 16000), 4000);
preventPickupLoot = config.get(Category.TWEAKS.toString(), "preventPickupLoot", true, "Prevent monsters from picking up loot.").getBoolean();
removeUpdateChecks = config.get(Category.FIXES.toString(), "removeUpdateChecks", true, "Remove old/stale/outdated update checks.").getBoolean();
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public enum Mixins {
.setSide(Side.BOTH)
.setApplyIf(() -> Common.config.fixHasteArmSwing)
.addTargetedMod(TargetedMod.VANILLA)),
OPTIMIZE_WORLD_UPDATE_LIGHT(new Builder("Optimize world updateLightByType method")
.setPhase(Phase.EARLY)
.addMixinClasses("minecraft.MixinWorld_FixLightUpdateLag")
.setSide(Side.BOTH)
.addTargetedMod(TargetedMod.VANILLA)
.setApplyIf(() -> Common.config.optimizeWorldUpdateLight)),
FIX_FRIENDLY_CREATURE_SOUNDS(new Builder("Fix Friendly Creature Sounds")
.setPhase(Phase.EARLY)
.addMixinClasses("minecraft.MixinSoundHandler")
Expand Down
Loading

0 comments on commit 3c87a29

Please sign in to comment.