Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility for LabyMod for 1.16.5 #46

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2126077
Rewrite for 1.12.2
Lezurex Mar 14, 2021
c9e93fe
Fix VersionChecker for 1.12.2
Lezurex Mar 14, 2021
7ab1bc4
Fix VersionChecker for 1.12.2
Lezurex Mar 14, 2021
917d43b
Merge branch 'master' into lm-1.12.2
Lezurex Mar 14, 2021
58f8859
Hotfix things
Lezurex Mar 14, 2021
d02ffd6
Add descriptions to settings
Lezurex Mar 15, 2021
ffff5b5
Merge branch 'master' into lm-1.12.2
Lezurex Mar 15, 2021
8ae3fcb
Merge updates
Lezurex Mar 15, 2021
b9a3c73
Merge branch 'master' into lm-1.12.2
Lezurex Mar 15, 2021
173edbc
Merge updates
Lezurex Mar 15, 2021
0ff6cf2
Merge branch 'master' into lm-1.12.2
Lezurex Mar 31, 2021
e22e141
Merge updates
Lezurex Mar 31, 2021
6bfdbda
Merge branch 'master' into lm-1.12.2
Lezurex Apr 11, 2021
b56c756
Update LabyMod API
Lezurex Apr 11, 2021
e1d6e5a
Update Gradle wrapper
Lezurex May 10, 2021
3f9b05d
Merge branch 'master' into lm-1.16.5
Lezurex May 10, 2021
ef994fd
Add custom event listener registration system for better compatibility
Lezurex May 10, 2021
81482fc
Add custom NetworkPlayerInfo
Lezurex May 10, 2021
a32e46c
Improve custom NPlayerInfo
Lezurex May 11, 2021
07e8d5a
Merge remote-tracking branch 'origin/compatibility-optimization' into…
Lezurex May 11, 2021
b4f33fe
Fix and break things at the same time
Lezurex May 11, 2021
e263fe8
Add TickListener to CompatibilityLayer
Lezurex May 12, 2021
a619983
Merge remote-tracking branch 'origin/compatibility-optimization' into…
Lezurex May 13, 2021
d343670
Continue improving CompatibilityLayer for 1.16.5
Lezurex May 13, 2021
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
Binary file modified LabyMod/Updater.jar
Binary file not shown.
157 changes: 82 additions & 75 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,110 +1,117 @@

// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
jcenter()
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath group: 'com.github.ImpactDevelopment', name: 'ForgeGradle', version: '3.0.115'
classpath group: 'com.github.ImpactDevelopment', name: 'MixinGradle', version: '0.6.2'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

apply plugin: 'java'

compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
plugins {
id 'de.undercouch.download' version '4.0.0'
}
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.spongepowered.mixin'

version = '1.0.0'
group = 'com.example' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'Example Addon'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"

/*
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
def mcpVersion = [channel: 'snapshot', version: '20201028-1.16.3']

mixin {
defaultObfuscationEnv searge
add sourceSets.main, "example.refmap.json"
}
*/
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"

minecraft {
version = "1.8.9-11.15.1.1855"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "stable_20"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
mappings mcpVersion

if (getProject().hasProperty("forge")) {
reobfMappings 'searge'
} else {
reobfMappings 'notch'
}

runs {
client {
workingDirectory project.file('run')

main "launch.AddonLauncher"

environment 'assetIndex', '{asset_index}'
environment 'assetDirectory', downloadAssets.output
environment 'nativesDirectory', extractNatives.output

environment 'tweakClass', 'net.labymod.vanilla.LabyModTweaker'

jvmArg('-DdebugMode=true')
jvmArg('-Daddonresources=addon.json')
}
}
}

repositories {
mavenCentral()
maven {
name = "spongepowered"
url = "https://repo.spongepowered.org/maven"
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
mavenLocal()
}


dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
annotationProcessor("org.spongepowered:mixin:0.8.2:processor")

minecraft 'com.github.ImpactDevelopment:Vanilla:1.16.5'
compile(files('libs/lm_api_mc1.16.5.jar'))

compile("org.ow2.asm:asm-analysis:6.2") { transitive = false }
compile("org.ow2.asm:asm-util:6.2") { transitive = false }
compile("org.ow2.asm:asm-commons:6.2") { transitive = false }
compile("org.spongepowered:mixin:0.8.2") { transitive = false }
compile("net.minecraft:launchwrapper:1.12") { transitive = false }

compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'

testCompileOnly 'org.projectlombok:lombok:1.18.16'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.16'


}

processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
jar {
// Excludes the start file
exclude("**/launch")
}

reobf {
jar {
useNotchSrg()
task downloadAPI(type: Download) {
group("labymod")

File libraryDirectory = new File("libs/")

if (!libraryDirectory.exists()) {
libraryDirectory.mkdirs()
}

src "https://dl.labymod.net/latest/api/files/lm_api_mc1.16.5.jar"
dest 'libs/'
}
63 changes: 36 additions & 27 deletions config/forge.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,15 @@
client {
# Replace the vanilla bucket models with Forges own dynamic bucket model. Unifies bucket visuals if a mod uses the Forge bucket model.
B:replaceVanillaBucketModel=false
}

# Toggle off to make missing model text in the gui fit inside the slot.
B:zoomInMissingModelTextInGui=false

general {
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.
B:disableVersionCheck=false
# Disable culling of hidden faces next to stairs and slabs. Causes extra rendering, but may fix some resource packs that exploit this vanilla mechanic.
B:disableStairSlabCulling=false

# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024
I:clumpingThreshold=64

# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipies. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI.
B:sortRecipies=true

# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringEntities=false

# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringTileEntities=false

# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticable differences in mechanics so default is vanilla behavior. Default: false
B:fullBoundingBoxLadders=false
# Enable forge to queue all chunk updates to the Chunk Update thread. May increase FPS significantly, but may also cause weird rendering lag. Not recommended for computers without a significant number of cores available.
B:alwaysSetupTerrainOffThread=false

# Control the range of sky blending for colored skies in biomes.
I:biomeSkyBlendRange <
Expand All @@ -46,23 +34,44 @@ general {
34
>

# Enable the forge block rendering pipeline - fixes the lighting of custom models.
B:forgeLightPipelineEnabled=true
}


general {
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.
B:disableVersionCheck=false

# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024
I:clumpingThreshold=64

# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipes. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI.
B:sortRecipies=true

# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringEntities=false

# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
B:removeErroringTileEntities=false

# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticeable differences in mechanics so default is vanilla behavior. Default: false
B:fullBoundingBoxLadders=false

# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.
D:zombieBaseSummonChance=0.1

# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.
D:zombieBabyChance=0.05

# The spawn fuzz when a player respawns in the world, this is controlable by WorldType, this config option is for the default overworld.
I:defaultSpawnFuzz=20

# If the overworld has ANY spawn fuzz at all. If not, the spawn will always be the exact same location.
B:spawnHasFuzz=true
# Log cascading chunk generation issues during terrain population.
B:logCascadingWorldGeneration=true

# Enable the forge block rendering pipeline - fixes the lighting of custom models.
B:forgeLightPipelineEnabled=true
# Fix vanilla issues that cause worldgen cascading. This DOES change vanilla worldgen so DO NOT report bugs related to world differences if this flag is on.
B:fixVanillaCascading=false

# Set this to just disable the texture stitcher from writing the '{name}_{mipmap}.png files to disc. Just a small performance tweak. Default: true
B:disableStitchedFileSaving=true
# The time in ticks the server will wait when a dimension was queued to unload. This can be useful when rapidly loading and unloading dimensions, like e.g. throwing items through a nether portal a few time per second.
I:dimensionUnloadQueueDelay=0
B:enableGlobalConfig=false
}

Expand Down
30 changes: 18 additions & 12 deletions config/forgeChunkLoading.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# Configuration file

##########################################################################################################
# Forge
#--------------------------------------------------------------------------------------------------------#
# Sample mod specific control section.
# Copy this section and rename the with the modid for the mod you wish to override.
# A value of zero in either entry effectively disables any chunkloading capabilities
# for that mod
##########################################################################################################

Forge {
# Maximum chunks per ticket for the mod.
I:maximumChunksPerTicket=25

# Maximum ticket count for the mod. Zero disables chunkloading capabilities.
I:maximumTicketCount=200
}

Expand Down Expand Up @@ -45,3 +33,21 @@ defaults {
}


##########################################################################################################
# forge
#--------------------------------------------------------------------------------------------------------#
# Sample mod specific control section.
# Copy this section and rename the with the modid for the mod you wish to override.
# A value of zero in either entry effectively disables any chunkloading capabilities
# for that mod
##########################################################################################################

forge {
# Maximum chunks per ticket for the mod.
I:maximumChunksPerTicket=25

# Maximum ticket count for the mod. Zero disables chunkloading capabilities.
I:maximumTicketCount=200
}


2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file added libs/lm_api_mc1.12.2.jar
Binary file not shown.
Loading